Index Buffer can only be of type ByteBuffer?

Started by
1 comment, last by kenjinsakura 13 years, 8 months ago
Hi, I'm using vertex buffers and the glDrawElements function on OpenGL ES 1.1 to render my polygons. At first, my index buffer was of type ByteBuffer and it displayed everything fine. But then, I tried rendering a model with 1000~ polygons and it turned out weird. So, I figured byte wouldn't be enough since there'd be 1000*3 indices right? So I changed it to short, of course modifying the related allocation functions. However the model still displayed wierd.

I tried using short for the previous model with 200~ vertices and that was rendering wierd too. Going back to byte fixes it though.

Any thoughts why this is happening?

Thanks
Advertisement
When you changed to short did you update the appropriate arguments to tell OpenGL you were using shorts?
I thought I did, but apparently, I forgot to change the argument for my glDrawElements call to UNSIGNED_SHORT.

Thanks.

This topic is closed to new replies.

Advertisement