aphex
09-19-2002, 01:51 PM
Hello there,
coding some VAR stuff and it does not seem to work. Ok, can anyone give me a hint with the exact initialization sequence? The one I'm using and does not work as expected is:
bigarray=wglAllocateMemoryNV(BUFFERSIZE*NUMBUFFERS ,0,0,1);
glVertexArrayRangeNV(BUFFERSIZE*NUMBUFFERS,bigarra y);
glEnableClientState(GL_VERTEX_ARRAY_RANGE_NV);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
// I use only vertex and color
For some unknown reason the only way to get decent performance is to change the second line to something like:
glVertexArrayRangeNV(8000000,bigarray);
Notice that, even with this change (BUFFERSIZE*NUMBUFFERS is << 8M), performance is around 2Mtris/sec on a 1.3Ghz Athlon with a GF3
As for painting, I more or less do:
if (!glTestFenceNV.....)
glFinishFence(....)
// here I initialize the data arrays
glVertexPointer(3, GL_FLOAT, 6*sizeof(float),v);
glColorPointer(3, GL_FLOAT, 6*sizeof(float),v+3);
glDrawArrays(...)
glSetFence(...)
Ok, I know I could use strips, or maybe even indexed stuff, but that's not the point really, as I need ot render stuff this way: isn't 2Mtris just too low even for regular arrays?
cheers
coding some VAR stuff and it does not seem to work. Ok, can anyone give me a hint with the exact initialization sequence? The one I'm using and does not work as expected is:
bigarray=wglAllocateMemoryNV(BUFFERSIZE*NUMBUFFERS ,0,0,1);
glVertexArrayRangeNV(BUFFERSIZE*NUMBUFFERS,bigarra y);
glEnableClientState(GL_VERTEX_ARRAY_RANGE_NV);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
// I use only vertex and color
For some unknown reason the only way to get decent performance is to change the second line to something like:
glVertexArrayRangeNV(8000000,bigarray);
Notice that, even with this change (BUFFERSIZE*NUMBUFFERS is << 8M), performance is around 2Mtris/sec on a 1.3Ghz Athlon with a GF3
As for painting, I more or less do:
if (!glTestFenceNV.....)
glFinishFence(....)
// here I initialize the data arrays
glVertexPointer(3, GL_FLOAT, 6*sizeof(float),v);
glColorPointer(3, GL_FLOAT, 6*sizeof(float),v+3);
glDrawArrays(...)
glSetFence(...)
Ok, I know I could use strips, or maybe even indexed stuff, but that's not the point really, as I need ot render stuff this way: isn't 2Mtris just too low even for regular arrays?
cheers