Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::SceneRenderer Class Reference

Orchestrates the full Illumine render pipeline for a single scene. More...

#include <SceneRenderer.h>

Public Member Functions

FRAMEWORK_API void Init ()
 Allocates all GPU resources and initialises every render pass.
FRAMEWORK_API void Shutdown ()
 Releases all GPU resources and saves renderer settings.
FRAMEWORK_API void BeginScene (Ref< Scene > scene)
 Sets the scene to render and begins the Renderer2D frame.
FRAMEWORK_API void ResetFrameData ()
 Clears per-frame light SSBOs and resets the active cubemap to the default.
FRAMEWORK_API void EndScene (const Camera &camera)
 Uploads per-frame GPU data and executes the full render pipeline.
Ref< RenderPassGetFinalRenderPass ()
 Returns the render pass that produces the final HDR geometry output.
Ref< Image2DGetFinalImage ()
 Returns the tone-mapped LDR output image ready for display or ImGui.
Ref< Image2DGetShadowImage ()
 Returns the shadow depth map produced by ShadowPass.
RendererFeaturesGetFeatures ()
 Returns a mutable reference to the toggleable renderer feature flags.
ShadowSettingsGetShadowSettings ()
 Returns a mutable reference to the shadow pass configuration.
ShaderSettingsDataGetSettings ()
 Returns a mutable reference to the geometry pass shader settings.
ToneMapDataGetToneMapData ()
 Returns a mutable reference to the tone mapping parameters.
HBAOSettingsGetHBAOSettings ()
 Returns a mutable reference to the HBAO ambient occlusion settings.
FRAMEWORK_API void LoadRendererSettings ()
 Deserialises renderer settings from the project configuration file.
FRAMEWORK_API void SaveRendererSettings ()
 Serialises renderer settings to the project configuration file.
FRAMEWORK_API void RecreateShadowMap (u32 newSize)
 Schedules a shadow map resolution change for the next frame boundary.

Detailed Description

Orchestrates the full Illumine render pipeline for a single scene.

SceneRenderer owns all render and compute passes and the shared GPU resources (UBOs, SSBOs, cubemaps) consumed by those passes. Each frame the caller invokes BeginScene and EndScene.

Member Function Documentation

◆ BeginScene()

void Raven::SceneRenderer::BeginScene ( Ref< Scene > scene)

Sets the scene to render and begins the Renderer2D frame.

Parameters
sceneThe scene whose entities will be submitted this frame.

◆ EndScene()

void Raven::SceneRenderer::EndScene ( const Camera & camera)

Uploads per-frame GPU data and executes the full render pipeline.

Uploads the camera matrices, light environment, and shader settings, then dispatches all passes in dependency order. The tone-mapped result is available via GetFinalImage after this call returns.

Parameters
cameraCamera whose view/projection matrices drive the frame.

◆ GetFeatures()

RendererFeatures & Raven::SceneRenderer::GetFeatures ( )
inline

Returns a mutable reference to the toggleable renderer feature flags.

◆ GetFinalImage()

Ref< Image2D > Raven::SceneRenderer::GetFinalImage ( )
inline

Returns the tone-mapped LDR output image ready for display or ImGui.

Returns
Output image from ToneMapPass.

◆ GetFinalRenderPass()

Ref< RenderPass > Raven::SceneRenderer::GetFinalRenderPass ( )
inline

Returns the render pass that produces the final HDR geometry output.

Returns
The geometry pass's RenderPass.

◆ GetHBAOSettings()

HBAOSettings & Raven::SceneRenderer::GetHBAOSettings ( )
inline

Returns a mutable reference to the HBAO ambient occlusion settings.

◆ GetSettings()

ShaderSettingsData & Raven::SceneRenderer::GetSettings ( )
inline

Returns a mutable reference to the geometry pass shader settings.

◆ GetShadowImage()

Ref< Image2D > Raven::SceneRenderer::GetShadowImage ( )
inline

Returns the shadow depth map produced by ShadowPass.

Returns
Shadow map image.

◆ GetShadowSettings()

ShadowSettings & Raven::SceneRenderer::GetShadowSettings ( )
inline

Returns a mutable reference to the shadow pass configuration.

◆ GetToneMapData()

ToneMapData & Raven::SceneRenderer::GetToneMapData ( )
inline

Returns a mutable reference to the tone mapping parameters.

◆ Init()

void Raven::SceneRenderer::Init ( )

Allocates all GPU resources and initialises every render pass.

Must be called once before any scene is rendered. Loads persisted renderer settings via LoadRendererSettings.

◆ LoadRendererSettings()

void Raven::SceneRenderer::LoadRendererSettings ( )

Deserialises renderer settings from the project configuration file.

◆ RecreateShadowMap()

void Raven::SceneRenderer::RecreateShadowMap ( u32 newSize)

Schedules a shadow map resolution change for the next frame boundary.

Parameters
newSizeNew shadow map resolution in pixels (square).

◆ ResetFrameData()

void Raven::SceneRenderer::ResetFrameData ( )

Clears per-frame light SSBOs and resets the active cubemap to the default.

Call once when the scene is changed.

◆ SaveRendererSettings()

void Raven::SceneRenderer::SaveRendererSettings ( )

Serialises renderer settings to the project configuration file.

◆ Shutdown()

void Raven::SceneRenderer::Shutdown ( )

Releases all GPU resources and saves renderer settings.


The documentation for this class was generated from the following files: