Hello Group my name is Claudio Veas and Im having a problem while
trying to execute the tutorial about Android with OPEN GL. The
application consist of two activities one is for selecting the
tutorials and then this activity calls another that according to the
selection of the tutorial, it creates the view that contains the
selected tutorial. The problem is that I have never got to see any of
the tutorials running. I tried debuging and for sure the second
activity is being executed and the right tutorial is selected but when
the application tries to run the constructor of the view this sentence
causes a problem so big that the activity is closed and the
application goes back to the previous one (initial activity) .

package edu.union;

import javax.microedition.khronos.opengles.GL10;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.OpenGLContext;
import android.view.View;

public class GLTutorialOne extends View {
        private OpenGLContext glContext;

        public GLTutorialOne(Context c) {
                super(c);
                glContext = new OpenGLContext(0);
                GL10 gl = (GL10)glContext.getGL();

                gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); //<- THIS ONE IS THE 
ONE
THAT SEEMS TO BE  //CAUSEING PROBLEMS
        }

        protected void onDraw(Canvas canvas) {
                GL10 gl = (GL10)glContext.getGL();

                glContext.waitNative();

                gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
        }
}

This is where you can download the tutorial and aparently for what I
have read in some places these tutorials worked fine in M3 version of
the sdk but had some problems in m5  version (I had to make some
changes in my code to make it work). Any Help will be welcome and if
you require more information do not hesitate to ask.

source are in http://code.google.com/p/android-gl/downloads/list

Thanks alot
Claudio Veas

PS: Please excuse my english is not  very good.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to