terrain lod
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]
Quote:Original post by Matt328You'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).
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement