how to store vertex data in video memory ?

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.

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 :stuck_out_tongue: ?

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).

> 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).

The data will be dereferenced immediately, but it will be stored in the display list. So vertex arrays do work with display lists.

  • Matt