Results 1 to 5 of 5

Thread: VBO crazyness

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2005
    Posts
    4

    VBO crazyness

    I have a VBO for vertex data, and a VBO for index data. the vertices are stored as floats, whereas the indices are ints.

    I am a little concerned because form some mesh:

    glDrawArrays( GL_TRIANGLES, 0, t.ni );

    draws useless garbage, whereas:

    glDrawElements( GL_TRIANGLES, t.ni, GL_UNSIGNED_INT, NULL );

    works fine. Does glDrawArrays() expect the indices to be something other than integers?

  2. #2
    Guest

    Re: VBO crazyness

    Does glDrawArrays() expect the indices to be something other than integers?
    glDrawArrays doesn't expect indices at all.

    Read the spec on it...


  3. #3
    Junior Member Newbie
    Join Date
    Apr 2005
    Posts
    4

    Re: VBO crazyness

    owned.

    sorry i guess the only reason i thought it did was because my un-optimized models have indices in the form 1,2,3,4...n-1,n

    i guess indices like this are unnecessary, and drawarrays produces the identical behaviour

  4. #4
    Guest

    Re: VBO crazyness

    yeah if each index in the element array is unique then it's pretty bad indexing or it's a pretty strange model with no shared vertices

    You could fix this yourself by creating your own optimized triangle indices...

    Hlz

  5. #5
    Guest

    Re: VBO crazyness

    ... actually it could be a single polygon or trifan. That would explain unique indices like that too.

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