PDA

View Full Version : VAR parameter question



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

vshader
09-19-2002, 02:18 PM
have you tried dropping priority to 0.5?
you are allocating in video memory, not AGP, if you set priority = 1.

if you are going to write to the arrays every frame, put them in AGP memory. also, copy ALL the vertices in in one large chunk - write the WHOLE VAR range at once. else it will be SLOOOOOW.


[This message has been edited by vshader (edited 09-19-2002).]

aphex
09-19-2002, 02:39 PM
Ok, so now comes the fun part: I'm trying to get this to work on a laptop as well as on a desktop... laptop sports a GF4MX, so the extension is there.. Still, if I try to lower to 0.5 the call fails... why?

have you tried dropping priority to 0.5?
you are allocating in video memory, not AGP, if you set priority = 1.

if you are going to write to the arrays every frame, put them in AGP memory. also, copy ALL the vertices in in one large chunk - write the WHOLE VAR range at once. else it will be SLOOOOOW.


[This message has been edited by vshader (edited 09-19-2002).][/QUOTE]

vshader
09-19-2002, 03:42 PM
Originally posted by aphex:
Still, if I try to lower to 0.5 the call fails... why?
]

AGP support is busted?

look in the driver nvidia properties (under advanced on the settings page). does it say AGP? if it says PCI or AGP(PCI mode) then AGP has a problem.

aphex
09-19-2002, 03:57 PM
You're right again... no AGP on this little buster. Dell's page (inspiron 8200 with a Gf4 440 Go) says it's AGP4x compliant but i can't find any switch in the bios and it does say AGP(PCI mode).


Originally posted by vshader:
AGP support is busted?

look in the driver nvidia properties (under advanced on the settings page). does it say AGP? if it says PCI or AGP(PCI mode) then AGP has a problem.

jwatte
09-19-2002, 08:11 PM
You need new drivers; probably chip set drivers. If Dell's download site doesn't have it, try the Intel web site; I think that Dell has an i830 in it (though I'm not sure).

Also, if Dell has a graphics driver update, install that, too.