Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DeltaVee

Terrain Level Of Detail and SetIndices(...)

This topic is 6257 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem using SetIndices. I have a grid X by Y which represents my terrain as a set of coordinates {x,y,z} and color (for representing height). Thats no problem. Because it is inneficient to display ALL the quads for the terrain at any one time I am implementing a Level Of Detail (LOD) algorithm. Goes something like this. If at a far enough distance I will draw a single quad that holds 16 x 16 terrain tiles, a little closer 8 x 8 and so on. So if my terrain is 128 by 128 tiles (meaning 129 by 129 vertices) at the lowest LOD the top left quad indices are (assuming a triangle list and not a strip) 2064,0,2065 and 0,1,2065. (this covers 16x16 terrain tiles) Okay.... If I want to use the same indeces BUT move over by 16 tiles I should be able to do this: SetIndices(m_pIB,16) BUT.... when I call: DrawIndexedBuffer(D3DPT_TRIANGLELIST,0,16641,2) I get ''Streams do not have required number of vertices'' from DirectX (Debug mode, max output) But if I: SetIndices(m_pIB,0) It works!!! Can anyone shed some light? I have tried a multiptude of variations, but to no effect. Thanx in advance. D.V.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!