18#ifndef INCLUDED_RENDERER_SCENERENDERER
19#define INCLUDED_RENDERER_SCENERENDERER
72 void Resize(
int width,
int height);
268 std::unique_ptr<Internals>
m;
ETransparentMode
Definition: SceneRenderer.h:49
@ TRANSPARENT
Definition: SceneRenderer.h:49
@ TRANSPARENT_OPAQUE
Definition: SceneRenderer.h:49
@ TRANSPARENT_BLEND
Definition: SceneRenderer.h:49
ERenderMode
Definition: SceneRenderer.h:46
@ SOLID
Definition: SceneRenderer.h:46
@ EDGED_FACES
Definition: SceneRenderer.h:46
@ WIREFRAME
Definition: SceneRenderer.h:46
Definition: BoundingBoxAligned.h:34
Definition: Canvas2D.h:36
Class CLightEnv: description of a lighting environment - contains all the necessary parameters for re...
Definition: LightEnv.h:37
Definition: MaterialManager.h:26
Definition: Material.h:29
Particle emitter.
Definition: ParticleEmitter.h:69
Definition: ParticleManager.h:31
Definition: SceneRenderer.h:52
CBoundingBoxAligned m_WaterScissor
Definition: SceneRenderer.h:297
void SetWaterRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:143
void PrepareSubmissions(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CBoundingBoxAligned &waterScissor)
Update and upload all needed data for submitted objects.
Definition: SceneRenderer.cpp:773
void RenderPatches(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup)
Definition: SceneRenderer.cpp:340
void RenderTransparentModels(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup, ETransparentMode transparentMode)
Definition: SceneRenderer.cpp:393
ERenderMode GetTerrainRenderMode() const
Definition: SceneRenderer.h:140
void ComputeRefractionCamera(CCamera &camera, const CBoundingBoxAligned &scissor) const
Definition: SceneRenderer.cpp:510
void Submit(CPatch *patch) override
Submit a terrain patch that is part of the scene.
Definition: SceneRenderer.cpp:961
CMaterialManager & GetMaterialManager()
Definition: SceneRenderer.cpp:1193
CSceneRenderer(Renderer::Backend::IDevice *device)
Definition: SceneRenderer.cpp:192
void SubmitNonRecursive(CModel *model) override
Submit a model that is part of the scene, without submitting attached models.
Definition: SceneRenderer.cpp:1025
const CLightEnv & GetLightEnv()
Definition: SceneRenderer.h:161
ERenderMode GetWaterRenderMode() const
Definition: SceneRenderer.h:145
void SetViewCamera(const CCamera &camera)
Definition: SceneRenderer.h:166
ERenderMode m_OverlayRenderMode
Definition: SceneRenderer.h:277
void SetModelRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:148
void RenderScene(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Render submitted objects of the previously given scene.
Definition: SceneRenderer.cpp:1139
std::unique_ptr< Internals > m
Definition: SceneRenderer.h:268
void Resize(int width, int height)
Definition: SceneRenderer.cpp:278
Scene & GetScene()
Return the scene that is currently being rendered.
Definition: SceneRenderer.cpp:1162
SkyManager & GetSkyManager()
GetSkyManager: Return the renderer's sky manager.
Definition: SceneRenderer.cpp:1178
void RenderRefractions(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, const CBoundingBoxAligned &scissor)
Definition: SceneRenderer.cpp:625
void SetDisplayTerrainPriorities(bool enabled)
Definition: SceneRenderer.h:158
ERenderMode m_WaterRenderMode
Definition: SceneRenderer.h:273
const CCamera & GetViewCamera() const
Definition: SceneRenderer.h:164
TerrainRenderer & GetTerrainRenderer()
Definition: SceneRenderer.cpp:1188
ShadowMap & GetShadowMap()
Definition: SceneRenderer.cpp:1198
ERenderMode GetModelRenderMode() const
Definition: SceneRenderer.h:150
void RenderShadowMap(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context)
Definition: SceneRenderer.cpp:299
CParticleManager & GetParticleManager()
Definition: SceneRenderer.cpp:1183
void RenderSilhouettes(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context)
Definition: SceneRenderer.cpp:702
const CCamera & GetCullCamera() const
Definition: SceneRenderer.h:169
void ResetState()
Resets the render state to default, that was before a game started.
Definition: SceneRenderer.cpp:1203
CCamera m_CullCamera
m_CullCamera: determines the frustum for culling and shadowmap calculations
Definition: SceneRenderer.h:291
ERenderMode GetOverlayRenderMode() const
Definition: SceneRenderer.h:153
void SetSimulation(CSimulation2 *simulation)
Set simulation context for rendering purposes.
Definition: SceneRenderer.cpp:293
CCamera m_ViewCamera
m_ViewCamera: determines the eye position for rendering
Definition: SceneRenderer.h:284
void RenderReflections(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, const CBoundingBoxAligned &scissor)
Definition: SceneRenderer.cpp:548
void DisplayFrustum()
Definition: SceneRenderer.cpp:934
void PrepareScene(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Scene &scene)
Enumerate and submit all objects of the given scene which should be rendered.
Definition: SceneRenderer.cpp:1064
void SetObliqueFrustumClipping(CCamera &camera, const CVector4D &clipPlane) const
Definition: SceneRenderer.cpp:432
void RenderParticles(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
Definition: SceneRenderer.cpp:755
CullGroup
Definition: SceneRenderer.h:55
@ CULL_SHADOWS_CASCADE_2
Definition: SceneRenderer.h:59
@ CULL_SHADOWS_CASCADE_3
Definition: SceneRenderer.h:60
@ CULL_DEFAULT
Definition: SceneRenderer.h:56
@ CULL_SHADOWS_CASCADE_0
Definition: SceneRenderer.h:57
@ CULL_SILHOUETTE_CASTER
Definition: SceneRenderer.h:64
@ CULL_SILHOUETTE_OCCLUDER
Definition: SceneRenderer.h:63
@ CULL_REFRACTIONS
Definition: SceneRenderer.h:62
@ CULL_REFLECTIONS
Definition: SceneRenderer.h:61
@ CULL_MAX
Definition: SceneRenderer.h:65
@ CULL_SHADOWS_CASCADE_1
Definition: SceneRenderer.h:58
WaterManager & GetWaterManager()
GetWaterManager: Return the renderer's water manager.
Definition: SceneRenderer.cpp:1173
CLightEnv * m_LightEnv
Definition: SceneRenderer.h:300
void MakeShadersDirty()
Definition: SceneRenderer.cpp:1168
ERenderMode m_TerrainRenderMode
Definition: SceneRenderer.h:271
void RenderTextOverlays(CCanvas2D &canvas)
Render text overlays on top of the scene.
Definition: SceneRenderer.cpp:941
void BeginFrame()
Definition: SceneRenderer.cpp:286
void SetSceneCamera(const CCamera &viewCamera, const CCamera &cullCamera)
Set up the camera used for rendering the next scene; this includes setting OpenGL state like viewport...
Definition: SceneRenderer.cpp:952
ERenderMode m_ModelRenderMode
Definition: SceneRenderer.h:275
void SetLightEnv(CLightEnv *lightenv)
Definition: SceneRenderer.h:132
void RenderModels(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup)
Definition: SceneRenderer.cpp:370
void SetTerrainRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:138
int m_CurrentCullGroup
Definition: SceneRenderer.h:295
void EndFrame()
Definition: SceneRenderer.cpp:917
void SetOverlayRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:155
void ComputeReflectionCamera(CCamera &camera, const CBoundingBoxAligned &scissor) const
Definition: SceneRenderer.cpp:465
bool m_DisplayTerrainPriorities
Enable rendering of terrain tile priority text overlay, for debugging.
Definition: SceneRenderer.h:305
Scene * m_CurrentScene
Definition: SceneRenderer.h:294
void Initialize()
Definition: SceneRenderer.cpp:268
void RenderSubmissions(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CBoundingBoxAligned &waterScissor)
Definition: SceneRenderer.cpp:844
~CSceneRenderer()
Definition: SceneRenderer.cpp:208
void RenderSceneOverlays(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Render overlays of the previously given scene.
Definition: SceneRenderer.cpp:1146
void ReloadShaders(Renderer::Backend::IDevice *device)
Definition: SceneRenderer.cpp:216
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: Vector4D.h:31
Definition: IDeviceCommandContext.h:42
This interface accepts renderable objects.
Definition: Scene.h:90
This interface describes a scene to the renderer.
Definition: Scene.h:54
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup,...
Definition: ShadowMap.h:39
Class SkyManager: Maintain sky settings and textures, and render the sky.
Definition: SkyManager.h:38
Class TerrainRenderer: Render everything related to the terrain, especially patches and water.
Definition: TerrainRenderer.h:49
Class WaterManager: Maintain rendering-related water settings and textures Anything that affects game...
Definition: WaterManager.h:48
Line-based overlay, with world-space coordinates, rendered in the world potentially behind other obje...
Definition: Overlay.h:39
Rectangular single-quad terrain overlay, in world space coordinates.
Definition: Overlay.h:161
Definition: Overlay.h:169
Billboard sprite overlay, with world-space coordinates, rendered on top of all other objects.
Definition: Overlay.h:148
Textured line overlay, with world-space coordinates, rendered in the world onto the terrain.
Definition: Overlay.h:66