terrain lod

Started by
1 comment, last by Matt328 17 years, 11 months ago
I'm currently trying to implement geomipmapping in my terrain renderer, but having some trouble trying to figure out the fastest way to do the actual draw calls. I'm using a 512x512 height map field which I've read in from a raw file, and calculated a list of (512*512) vertices. I would like to send these to the card once, then be able to pick and choose which verts to render (say for certain patches I want to change the LOD bias and render only a subset of certain vertices) through an index list. Would it be better to try and make this work, manipulating only the index list, or would I be able to get away with manipulating and pushing the actual vertex list every frame? gldrawelements seems like it might do what I need, it allows you to specify a pointer to an index list right? Edit: if the gldrawelements works as I think it does, couldn't I simplify this one step further and set each patch as a separate vertex array, and use a generic index list for each LOD? for example say patch x is going to be rendered with LOD=2, so draw x's vertices using index_list[2]
Advertisement
Quote:Original post by Matt328
Edit: if the gldrawelements works as I think it does, couldn't I simplify this one step further and set each patch as a separate vertex array, and use a generic index list for each LOD? for example say patch x is going to be rendered with LOD=2, so draw x's vertices using index_list[2]
You'll find this will be a much better strategy in the long run. It's inefficient in the form you described, but is easily optimized to a very fast version (so fast, in fact, that the overhead introduced when compared to brute force is negligible).
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Thanks, Promit. I've been kicking this around for a few days now, read just about every paper there is on geomipmapping, but wasn't able to visualize exactly how to render in OpenGL. Hopefully I can get started on the implementation soon, I'm sure I'll be back with more questions.

This topic is closed to new replies.

Advertisement