PDA

View Full Version : Vertex array usage



abrodersen
02-10-2003, 02:57 AM
I'm using a quad-tree based LOD algorithm to draw terrains, but now I've started wondering what would be the best way to send the geometry to the gfx card.

If the terrain is of size 513x513 and I need both texture coordinates and vertices. That's 5 floats or 20 bytes giving a total of approx 5MB geometry data. However due to the LOD, less than half of the vertices are drawn, so what would be the best way of doing this:
1. Should I keep all the vertices in one large vertex array (and the texture coordinates in another) and then only generate indices in the LOD process, or
2. Should I generate a new array each frame containing only the used vertices?

Thanks.
Anders

Ostsol
02-10-2003, 07:25 AM
You could dump it all in a single array and then selectively render indices. . .

zed
02-10-2003, 09:01 AM
break the terrain up into patches eg of size 33x33.
check out www.vterrain.org (http://www.vterrain.org) for a lot of info on terrains