MAGE  v0.171.0
Matthias Advanced Game Engine
mage::rendering::Renderer::Impl Class Reference

Public Member Functions

 Impl (ID3D11Device &device, ID3D11DeviceContext &device_context, DisplayConfiguration &display_configuration, SwapChain &swap_chain, ResourceManager &resource_manager)
 
 Impl (const Impl &renderer)=delete
 
 Impl (Impl &&renderer) noexcept
 
 ~Impl ()
 
Imploperator= (const Impl &renderer)=delete
 
Imploperator= (Impl &&renderer) noexcept
 
void BindPersistentState ()
 
void Render (const World &world, const GameTime &time)
 

Private Member Functions

void InitializePasses ()
 
void UpdateBuffers (const World &world, const GameTime &time)
 
void UpdateWorldBuffer (const GameTime &time)
 
void Render (const World &world, const Camera &camera)
 
void XM_CALLCONV RenderForward (const World &world, const Camera &camera, FXMMATRIX world_to_projection)
 
void XM_CALLCONV RenderDeferred (const World &world, const Camera &camera, FXMMATRIX world_to_projection)
 
void XM_CALLCONV RenderSolid (const World &world, const Camera &camera, FXMMATRIX world_to_projection)
 
void XM_CALLCONV RenderFalseColor (const World &world, const Camera &camera, FXMMATRIX world_to_projection, FalseColor false_color)
 
void XM_CALLCONV RenderVoxelGrid (const World &world, const Camera &camera, FXMMATRIX world_to_projection)
 
void RenderAA (const Camera &camera)
 
void RenderPostProcessing (const Camera &camera)
 

Private Attributes

std::reference_wrapper< DisplayConfigurationm_display_configuration
 
std::reference_wrapper< ID3D11Device > m_device
 
std::reference_wrapper< ID3D11DeviceContext > m_device_context
 
std::reference_wrapper< ResourceManagerm_resource_manager
 
UniquePtr< OutputManagerm_output_manager
 
UniquePtr< StateManagerm_state_manager
 
ConstantBuffer< WorldBufferm_world_buffer
 
UniquePtr< AAPassm_aa_pass
 
UniquePtr< BackBufferPassm_back_buffer_pass
 
UniquePtr< BoundingVolumePassm_bounding_volume_pass
 
UniquePtr< DeferredPassm_deferred_pass
 
UniquePtr< DepthPassm_depth_pass
 
UniquePtr< ForwardPassm_forward_pass
 
UniquePtr< LBufferPassm_lbuffer_pass
 
UniquePtr< PostProcessPassm_postprocess_pass
 
UniquePtr< SkyPassm_sky_pass
 
UniquePtr< SpritePassm_sprite_pass
 
UniquePtr< VoxelGridPassm_voxel_grid_pass
 
UniquePtr< VoxelizationPassm_voxelization_pass
 

Detailed Description

A class of renderers.

Constructor & Destructor Documentation

◆ Impl() [1/3]

mage::rendering::Renderer::Impl::Impl ( ID3D11Device &  device,
ID3D11DeviceContext &  device_context,
DisplayConfiguration display_configuration,
SwapChain swap_chain,
ResourceManager resource_manager 
)
explicit

Constructs a renderer.

Parameters
[in,out]deviceA reference to the device.
[in,out]device_contextA reference to the device context.
[in,out]display_configurationA reference to the display configuration.
[in,out]swap_chainA reference to the swap chain.
[in,out]resource_managerA pointer to the resource manager.

◆ Impl() [2/3]

mage::rendering::Renderer::Impl::Impl ( const Impl renderer)
delete

Constructs a renderer from the given renderer.

Parameters
[in]rendererA reference to the renderer to copy.

◆ Impl() [3/3]

mage::rendering::Renderer::Impl::Impl ( Impl &&  renderer)
defaultnoexcept

Constructs a renderer by moving the given renderer.

Parameters
[in]rendererA reference to the renderer to move.

◆ ~Impl()

mage::rendering::Renderer::Impl::~Impl ( )
default

Destructs this renderer.

Member Function Documentation

◆ BindPersistentState()

void mage::rendering::Renderer::Impl::BindPersistentState ( )

Binds the persistent state of this renderer.

Exceptions
ExceptionFailed to bind the persistent state of this renderer.

◆ InitializePasses()

void mage::rendering::Renderer::Impl::InitializePasses ( )
private

◆ operator=() [1/2]

Impl& mage::rendering::Renderer::Impl::operator= ( const Impl renderer)
delete

Copies the given renderer to this renderer.

Parameters
[in]rendererA reference to the renderer to copy.
Returns
A reference to the copy of the given renderer (i.e. this renderer).

◆ operator=() [2/2]

Renderer::Impl & mage::rendering::Renderer::Impl::operator= ( Impl &&  renderer)
defaultnoexcept

Moves the given renderer to this renderer.

Parameters
[in]rendererA reference to the renderer to move.
Returns
A reference to the moved renderer (i.e. this renderer).

◆ Render() [1/2]

void mage::rendering::Renderer::Impl::Render ( const World world,
const GameTime time 
)

Renders the given world.

