Results 1 to 2 of 2

Thread: glDrawElements over 255 indices ?

  1. #1
    Member Newbie
    Join Date
    Apr 2011
    Posts
    35

    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
    Member Newbie
    Join Date
    Apr 2011
    Posts
    35
    Err, nevermind. I just realized you can set the data type parameter for the indices from GL_UNSIGNED_BYTE to GL_UNSIGNED_SHORT.

Similar Threads

  1. Replies: 7
    Last Post: 03-01-2013, 09:57 AM
  2. VBO without indices?
    By exoide in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-25-2010, 11:48 AM
  3. VBO and indices
    By Paolo Selva in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 01-27-2009, 03:58 PM
  4. indices at glDrawElements(...);
    By ghostdog in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 09-16-2003, 11:02 AM
  5. glDrawElements (indices)
    By in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-13-2002, 06:13 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
  •  
Proudly hosted by Digital Ocean