23#ifndef INCLUDED_TERRAINRENDERER
24#define INCLUDED_TERRAINRENDERER
Definition: BoundingBoxAligned.h:34
Definition: Canvas2D.h:36
Definition: DecalRData.h:36
Definition: PatchRData.h:42
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
Definition: ShaderDefines.h:147
Public API for simulation system.
Definition: Simulation2.h:47
Definition: Vector2D.h:32
Definition: IDeviceCommandContext.h:42
IShaderProgram is a container for multiple shaders of different types.
Definition: IShaderProgram.h:81
Definition: ITexture.h:34
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup,...
Definition: ShadowMap.h:39
Class TerrainRenderer: Render everything related to the terrain, especially patches and water.
Definition: TerrainRenderer.h:49
void RenderPriorities(CCanvas2D &canvas, int cullGroup)
Render priority text for all submitted patches, for debugging.
Definition: TerrainRenderer.cpp:777
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.
Definition: TerrainRenderer.cpp:367
void Initialize()
Definition: TerrainRenderer.cpp:118
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.
Definition: TerrainRenderer.cpp:714
void EndFrame()
EndFrame: Remove all patches from the list of submitted patches.
Definition: TerrainRenderer.cpp:196
void SetSimulation(CSimulation2 *simulation)
Set the simulation context for this frame.
Definition: TerrainRenderer.cpp:144
void Submit(int cullGroup, CPatch *patch)
Submit: Add a patch for rendering in this frame.
Definition: TerrainRenderer.cpp:151
TerrainRendererInternals * m
Definition: TerrainRenderer.h:175
~TerrainRenderer()
Definition: TerrainRenderer.cpp:113
void PrepareForRendering()
PrepareForRendering: Prepare internal data structures like vertex buffers for rendering.
Definition: TerrainRenderer.cpp:187
void RenderWaterFoamOccluders(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
Renders terrain to a framebuffer to occlude shore foams.
Definition: TerrainRenderer.cpp:726
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.
Definition: TerrainRenderer.cpp:209
void RenderTerrainShader(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup, ShadowMap *shadow)
Render textured terrain (including blends between different terrain types).
Definition: TerrainRenderer.cpp:315
bool RenderFancyWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup, ShadowMap *shadow)
RenderFancyWater: internal rendering method for fancy water.
Definition: TerrainRenderer.cpp:442
void RenderOutlines(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
RenderOutlines: Render the outline of patches as lines.
Definition: TerrainRenderer.cpp:401
CBoundingBoxAligned ScissorWater(int cullGroup, const CCamera &camera)
Calculate a scissor rectangle for the visible water patches.
Definition: TerrainRenderer.cpp:420
static void PrepareShader(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Renderer::Backend::IShaderProgram *shader, ShadowMap *shadow)
Set up all the uniforms for a shader pass.
Definition: TerrainRenderer.cpp:272
TerrainRenderer()
Definition: TerrainRenderer.cpp:107
void RenderSimpleWater(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
RenderSimpleWater: internal rendering method for water.
Definition: TerrainRenderer.cpp:659
Struct TerrainRendererInternals: Internal variables used by the TerrainRenderer class.
Definition: TerrainRenderer.cpp:72