Advertisement

D3DRM terrain problem

Started by March 15, 2000 11:12 AM
-1 comments, last by Bill Adams 24 years, 11 months ago
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

This topic is closed to new replies.

Advertisement