Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cosmonaut

Vertex Buffer Speed

This topic is 5387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I always thought that rendering with glDrawElements() is the most fastest, because a shared vertex has only to be transformed once. now a friend told me, it''s faster to use glVertexArray() ... but why? i always thought indexing is faster. I think i could gain even more speed when using VBOs. Whats now faster? I''m a bit confused about the Elements vs. Array thing. TIA

Share this post


Link to post
Share on other sites
Advertisement
I''m guessing that would be glDrawArrays. The reason why it may be faster is that less data needs to be tossed across the AGP bus. With glDrawElements you''re sending a whole bunch of indices across, while with glDrawArrays all you need to send is a grand total of 12 bytes. The only problem with glDrawArrays is that your vertex data has to be arranged in the array to draw the way you want it to. For that reason, index arrays are extremely helpful, giving you the versatility of glDrawElements, while also keeping the speed of glDrawArrays.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!