views:

513

answers:

1

I'm trying to run the "HelloTriangle" example, from The OpenGL ES 2.0 Programming Guide, in the Android emulator.

I import egl.EGLConfig and opengles.GL10 from javax.microedition.khronos, but the ESContext type and definitions such as GL_COMPILE_STATUS and GL_FRAGMENT_SHADER can't be resolved.

I reworked the triangle example somewhat for Android in that I'm using GLSurfaceView. I undertand that it is supposed to be used instead of OpenGLContext in the newer versions of the SDK.

Am I using a "non-Android" approach to OpenGL ES? If so, what's the right one?

+1  A: 

I believe the answer here is that Android does not yet support 2.0.

Buggieboy
yep - you're stuck with 1.0. You can cast the GL10 object to a GL11 object or to a GL11ExtensionPack object and try calling those functions too - but it seems to only work on some devices that support 1.1.
Ben Gotow