Advertisement Jump to content


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

Bill Adams

D3DRM terrain problem

This topic is 6883 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''ve run into a long term problem while trying to write a flight sim under D3DRM (DX5). It involves recreating the terrain as the POV moves from the center of a NxN grid. Briefly, the Y-component altitude of each vertex is reset and AddGroup(...) and SetVertices(...) are called to depict the new surroundings. Prior to each update a Frame->DeleteVisual(Mesh...) is done followed by a lpD3DRM->CreateMesh(Mesh...). Memory released by the DeleteVisual is not reused, resulting in a new allocation for each terrain update. This causes page-outs to disk and slow frame rates as the user flies into a new square. In frustration, I''ve begun writing my own 3D renderer, but would really like to exploit the functionality of D3D (- or visa versa). I started using GetVertices(...) and SetVertices(...) but these would require static groups. Groups are used here for altitude band (sea, beach, grass, trees ... mountains) color/textures, and vary in size with map location. Has anyone gotten a similar situation to work under D3DRM? Should I convert to Immediate mode? Is there a better approach to terrain graphics? (Yeh, I know -OpenGL...:-) Any inputs are appreciated... Bill Adams

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!