PDA

View Full Version : glDrawElements over 255 indices ?



Mctittles
01-16-2013, 04:31 PM
I'm currently using glDrawElements to draw objects on the screen (2d) and have an array of vertices for all objects. I show/hide objects by changing the indices array.

I've ran into a problem though. I cannot go over 255 indices with GLubyte. Is there a solution to this?

Mctittles
01-16-2013, 04:41 PM
Err, nevermind. I just realized you can set the data type parameter for the indices from GL_UNSIGNED_BYTE to GL_UNSIGNED_SHORT.