Jump to content
  • Advertisement

Archived

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

Neophyte

OpenGL (OpenGL) On vertex-arrays

This topic is 6665 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

I have a few questions regarding vertex-arrays in OpenGL. First off, how much of a performance-gain can be expected by using vertex-arrays? For instance, if I have a cube defined by 8 vectors, 8 "colors" (a self-created class), and an array of polygons (each containing a pointer to 3 vectors and 3 colors), can I expect a noticable gain in performance by switching to using OpenGL''s vertex-arrays? Secondly, the way I''ve been considering using vertex-arrays is having each object in a scene associated with a vertex-array, and then switching to that array when I want to draw a given object. Is this a reasonable way to do it? What with objects that use multiple textures, how should I handle that? I''m looking for answers that can be used with more complex objects than cubes. Any help is appreciated. -Neophyte

Share this post


Link to post
Share on other sites
Advertisement
Depends on your 3d card or lack of 3d acceleration. On my matrox millenium on an object with 5000 triangles I usually get about a 30 percent gain when using arrays or display lists. I don''t remember what gain I got on my tnt1 but you do get a gain. Not as big a percentage because of 3d acceleration in hardware was already giving me a large fps number. Nvidia recommends using them. I assume that the rest of the industry also recomends using vertex arrays or display lists. I use the display lists but I think the vertex arrays will give you a fps boost on large objects. Sounds like a good plan.

I wanrned you! Didn't I warn you?! That colored chalk was forged by Lucifer himself!

Share this post


Link to post
Share on other sites
check the FAQ
http://www.opengl.org/About/FAQ/Technical.html
from my personal experience ive found its sometimes quicker sometimes slower depending what u wanna draw and how eg texture coords colours etc

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!