tricks for drawing portions of a grid?

I have a large grid, stored in a vbo, that I’m using for terrain data. I don’t simply draw the whole thing - I need to draw just a few rectangular areas of it at a time. These areas move every frame, and I’m wondering if there’s a better way to handle this than just resending every index I want to draw when these areas move. (Other than doing texture lookups in the vertex shader.)

The best thing I can come up with is to get the indices for an area of the grid into a vbo on the gpu, then move the selection area around (ie - sliding a window) by using glVertexPointer on the vbo that holds the geometry. I’m always hearing about how slow glVertexPointer is, but for this case shouldn’t it be pretty fast as long as I don’t modify the geometry vbo. Will most recent cards/drivers be able to implement this use of glVertexPointer without shuffling any data around, or anything else slow?

you could just update the indices in the sub-region of interest. leave the vertices alone, just move a “sub-index window” over the area.

Originally posted by <bonehead>:
you could just update the indices in the sub-region of interest. leave the vertices alone, just move a “sub-index window” over the area.
Right, that’s what I’m doing now. It just seems like a waste to have to respecify all the indices in the window, when it would suffice to just add an offset to each one. I just don’t know if OpenGL has the machinery to specify an offset like that, short of using the slow glVertexPointer on the geometry vbo.

there was a discussion along these lines in the advanced forum. an extension was proposed, but who knows – it would be a nice addition. directx has this ability in its DrawIndexedPrimitve function.

how big is your window? uploading a index sub-buffer shouldnt be too bad if its within reason, even if its a pain in the arse.

Originally posted by <bonehead>:
[b]there was a discussion along these lines in the advanced forum. an extension was proposed, but who knows – it would be a nice addition. directx has this ability in its DrawIndexedPrimitve function.

how big is your window? uploading a index sub-buffer shouldnt be too bad if its within reason, even if its a pain in the arse.[/b]
Thanks for the pointer to the other discussion . That’s exactly what I want to do.

The total number of indices could reach into the millions, with a significant portion of those needing an update every few frames, so the proposed extension would help quite a bit.