Parameters
[in]worldA reference to the world.
[in]timeA reference to the game time.
Exceptions
ExceptionFailed to render the world.

◆ Render() [2/2]

void mage::rendering::Renderer::Impl::Render ( const World world,
const Camera camera 
)
private

◆ RenderAA()

void mage::rendering::Renderer::Impl::RenderAA ( const Camera camera)
private

◆ RenderDeferred()

void XM_CALLCONV mage::rendering::Renderer::Impl::RenderDeferred ( const World world,
const Camera camera,
FXMMATRIX  world_to_projection 
)
private

◆ RenderFalseColor()

void XM_CALLCONV mage::rendering::Renderer::Impl::RenderFalseColor ( const World world,
const Camera camera,
FXMMATRIX  world_to_projection,
FalseColor  false_color 
)
private

◆ RenderForward()

void XM_CALLCONV mage::rendering::Renderer::Impl::RenderForward ( const World world,
const Camera camera,
FXMMATRIX  world_to_projection 
)
private

◆ RenderPostProcessing()

void mage::rendering::Renderer::Impl::RenderPostProcessing ( const Camera camera)
private

◆ RenderSolid()

void XM_CALLCONV mage::rendering::Renderer::Impl::RenderSolid ( const World world,
const Camera camera,
FXMMATRIX  world_to_projection 
)
private

◆ RenderVoxelGrid()

void XM_CALLCONV mage::rendering::Renderer::Impl::RenderVoxelGrid ( const World world,
const Camera camera,
FXMMATRIX  world_to_projection 
)
private

◆ UpdateBuffers()

void mage::rendering::Renderer::Impl::UpdateBuffers ( const World world,
const GameTime time 
)
private

◆ UpdateWorldBuffer()

void mage::rendering::Renderer::Impl::UpdateWorldBuffer ( const GameTime time)
private

Member Data Documentation

◆ m_aa_pass

UniquePtr< AAPass > mage::rendering::Renderer::Impl::m_aa_pass
private

A pointer to the AA pass of this renderer.

◆ m_back_buffer_pass

UniquePtr< BackBufferPass > mage::rendering::Renderer::Impl::m_back_buffer_pass
private

A pointer to the back buffer pass of this renderer.

◆ m_bounding_volume_pass

UniquePtr< BoundingVolumePass > mage::rendering::Renderer::Impl::m_bounding_volume_pass
private

A pointer to the bounding volume pass of this renderer.

◆ m_deferred_pass

UniquePtr< DeferredPass > mage::rendering::Renderer::Impl::m_deferred_pass
private

A pointer to the deferred pass of this renderer.

◆ m_depth_pass

UniquePtr< DepthPass > mage::rendering::Renderer::Impl::m_depth_pass
private

A pointer to the depth pass of this renderer.

◆ m_device

std::reference_wrapper< ID3D11Device > mage::rendering::Renderer::Impl::m_device
private

A reference to the device of this renderer.

◆ m_device_context

std::reference_wrapper< ID3D11DeviceContext > mage::rendering::Renderer::Impl::m_device_context
private

A reference to the device context of this renderer.

◆ m_display_configuration

std::reference_wrapper< DisplayConfiguration > mage::rendering::Renderer::Impl::m_display_configuration
private

A reference to the display configuration of this renderer.

◆ m_forward_pass

UniquePtr< ForwardPass > mage::rendering::Renderer::Impl::m_forward_pass
private

A pointer to the forward pass of this renderer.

◆ m_lbuffer_pass

UniquePtr< LBufferPass > mage::rendering::Renderer::Impl::m_lbuffer_pass
private

A pointer to the LBuffer pass of this renderer.

◆ m_output_manager

UniquePtr< OutputManager > mage::rendering::Renderer::Impl::m_output_manager
private

A pointer to the output manager of this rendering manager.

◆ m_postprocess_pass

UniquePtr< PostProcessPass > mage::rendering::Renderer::Impl::m_postprocess_pass
private

A pointer to the post-process pass of this renderer.

◆ m_resource_manager

std::reference_wrapper< ResourceManager > mage::rendering::Renderer::Impl::m_resource_manager
private

A reference to the resource manager of this renderer.

◆ m_sky_pass

UniquePtr< SkyPass > mage::rendering::Renderer::Impl::m_sky_pass
private

A pointer to the sky pass of this renderer.

◆ m_sprite_pass

UniquePtr< SpritePass > mage::rendering::Renderer::Impl::m_sprite_pass
private

A pointer to the sprite pass of this renderer.

◆ m_state_manager

UniquePtr< StateManager > mage::rendering::Renderer::Impl::m_state_manager
private

A pointer to the state manager of this rendering manager.

◆ m_voxel_grid_pass

UniquePtr< VoxelGridPass > mage::rendering::Renderer::Impl::m_voxel_grid_pass
private

A pointer to the voxel grid pass of this renderer.

◆ m_voxelization_pass

UniquePtr< VoxelizationPass > mage::rendering::Renderer::Impl::m_voxelization_pass
private

A pointer to the voxelization pass of this renderer.

◆ m_world_buffer

ConstantBuffer< WorldBuffer > mage::rendering::Renderer::Impl::m_world_buffer
private

A pointer to the world buffer of this renderer.