I am trying to create a small Open GL2.0 demo application on Android, but I am getting the following errors.
in log cat
07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread) 07-02 20:50:40.110: E/libEGL(1252): call to OpenGL ES API with no current context (logged once per thread)
in console
[2012-07-02 20:50:44 - Emulator] development/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetAttribLoc ation:826 error 0x501 [2012-07-02 20:50:44 - Emulator] development/tools/emulator/opengl/host/libs/Translator/GLES_V2/GLESv2Imp.cpp:glGetUniformLocation:1383 error 0x501
my code
View
package limitliss.graphics.play; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.content.Context; import android.opengl.GLES20; import android.opengl.GLSurfaceView; import android.opengl.GLSurfaceView.Renderer; import android.opengl.GLU; public class OGLView extends GLSurfaceView implements Renderer { private int mColorType = 0; private float rotx = 0.0f; private float roty = 0.0f; Triangle tri = new Triangle(); public OGLView(Context context) { super(context); setEGLContextClientVersion(2); this.setRenderer(this); setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
source share