18 #ifndef INCLUDED_RENDERER_SCENERENDERER 19 #define INCLUDED_RENDERER_SCENERENDERER 72 void Resize(
int width,
int height);
268 std::unique_ptr<Internals>
m;
308 #endif // INCLUDED_RENDERER_SCENERENDERER void PrepareSubmissions(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CBoundingBoxAligned &waterScissor)
Update and upload all needed data for submitted objects.
Definition: SceneRenderer.cpp:772
void SetDisplayTerrainPriorities(bool enabled)
Definition: SceneRenderer.h:158
ERenderMode GetTerrainRenderMode() const
Definition: SceneRenderer.h:140
Line-based overlay, with world-space coordinates, rendered in the world potentially behind other obje...
Definition: Overlay.h:38
void ResetState()
Resets the render state to default, that was before a game started.
Definition: SceneRenderer.cpp:1202
Particle emitter.
Definition: ParticleEmitter.h:68
void RenderShadowMap(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context)
Definition: SceneRenderer.cpp:298
void ReloadShaders()
Definition: SceneRenderer.cpp:213
void MakeShadersDirty()
Definition: SceneRenderer.cpp:1167
void SetLightEnv(CLightEnv *lightenv)
Definition: SceneRenderer.h:132
CCamera m_ViewCamera
m_ViewCamera: determines the eye position for rendering
Definition: SceneRenderer.h:284
CBoundingBoxAligned m_WaterScissor
Definition: SceneRenderer.h:297
void SetSimulation(CSimulation2 *simulation)
Set simulation context for rendering purposes.
Definition: SceneRenderer.cpp:292
void RenderParticles(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, int cullGroup)
Definition: SceneRenderer.cpp:754
ERenderMode m_WaterRenderMode
Definition: SceneRenderer.h:273
Definition: SceneRenderer.h:61
Definition: SceneRenderer.h:59
int m_CurrentCullGroup
Definition: SceneRenderer.h:295
CullGroup
Definition: SceneRenderer.h:54
Billboard sprite overlay, with world-space coordinates, rendered on top of all other objects...
Definition: Overlay.h:147
Definition: SceneRenderer.h:49
void RenderTransparentModels(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup, ETransparentMode transparentMode)
Definition: SceneRenderer.cpp:392
Class ShadowMap: Maintain the shadow map texture and perform necessary OpenGL setup, including matrix calculations.
Definition: ShadowMap.h:38
ERenderMode GetModelRenderMode() const
Definition: SceneRenderer.h:150
void SetModelRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:148
Struct CSceneRendererInternals: Truly hide data that is supposed to be hidden in this structure so it...
Definition: SceneRenderer.cpp:75
Definition: SceneRenderer.h:46
Definition: Material.h:28
Public API for simulation system.
Definition: Simulation2.h:46
Definition: SceneRenderer.h:64
Definition: Vector4D.h:30
This interface accepts renderable objects.
Definition: Scene.h:89
~CSceneRenderer()
Definition: SceneRenderer.cpp:205
void ComputeRefractionCamera(CCamera &camera, const CBoundingBoxAligned &scissor) const
Definition: SceneRenderer.cpp:509
const CCamera & GetViewCamera() const
Definition: SceneRenderer.h:164
Definition: SceneRenderer.h:51
void SetWaterRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:143
ERenderMode m_ModelRenderMode
Definition: SceneRenderer.h:275
void RenderSceneOverlays(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Render overlays of the previously given scene.
Definition: SceneRenderer.cpp:1145
Textured line overlay, with world-space coordinates, rendered in the world onto the terrain...
Definition: Overlay.h:65
Definition: SceneRenderer.h:60
std::unique_ptr< Internals > m
Definition: SceneRenderer.h:267
void ComputeReflectionCamera(CCamera &camera, const CBoundingBoxAligned &scissor) const
Definition: SceneRenderer.cpp:464
void RenderSilhouettes(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context)
Definition: SceneRenderer.cpp:701
void SetObliqueFrustumClipping(CCamera &camera, const CVector4D &clipPlane) const
Definition: SceneRenderer.cpp:431
void PrepareScene(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, Scene &scene)
Enumerate and submit all objects of the given scene which should be rendered.
Definition: SceneRenderer.cpp:1063
Definition: SceneRenderer.h:56
Definition: Canvas2D.h:35
Scene * m_CurrentScene
Definition: SceneRenderer.h:294
CLightEnv * m_LightEnv
Definition: SceneRenderer.h:300
void DisplayFrustum()
Definition: SceneRenderer.cpp:933
Definition: SceneRenderer.h:46
ERenderMode m_OverlayRenderMode
Definition: SceneRenderer.h:277
void Initialize()
Definition: SceneRenderer.cpp:267
ETransparentMode
Definition: SceneRenderer.h:49
Definition: ParticleManager.h:30
void RenderSubmissions(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CBoundingBoxAligned &waterScissor)
Definition: SceneRenderer.cpp:843
TerrainRenderer & GetTerrainRenderer()
Definition: SceneRenderer.cpp:1187
void RenderRefractions(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, const CBoundingBoxAligned &scissor)
Definition: SceneRenderer.cpp:624
CMaterialManager & GetMaterialManager()
Definition: SceneRenderer.cpp:1192
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
Definition: ShaderDefines.h:146
void BeginFrame()
Definition: SceneRenderer.cpp:285
Definition: SceneRenderer.h:58
Rectangular single-quad terrain overlay, in world space coordinates.
Definition: Overlay.h:160
ShadowMap & GetShadowMap()
Definition: SceneRenderer.cpp:1197
Definition: SceneRenderer.h:49
Definition: SceneRenderer.h:65
void RenderTextOverlays(CCanvas2D &canvas)
Render text overlays on top of the scene.
Definition: SceneRenderer.cpp:940
Definition: BoundingBoxAligned.h:33
void RenderModels(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup)
Definition: SceneRenderer.cpp:369
void EndFrame()
Definition: SceneRenderer.cpp:916
CSceneRenderer()
Definition: SceneRenderer.cpp:189
void SetViewCamera(const CCamera &camera)
Definition: SceneRenderer.h:166
bool m_DisplayTerrainPriorities
Enable rendering of terrain tile priority text overlay, for debugging.
Definition: SceneRenderer.h:305
This interface describes a scene to the renderer.
Definition: Scene.h:53
void Resize(int width, int height)
Definition: SceneRenderer.cpp:277
void RenderPatches(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, int cullGroup)
Definition: SceneRenderer.cpp:339
const CLightEnv & GetLightEnv()
Definition: SceneRenderer.h:161
Definition: SceneRenderer.h:63
Class TerrainRenderer: Render everything related to the terrain, especially patches and water...
Definition: TerrainRenderer.h:48
Definition: SceneRenderer.h:46
ERenderMode
Definition: SceneRenderer.h:46
void Submit(CPatch *patch) override
Submit a terrain patch that is part of the scene.
Definition: SceneRenderer.cpp:960
ERenderMode GetOverlayRenderMode() const
Definition: SceneRenderer.h:153
const CCamera & GetCullCamera() const
Definition: SceneRenderer.h:169
Definition: MaterialManager.h:25
SkyManager & GetSkyManager()
GetSkyManager: Return the renderer's sky manager.
Definition: SceneRenderer.cpp:1177
CParticleManager & GetParticleManager()
Definition: SceneRenderer.cpp:1182
WaterManager & GetWaterManager()
GetWaterManager: Return the renderer's water manager.
Definition: SceneRenderer.cpp:1172
Definition: SceneRenderer.h:57
CCamera m_CullCamera
m_CullCamera: determines the frustum for culling and shadowmap calculations
Definition: SceneRenderer.h:291
void SetTerrainRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:138
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:951
Class CLightEnv: description of a lighting environment - contains all the necessary parameters for re...
Definition: LightEnv.h:36
void RenderReflections(Renderer::Backend::IDeviceCommandContext *deviceCommandContext, const CShaderDefines &context, const CBoundingBoxAligned &scissor)
Definition: SceneRenderer.cpp:547
Scene & GetScene()
Return the scene that is currently being rendered.
Definition: SceneRenderer.cpp:1161
Definition: SceneRenderer.h:62
Definition: IDeviceCommandContext.h:40
void RenderScene(Renderer::Backend::IDeviceCommandContext *deviceCommandContext)
Render submitted objects of the previously given scene.
Definition: SceneRenderer.cpp:1138
void SubmitNonRecursive(CModel *model) override
Submit a model that is part of the scene, without submitting attached models.
Definition: SceneRenderer.cpp:1024
Definition: Overlay.h:168
ERenderMode m_TerrainRenderMode
Definition: SceneRenderer.h:271
ERenderMode GetWaterRenderMode() const
Definition: SceneRenderer.h:145
Definition: SceneRenderer.h:49
void SetOverlayRenderMode(ERenderMode mode)
Definition: SceneRenderer.h:155
Class WaterManager: Maintain rendering-related water settings and textures Anything that affects game...
Definition: WaterManager.h:47
Class SkyManager: Maintain sky settings and textures, and render the sky.
Definition: SkyManager.h:37