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 3 of 3

Thread: glDrawElements and count parameter over or under

  1. #1
    Member Regular Contributor
    Join Date
    Jun 2005
    Location
    USA
    Posts
    277

    glDrawElements and count parameter over or under

    What will happen if I have

    glDrawElements count parameter set to say 1024 and the VBO for vertices say has less than the count parameter calls for? I have some patches that don't end up with a nice 32x32 square and I am sending in that amount for the count, so I am concerned with the patches that aren't 32x32. Those non 32x32 patches will have less than 32x32 vertices.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,052

    Re: glDrawElements and count parameter over or under

    Worst case: It crashes.

    It is your responsibility to give correct information to the driver.

    Jan.
    GLIM - Immediate Mode Emulation for GL3

  3. #3
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: glDrawElements and count parameter over or under

    Indeed, a crash might happen, but a more likely problem is geometry corruption, random triangles etc. Don't make invalid call, by the old principle: crap in -> crap out.

Posting Permissions

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