Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Renderer Class Reference

Base structure of a renderer. More...

#include <Renderer.hpp>

Public Member Functions

 Renderer (const std::string &name)
 
virtual void draw (const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0)
 
virtual void resize (uint width, uint height)
 
virtual void interface ()
 
virtual ~Renderer ()=default
 
 Renderer (const Renderer &)=delete
 
Rendereroperator= (const Renderer &)=delete
 
 Renderer (Renderer &&)=delete
 
Rendereroperator= (Renderer &&)=delete
 
Layout outputColorFormat () const
 
Layout outputDepthFormat () const
 

Protected Attributes

std::string _name
 Debug name.
 
Layout _colorFormat = Layout::NONE
 The preferred output format for a given renderer.
 
Layout _depthFormat = Layout::NONE
 The preferred output format for a given renderer.
 

Detailed Description

Base structure of a renderer.

Inherited by BVHRenderer, DebugRenderer, DeferredRenderer, EditorRenderer, ForwardRenderer, GameMenuRenderer, GameRenderer, PostProcessStack, and StenciledRenderer.

Constructor & Destructor Documentation

◆ Renderer() [1/3]

Renderer::Renderer ( const std::string &  name)

Default constructor.

Parameters
namethe debug name of the renderer

◆ ~Renderer()

virtual Renderer::~Renderer ( )
virtualdefault

Destructor

◆ Renderer() [2/3]

Renderer::Renderer ( const Renderer )
delete

Copy constructor.

◆ Renderer() [3/3]

Renderer::Renderer ( Renderer &&  )
delete

Move constructor.

Member Function Documentation

◆ draw()

void Renderer::draw ( const Camera camera,
Texture dstColor,
Texture dstDepth,
uint  layer = 0 
)
virtual

Draw from a given viewpoint.

Parameters
camerathe rendering viewpoint
dstColorthe destination color texture (optional, see outputColorFormat)
dstDepththe destination depth texture (optional, see outputDepthFormat)
layerthe layer to write to in the target

Reimplemented in BVHRenderer, DebugRenderer, DeferredRenderer, ForwardRenderer, StenciledRenderer, and EditorRenderer.

◆ interface()

void Renderer::interface ( )
virtual

Display GUI exposing renderer options.

Note
The renderer can assume that a GUI window is currently open.

Reimplemented in DebugRenderer, DeferredRenderer, ForwardRenderer, and PostProcessStack.

◆ operator=() [1/2]

Renderer & Renderer::operator= ( const Renderer )
delete

Copy assignment.

Returns
a reference to the object assigned to

◆ operator=() [2/2]

Renderer & Renderer::operator= ( Renderer &&  )
delete

Move assignment.

Returns
a reference to the object assigned to

◆ outputColorFormat()

Layout Renderer::outputColorFormat ( ) const
inline
Returns
the preferred format for the destination color rendertarget

◆ outputDepthFormat()

Layout Renderer::outputDepthFormat ( ) const
inline
Returns
the preferred format for the destination depth rendertarget

◆ resize()

void Renderer::resize ( uint  width,
uint  height 
)
virtual

Handle a window resize event.

Parameters
widththe new width
heightthe new height

Reimplemented in DeferredRenderer, ForwardRenderer, PostProcessStack, GameRenderer, and StenciledRenderer.


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