fenris
08-15-2000, 05:27 PM
Hello.
I've been playing with the GL_NV_fence and GL_NV_vertex_array_range extensions lately and have a few questions for anyone who is or has used these extensions as well.
I'm using them to render a huge terrain mesh. The array I have set up goes like this:
[X, Y, Z, nX, nY, nZ, U, V],etc...
all elements are composed of type float.
the array has been allocated with wglAllocateMemoryNV() as well.
As you can see, the array is 4-byte aligned (float) and strides are a multiple of 4. According to the doc's from nvidia, this all checks out and is legit. I draw the arrays normally (glVertexPointer, etc...) as an indexed primitive with glDrawElements(). The problem is, it seems that I actually LOSE performance doing this. Rendering was faster with just standard vertex arrays. I've also taken use of the GL_NV_fence extension, setting a fence after drawing the array, and finishing the fence before i draw the array again in the next frame. This didn't help either.
So my question is, has anyone gotten similar results where the performance is actually less? Or maybe doing this is too much overhead and performance gains won't be seen unless I work on a larger scale mesh? The demo from nvidia was doing 30 FPS on my machine and it was doing 300,000+ polys a frame, i'm doing about 8,000 (textured and lit) and getting ~60, ~70 w/o the extensions.
I've been playing with the GL_NV_fence and GL_NV_vertex_array_range extensions lately and have a few questions for anyone who is or has used these extensions as well.
I'm using them to render a huge terrain mesh. The array I have set up goes like this:
[X, Y, Z, nX, nY, nZ, U, V],etc...
all elements are composed of type float.
the array has been allocated with wglAllocateMemoryNV() as well.
As you can see, the array is 4-byte aligned (float) and strides are a multiple of 4. According to the doc's from nvidia, this all checks out and is legit. I draw the arrays normally (glVertexPointer, etc...) as an indexed primitive with glDrawElements(). The problem is, it seems that I actually LOSE performance doing this. Rendering was faster with just standard vertex arrays. I've also taken use of the GL_NV_fence extension, setting a fence after drawing the array, and finishing the fence before i draw the array again in the next frame. This didn't help either.
So my question is, has anyone gotten similar results where the performance is actually less? Or maybe doing this is too much overhead and performance gains won't be seen unless I work on a larger scale mesh? The demo from nvidia was doing 30 FPS on my machine and it was doing 300,000+ polys a frame, i'm doing about 8,000 (textured and lit) and getting ~60, ~70 w/o the extensions.