I am writing some android code in preparation for a graphics intensive app I plan to develop. I haven’t done any OpenGL since 2004. I stumbled across http://www.opengl.org/wiki/Vertex_Array_Object and multiple sources for the PC platform claim that using vertex-array-objects is the best way to render.
My target platform is a Motorola Atrix 2 smart-phone with Android 2.3.
I can’t seem to find an include for a function corresponding to GL_OES_vertex_array_object. I want to call functions similar to glGenVertexArraysOES.
How do I use VAOs in Android?
My current includes are
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.CharBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
import javax.microedition.khronos.opengles.GL10;
import javax.microedition.khronos.opengles.GL11;
VAOsare fairly new and not included in OpenGL|ES 1.0 or 1.1 (not to be confused withBuffer Objects, or as they’re sometimes calledVBOs). You’ll have to import and use OpenGL|ES 2.0, and by doing that you’ll have to make some changes to your graphics code to draw via shaders instead ofglVertexPointerand similar methods. From the looks of it, there’s noGL20Extclass or similar built into Android, I would look around the web for bindings or write them myself using the NDK.