knackered
01-15-2002, 11:17 AM
Simple question - probably been asked before, but can't find a positive answer.
I upload my vertex array to agp memory. Every frame, I want to change *just* the 'y' value for every vertex.
Is it best for me to keep my own copy of the vertex array in system memory, change the 'y' values in that array, then (after my fence has finished) do a 'memcpy' to copy the entire system memory vertex array onto the agp memory vertex array? Or should I stick to my loop (below):-
float* v=agp_varray + YOFFSET;
float* h=height_array;
for (i=0; i<numverts; i++)
{
*v = *h++;
v+=3;
}
Thanks for listening, and sorry if you've heard this one before.
[This message has been edited by knackered (edited 01-15-2002).]
I upload my vertex array to agp memory. Every frame, I want to change *just* the 'y' value for every vertex.
Is it best for me to keep my own copy of the vertex array in system memory, change the 'y' values in that array, then (after my fence has finished) do a 'memcpy' to copy the entire system memory vertex array onto the agp memory vertex array? Or should I stick to my loop (below):-
float* v=agp_varray + YOFFSET;
float* h=height_array;
for (i=0; i<numverts; i++)
{
*v = *h++;
v+=3;
}
Thanks for listening, and sorry if you've heard this one before.
[This message has been edited by knackered (edited 01-15-2002).]