Results 1 to 4 of 4

Thread: GL_ELEMENT_ARRAY_BUFFER_ARB ???????

  1. #1
    Member Contributor
    Join Date
    Nov 2007
    Posts
    72

    GL_ELEMENT_ARRAY_BUFFER_ARB ???????

    Ok, so, i basically have 3 buffers with positions,normals,and uv, and another 3 buffers with index into them.

    Basically, one triangle use 3 index buffers into pos,norm,uv.

    Now, i tried GL_ELEMENT_ARRAY_BUFFER_ARB, if i draw only the positions is working, if i add normals and/or uv, everything is totally wrong.

    My question is, the index buffer must be unique? because my index buffers arent for pos/norm/uv.

    If yes, there is any other way to draw my objects with out using an unique index buffer for all pos/norm/uv??

    Thanks!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Dec 2007
    Location
    Brighton, UK
    Posts
    161

    Re: GL_ELEMENT_ARRAY_BUFFER_ARB ???????

    The index buffer is used to index all your bound array buffers. So in a nutshell, you need same number of pos/norm/uv data elements, so make your uv/norms for each vertex.
    The only other way around I'm aware of is using good old display lists.

  3. #3
    Member Contributor
    Join Date
    Nov 2007
    Posts
    72

    Re: GL_ELEMENT_ARRAY_BUFFER_ARB ???????

    ok, i found the way, interleaved or serialized, but i dont know which one is the fastest

  4. #4
    Senior Member Regular Contributor CatDog's Avatar
    Join Date
    Mar 2006
    Location
    Germany
    Posts
    226

    Re: GL_ELEMENT_ARRAY_BUFFER_ARB ???????

    Interleaved.

    CatDog

Similar Threads

  1. GL_ELEMENT_ARRAY_BUFFER_ARB
    By Bumper in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-26-2004, 01:43 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
  •  
Proudly hosted by Digital Ocean