4

Android OpenGL-ES VBO support or not? How can i check this?

Thanks

lacas
  • 13,928
  • 30
  • 109
  • 183

3 Answers3

6

Some phones support it, some do not. Generally, VBOs are mandatory in OpenGL 1.1, so if the device reports

gl.glGetString(GL10.GL_VERSION);

as 1.1 or higher (you can also write the app manifest file so that 1.1 is required for the installation) then they are supported.

If the device support OpenGL ES 1.0 only, you should check the return value of

gl.glGetString(GL10.GL_EXTENSIONS);

whether it contains ARB_vertex_buffer_object or not. Probably it will.

For (slightly) related information about various GL capabilities of Android devices, you can find some at this question: OpenGL extensions available on different Android devices.

Community
  • 1
  • 1
Kristóf Marussy
  • 1,202
  • 8
  • 18
0

OpenGL ES 2.0 supports VBOs well, but there is issue in Android 2.2 which misses an api in GLES20 class:

public static native void glDrawElements(
    int mode,
    int count,
    int type,
    int offset
);

The issue has been fixed from Android 2.3.

Richard
  • 339
  • 3
  • 10
0
void draw(GL10 gl){
    GL11 gl11 = (GL11)gl;
    ...
    gl11.glBindBuffer(...);
}
animuson
  • 53,861
  • 28
  • 137
  • 147
farm ostrich
  • 5,881
  • 14
  • 55
  • 81