PDA

View Full Version : NV_VAR limitations



giggioland
09-29-2002, 05:41 AM
I've noticed some problems during the development of my little 3d engine and NV_VAR:

I've had an array of 69800 vertices with position,texcoords,normals...
Even if GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV returns 1048xxx (on my GeForce3),
I cannot call glDrawArrays(...) with FIRST argument>=65536 .

I tried to execute glDrawArrays(GL_POINTS,65536,1) all my vertices will be rendered (from 0 to 69799)
This doesn't happen with glDrawElements () or glDrawArrays(GL_POINTS,65535,1)
I always use 32 bits unsigned indices...
Is there something i've done wrong?
Last little question:
if i use glDrawElements, i can reuse vertices with same indices.
My question is: Can I reuse these in 2 subsequent calls?
I'm italian so i try to explain my in another way... if i call twice the same function with the same datas, Does the gl implementation
has to transfer data twice?
Es:
UINT32 indices1[]={0,1,2,3};
UINT32 indices2[]={2,3,4,5}
glDrawElements(GL_TRIANGLE_STRIP,4,GL_UNSIGNED_INT , indices1);
glDrawElements(GL_TRIANGLE_STRIP,4,GL_UNSIGNED_INT , indices2);

does the second glDraw reuse vertex 2 and 3?

Ozzy
09-29-2002, 07:14 AM
i think it's limited to 0xffff then u should split your primitive accordingly. ;)

jwatte
09-29-2002, 11:29 AM
Don't know about the large-first-index problem. Perhaps it's a bug, perhaps not.

If you call DrawRangeElements twice, the data has to be transferred twice, although if you use LockArraysEXT() or vertex_array_range, then the card _CAN_ cache the data (according to the spec), although it probably won't actually do it when it's that much data.

mcraighead
09-30-2002, 04:59 PM
Yes, this is a known bug. It will be fixed on newer drivers, and it should work with no trouble on a GF4 Ti (i.e., it's GF3-specific).

- Matt