Class TerrainRenderer: Render everything related to the terrain, especially patches and water.
More...
#include <TerrainRenderer.h>
|
| TerrainRenderer () |
|
| ~TerrainRenderer () |
|
void | Initialize () |
|
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 | RenderTerrainShader (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup, ShadowMap *shadow) |
| Render textured terrain (including blends between different terrain types). More...
|
|
void | RenderPatches (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup, const CShaderDefines &defines, const CColor &color=CColor(0.0f, 0.0f, 0.0f, 1.0f)) |
| RenderPatches: Render all patches un-textured as polygons. More...
|
|
void | RenderOutlines (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup) |
| RenderOutlines: Render the outline of patches as lines. More...
|
|
void | RenderWater (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup, ShadowMap *shadow) |
| RenderWater: Render water for all patches that have been submitted this frame. More...
|
|
void | RenderWaterFoamOccluders (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup) |
| Renders terrain to a framebuffer to occlude shore foams. More...
|
|
CBoundingBoxAligned | ScissorWater (int cullGroup, const CCamera &camera) |
| Calculate a scissor rectangle for the visible water patches. More...
|
|
void | RenderPriorities (CCanvas2D &canvas, int cullGroup) |
| Render priority text for all submitted patches, for debugging. More...
|
|
void | RenderTerrainOverlayTexture (Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup, const CVector2D &textureTransform, Renderer::Backend::ITexture *texture) |
| 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()
TerrainRenderer::~TerrainRenderer |
( |
| ) |
|
◆ EndFrame()
void TerrainRenderer::EndFrame |
( |
| ) |
|
EndFrame: Remove all patches from the list of submitted patches.
◆ Initialize()
void TerrainRenderer::Initialize |
( |
| ) |
|
◆ PrepareForRendering()
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.
◆ PrepareShader()
Set up all the uniforms for a shader pass.
◆ RenderFancyWater()
RenderFancyWater: internal rendering method for fancy water.
Returns false if unable to render with fancy water.
◆ RenderOutlines()
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. |
◆ RenderPatches()
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. |
color | Fill color of the patches. |
◆ RenderPriorities()
void TerrainRenderer::RenderPriorities |
( |
CCanvas2D & |
canvas, |
|
|
int |
cullGroup |
|
) |
| |
Render priority text for all submitted patches, for debugging.
◆ RenderSimpleWater()
RenderSimpleWater: internal rendering method for water.
◆ RenderTerrainOverlayTexture()
Render texture unit 0 over the terrain mesh, with UV coords calculated by the given texture matrix.
Intended for use by TerrainTextureOverlay.
◆ RenderTerrainShader()
Render textured terrain (including blends between different terrain types).
preconditions : PrepareForRendering must have been called this frame before calling RenderTerrain.
- Parameters
-
deviceCommandContext | A context to submit commands. |
shadow | A prepared shadow map, in case rendering with shadows is enabled. |
◆ RenderWater()
RenderWater: Render water for all patches that have been submitted this frame.
preconditions : PrepareForRendering must have been called this frame before calling RenderWater.
◆ RenderWaterFoamOccluders()
Renders terrain to a framebuffer to occlude shore foams.
◆ ScissorWater()
Calculate a scissor rectangle for the visible water patches.
◆ SetSimulation()
void TerrainRenderer::SetSimulation |
( |
CSimulation2 * |
simulation | ) |
|
Set the simulation context for this frame.
Call at start of frame, before any other Submits.
◆ Submit() [1/2]
void TerrainRenderer::Submit |
( |
int |
cullGroup, |
|
|
CModelDecal * |
decal |
|
) |
| |
Submit: Add a terrain decal for rendering in this frame.
◆ Submit() [2/2]
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
-
◆ CDecalRData
◆ CPatchRData
The documentation for this class was generated from the following files: