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?
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
system
4
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
system
5
… actually it could be a single polygon or trifan. That would explain unique indices like that too.