# glDrawElements with GL\_UNSIGNED\_BYTE

**URL:** https://forums.imgtec.com/t/gldrawelements-with-gl-unsigned-byte/901
**Category:** PowerVR Insider
**Created:** [November 9, 2010, 4:17pm UTC](https://forums.imgtec.com/t/gldrawelements-with-gl-unsigned-byte/901 "2010-11-09T16:17:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![stevehaggerty](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@stevehaggerty](https://forums.imgtec.com/u/stevehaggerty)
#### Post date: [November 9, 2010, 4:17pm UTC](https://forums.imgtec.com/t/gldrawelements-with-gl-unsigned-byte/901/1 "2010-11-09T16:17:51Z")

</div>

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?  
  
  
  
  
  
Thanks,  
  
  
  
  
  
Steve.
