PDA

View Full Version : how to store vertex data in video memory ?



thw
11-21-2000, 06:11 AM
How can i store vertex data in video memory ?
Some people say with display lists, but with display lists i can't use indexed primitives.
Please help me.

TheGecko
11-21-2000, 09:01 AM
If you're trying to store static data (ie the vertices of your object do not change) then try using Compiled Vertex Arrays.This tells the driver to store your model's data in driver allocated memory instead of RAM memory.This is faster since the driver doesn't have to waste time transfering the data from RAM to driver memory.(I'm not sure where driver memory is though) But I read that this is the best way to store static data.

Umm...does that help :P ?

j
11-21-2000, 12:47 PM
With the GeForce and GeForce2, you can use the vertex array range extension to allocate and get a pointer to video memory and then use indexed vertex arrays.

I can't think of any other card where you can allocate video memory for a vertex buffer.

Info about the extension is on the nvidia developer site (www.nvidia.com/developer).

memo
12-07-2000, 12:43 AM
> Some people say with display lists, but
> with display lists i can't use indexed
> primitives.

This is from the OGL documentation, you can't use them in display lists ("instead of compiling, they'll be executed immediately").

Believe it or not, I used indexed primitives in display lists, and they worked fine. Maybe the code is not portable (GF II GTS on W98/W2k).

mcraighead
12-07-2000, 01:06 AM
The data will be dereferenced immediately, but it will be stored in the display list. So vertex arrays _do_ work with display lists.

- Matt