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 or glDrawArrays?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    104

    glDrawElements or glDrawArrays?

    Which is faster and why is it ????

    I'd thank that you download my opengl program from my page: www.terra.es/personal3/jesusgumbau/descargas.html

    I'd like you to test my program, I think it is slow, but I'd like your opinion.
    MeTaL WiLL NeVeR DiE!!!!!

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Caracas/Venezuela
    Posts
    182

    Re: glDrawElements or glDrawArrays?

    Its implementation dependant. You could say that in theory glDrawArrays should be slightly faster since you dont have to pass indices like in glDrawElements, BUT you could also say glDrawElements is faster if you share vertices in the array, since they can be cached more easilly in the OpenGL driver, and glDrawArrays may have to transform shared vertices multiple times.
    I prefer drawelements, because of it's more flexible.

Posting Permissions

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