A simulator, by way of non-limiting example, a flight simulator, may present to a user a visualization of a virtual environment. The user may typically alter his/her view of the virtual environment by moving the simulated airplane about the simulated environment. In order to represent the terrain, such as the hills, mountains, valleys, and rivers of the virtual environment as realistically as possible, a mesh that closely matches the elevation contour of the terrain that is being simulated may be generated. The mesh may be made up of polygons, each of which may define a planar face, but which collectively approximate the elevation contour of the terrain. Imagery of the terrain may then be mapped to the appropriate polygons in the mesh, ultimately rasterized, and then presented to a user.
In large-scale simulations, where the simulation may encompass vast geographic areas, it may be impractical, impossible, or simply undesirable to generate a mesh of the terrain in advance of the simulation, and thus the mesh may be generated substantially in real time during the simulation. The mesh generation process may be processor intensive, and may be a gating factor in providing a high-fidelity visualization of the environment, since processor cycles utilized to generate a mesh may not be available for other processing tasks associated with the simulation. Accordingly, there is a need for mechanisms and techniques for efficiently generating meshes during a simulation.