Class TerrainRenderer: Render everything related to the terrain, especially patches and water.
More...
#include <TerrainRenderer.h>
|
| TerrainRenderer () |
|
| ~TerrainRenderer () |
|
void | SetSimulation (CSimulation2 *simulation) |
| Set the simulation context for this frame. More...
|
|
void | Submit (int cullGroup, CPatch *patch) |
| Submit: Add a patch for rendering in this frame. More...
|
|
void | Submit (int cullGroup, CModelDecal *decal) |
| Submit: Add a terrain decal for rendering in this frame. More...
|
|
void | PrepareForRendering () |
| PrepareForRendering: Prepare internal data structures like vertex buffers for rendering. More...
|
|
void | EndFrame () |
| EndFrame: Remove all patches from the list of submitted patches. More...
|
|
void | RenderTerrain (int cullGroup) |
| RenderTerrain: Render textured terrain (including blends between different terrain types). More...
|
|
void | RenderTerrainShader (const CShaderDefines &context, int cullGroup, ShadowMap *shadow) |
| Render textured terrain, as with RenderTerrain, but using shaders instead of multitexturing. More...
|
|
void | RenderPatches (int cullGroup) |
| RenderPatches: Render all patches un-textured as polygons. More...
|
|
void | RenderOutlines (int cullGroup) |
| RenderOutlines: Render the outline of patches as lines. More...
|
|
void | RenderWater (const CShaderDefines &context, int cullGroup, ShadowMap *shadow) |
| RenderWater: Render water for all patches that have been submitted this frame. More...
|
|
CBoundingBoxAligned | ScissorWater (int cullGroup, const CMatrix3D &viewproj) |
| Calculate a scissor rectangle for the visible water patches. More...
|
|
void | RenderPriorities (int cullGroup) |
| Render priority text for all submitted patches, for debugging. More...
|
|
void | RenderTerrainOverlayTexture (int cullGroup, CMatrix3D &textureMatrix) |
| Render texture unit 0 over the terrain mesh, with UV coords calculated by the given texture matrix. More...
|
|
Class TerrainRenderer: Render everything related to the terrain, especially patches and water.
TerrainRenderer::TerrainRenderer |
( |
| ) |
|
TerrainRenderer::~TerrainRenderer |
( |
| ) |
|
void TerrainRenderer::EndFrame |
( |
| ) |
|
EndFrame: Remove all patches from the list of submitted patches.
void TerrainRenderer::PrepareForRendering |
( |
| ) |
|
PrepareForRendering: Prepare internal data structures like vertex buffers for rendering.
All patches must have been submitted before the call to PrepareForRendering. PrepareForRendering must be called before any rendering calls.
Set up all the uniforms for a shader pass.
RenderFancyWater: internal rendering method for fancy water.
Returns false if unable to render with fancy water.
void TerrainRenderer::RenderOutlines |
( |
int |
cullGroup | ) |
|
RenderOutlines: Render the outline of patches as lines.
preconditions : PrepareForRendering must have been called this frame before calling RenderOutlines.
- Parameters
-
filtered | If true then only render objects that passed CullPatches. |
void TerrainRenderer::RenderPatches |
( |
int |
cullGroup | ) |
|
RenderPatches: Render all patches un-textured as polygons.
preconditions : PrepareForRendering must have been called this frame before calling RenderPatches.
- Parameters
-
filtered | If true then only render objects that passed CullPatches. |
void TerrainRenderer::RenderPriorities |
( |
int |
cullGroup | ) |
|
Render priority text for all submitted patches, for debugging.
void TerrainRenderer::RenderSimpleWater |
( |
int |
cullGroup | ) |
|
|
private |
RenderSimpleWater: internal rendering method for water.
void TerrainRenderer::RenderTerrain |
( |
int |
cullGroup | ) |
|
RenderTerrain: Render textured terrain (including blends between different terrain types).
preconditions : PrepareForRendering must have been called this frame before calling RenderTerrain.
void TerrainRenderer::RenderTerrainOverlayTexture |
( |
int |
cullGroup, |
|
|
CMatrix3D & |
textureMatrix |
|
) |
| |
Render texture unit 0 over the terrain mesh, with UV coords calculated by the given texture matrix.
Intended for use by TerrainTextureOverlay.
Render textured terrain, as with RenderTerrain, but using shaders instead of multitexturing.
- Parameters
-
shadow | A prepared shadow map, in case rendering with shadows is enabled. |
RenderWater: Render water for all patches that have been submitted this frame.
preconditions : PrepareForRendering must have been called this frame before calling RenderWater.
Calculate a scissor rectangle for the visible water patches.
void TerrainRenderer::SetSimulation |
( |
CSimulation2 * |
simulation | ) |
|
Set the simulation context for this frame.
Call at start of frame, before any other Submits.
void TerrainRenderer::Submit |
( |
int |
cullGroup, |
|
|
CPatch * |
patch |
|
) |
| |
Submit: Add a patch for rendering in this frame.
preconditions : PrepareForRendering must not have been called for this frame yet. The patch must not have been submitted in this frame yet (i.e. you can only submit a frame once).
- Parameters
-
void TerrainRenderer::Submit |
( |
int |
cullGroup, |
|
|
CModelDecal * |
decal |
|
) |
| |
Submit: Add a terrain decal for rendering in this frame.
The documentation for this class was generated from the following files: