glDrawElements with GL_UNSIGNED_BYTE

This topic contains 0 replies, has 1 voice, and was last updated by  stevehaggerty 6 years, 11 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #30348

    Hi there,

    In order to reduce the vertex bandwidth in our title, I check to see if the number of indices in a vertex buffer is < 256. If so, I create a VBO with byte indices.

    When it comes to rendering, I check the number of indices, if < 256 I use:

    glDrawElements(GL_TRIANGLES,n,GL_UNSIGNED_BYTE, 0);

    otherwise I use:

    glDrawElements(GL_TRIANGLES,n,GL_UNSIGNED_SHORT, 0);

    This reduction of bandwidth actually reduces my framerate by about 5%! 🙁

    Are the byte elements getting converted to shorts in the driver or something?



Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.