(OpenGL) On vertex-arrays

Started by
1 comment, last by Neophyte 23 years, 9 months ago
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
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!
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
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

This topic is closed to new replies.

Advertisement