I’m curious as to how these arrays work. In particular, when using them with indexed triangles, are ALL the vertices transfered/procesed or do only the vertices referenced by indices? I ask because for maps and models I can just have a giant array of vertices for the map, cull meshes, then draw using the indices. Likewise for models, I can use progressive meshes with a constant VA and only change the index list.

This would be great if only referenced vertices were considered, but I have a sneaking feeling that this isn’t the way it works, and that I should group VAs closer with their tri index representations. At the very least using VARs I might have a hard time fitting so many vertices in memory when a lot of them wouldn’t be seen anyway.

If anybody has any thoughts they can lend I’d appreciate it.

As I know only the vertices you are really using are transferred. I am since long not working with the normal VAs anymore, but with VAR. With VAR you can use video, agp or system memory and “tell” the driver you will not do any changes to your memory while it’s rendering it’s content through setting fences.

It works the way:
-setting fence
-drawing the data
at the end of the frame or before you are manipulating the data: waiting for fence finishing

Already because of the matter that the driver doesn’t know how many vertices your array all in all contains, it is not able to transfer the whole data every time. You only tell it, how many indices you want to flush, but never, how big your vertex array is, so how should it know, how much it would have to transfer? No way. Well, ok, it could check all indices and search for the highest one, but I don’t think they do such things.


It’s so blatantly obvious now that it should have dawned on me before. There’s no size parameter passed with the gl*Pointers, so the vertices that are pulled have to correspond to the indices I pass.

Although I’d think that when drawing with index calls the driver would keep track of the highest and lowest indices and just copy a linear block from those two offsets, rather than pecking at the array. If this was the case it might be better to have each index array closely match a vertex array to avoid unneeded vertices getting in the way. Is this the case?