PDA

View Full Version : GL_ELEMENT_ARRAY_BUFFER_ARB ???????



dor00
05-17-2008, 01:04 AM
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!

babis
05-17-2008, 01:35 AM
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. :)

dor00
05-17-2008, 03:27 AM
ok, i found the way, interleaved or serialized, but i dont know which one is the fastest:)

CatDog
05-17-2008, 03:30 AM
Interleaved.

CatDog