Results 1 to 3 of 3

Thread: ES2 and VBOs

  1. #1
    Junior Member
    Join Date
    Dec 2010

    ES2 and VBOs

    Hello all,
    I searched the web for an answer to my question below - without luck so far. I hope that the question makes sense...!

    I develop for Android 2.2. I wish to make a GLES20 graphics application using "Java". Furthermore I want to use VBOs.

    In GL10, one rendered the VBOs (for instance) like this:
    Code :
                GL11 gl11 = (GL11) gl;
                gl11.glBindBuffer(GL11.GL_ARRAY_BUFFER, mVertexBufferObjectId);
                gl11.glVertexPointer(3, GL10.GL_FLOAT, VERTEX_SIZE, 0);
                gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, mElementBufferObjectId);
                gl11.glDrawElements(GL10.GL_TRIANGLES, mIndexCount, GL10.GL_UNSIGNED_SHORT, 0);
    (this is actually an extract from the CubeMap Android example).

    In GL20 everybody creates their buffers using ByteBuffer.allocateDirect. Then, they are rendered / loaded using attribute pointers
    Code :
    GLES20.glVertexAttribPointer(maPositionHandle, 3, GLES20.GL_FLOAT, false, TRIANGLE_VERTICES_DATA_STRIDE_BYTES, mTriangleVertices);
    (the argument "mTriangleVertices" is a Buffer, not the "name" of a VBO (int).

    To my understanding the Buffers in the GL10 version are in VRAM whereas the buffers in the GLES20 version live in RAM. Unfortunately this part in the ES20 documentation by Munshi and Leech (pp. 24 / 25) is not very clear to me.

    I would like to make sure that there is no need / no possibility to use buffers loaded to VRAM using glBufferData in GLES20.

    Any help would be appreciated.

    Kind regards, Jan

    I would like to use BindBuffer in combination

  2. #2
    Senior Member
    Join Date
    May 2006

    Re: ES2 and VBOs

    You can and should use VBOs in OpenGL ES 2.0, too. The commands to handle buffer objects (e.g. glBindBuffer, glBufferData) are available in ES2.0, you just use the generic glVertexAttribPointer instead of the different gl*Pointer variants in ES1.x.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum |

  3. #3
    Junior Member
    Join Date
    Dec 2010

    Re: ES2 and VBOs

    Hi Georg,
    thanks a lot for taking the time to reply to my question. After I read your hint I took the time and courage to google my problem once again and stumbled across this:
    ...which is basically the answer to my problem:
    Yes, VBOs should be used but in GLES2.0 you cannot - at least with the current implementation.

    Thanks again & cheers,

Similar Threads

  1. About compatibility between OpenGL ES2.0 and OpenGL2.0
    By leo_china in forum OpenGL ES general technical discussions
    Replies: 2
    Last Post: 05-23-2011, 08:24 PM
  2. Transformations on VBOs
    By dudeman in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 06-21-2009, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts