PDA

View Full Version : vertex arrays, culling for a performance boost



nickn
05-11-2006, 06:03 PM
1) In the interest of getting faster execution, I've switched from calling
glVertex3f to loading vertex arrays for a terrain generated from a 16*24
elevation point array that fills about a 4x4 inch section of the screen.
The problem is I don't see any increase in the FPS. (I get around 12-15
fps.) Now this isn't a very big set of data, but I was expecting to see a
little bump in performance, since the CPU I'm using is a 933 MHz Celeron
with an Intel 810 chipset. I have one interleaved array for color and
triangle strip points, and one for line strip grid points that's laid on
top.

Just where in the processing chain are vertex arrays supposed to help?
In the CPU, by eliminating all the calls to glVertex? Is this just saving
the call overhead, with all of the geometry still needing to be done as before?
If so, maybe my 16*24 scenario is not intensive enough to matter.
In the graphics processor, by letting it digest this data in a more efficient
manner? I don't really know what's going on here, so maybe its load is not
reduced at all.

The 810 processor doesn't have any of its own memory, so assume there's no
options for any other improvement, such as VBOs.

2) I've also turned on back face culling and see no improvements in performance
compared to no culling. When I turn it on for front faces (as an experiment)
I do see substantial improvements (and of course the terrain is missing). I
thought the whole point of culling is to save the processing time of faces
that aren't seen.

mikael_aronsson
05-12-2006, 04:09 AM
Yes you minimize the overhead of glVertex() calls and if vertices are used many times you only need to specify them one time, you should get a little improvment at least I guess.

So you would minimize the load on the CPU and move some of the load to the GPU if there is one.

Backface culling if a pretty fast operation and may not have much impact on performance, front face culling do of course improve alot but that's because there is less stuff to render, it all depends on what you render and the order you render it.

If you render a sphere and you render the backfacing polygons first and then the front facing you should notice some difference in performance with & without backface culling for example.

Mikael