Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: glDrawElements over 255 indices ?

  1. #1
    Intern Newbie
    Join Date
    Apr 2011
    Posts
    36

    glDrawElements over 255 indices ?

    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?

  2. #2
    Intern Newbie
    Join Date
    Apr 2011
    Posts
    36
    Err, nevermind. I just realized you can set the data type parameter for the indices from GL_UNSIGNED_BYTE to GL_UNSIGNED_SHORT.
    Last edited by Mctittles; 01-16-2013 at 06:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •