Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::DeferredRenderTechnique Class Reference

Graphics class that represents the technique used in deferred rendering. More...

Inheritance diagram for Nz::DeferredRenderTechnique:
Nz::AbstractRenderTechnique

Public Member Functions

 DeferredRenderTechnique ()
 Constructs a DeferredRenderTechnique object by default. More...
 
void Clear (const SceneData &sceneData) const override
 Clears the data. More...
 
bool Draw (const SceneData &sceneData) const override
 Draws the data of the scene. More...
 
void EnablePass (RenderPassType renderPass, int position, bool enable)
 Enables a pass. More...
 
Texture * GetDepthStencilTexture () const
 Gets the stencil buffer. More...
 
Texture * GetGBuffer (unsigned int i) const
 Gets the G-buffer. More...
 
RenderTexture * GetGBufferRTT () const
 Gets the rendering texture of the G-buffer. More...
 
const ForwardRenderTechniqueGetForwardTechnique () const
 Gets the forward technique. More...
 
DeferredRenderPassGetPass (RenderPassType renderPass, int position=0)
 Gets the pass. More...
 
AbstractRenderQueueGetRenderQueue () override
 Gets the render queue. More...
 
RenderTechniqueType GetType () const override
 Gets the type of the current technique. More...
 
RenderTexture * GetWorkRTT () const
 Gets the render texture used to work. More...
 
Texture * GetWorkTexture (unsigned int i) const
 Gets the ith texture to work. More...
 
bool IsPassEnabled (RenderPassType renderPass, int position)
 Checks whether the pass is enable. More...
 
DeferredRenderPassResetPass (RenderPassType renderPass, int position)
 Resets the pass. More...
 
void SetPass (RenderPassType relativeTo, int position, DeferredRenderPass *pass)
 Sets the pass. More...
 
- Public Member Functions inherited from Nz::AbstractRenderTechnique
 AbstractRenderTechnique ()
 Constructs a AbstractRenderTechnique object.
 
 AbstractRenderTechnique (const AbstractRenderTechnique &)=delete
 
 AbstractRenderTechnique (AbstractRenderTechnique &&)=default
 
virtual void EnableInstancing (bool instancing)
 Enables the instancing. More...
 
virtual String GetName () const
 Gets the name of the actual technique. More...
 
virtual bool IsInstancingEnabled () const
 Checks whether the instancing is enabled. More...
 
AbstractRenderTechniqueoperator= (const AbstractRenderTechnique &)=delete
 
AbstractRenderTechniqueoperator= (AbstractRenderTechnique &&)=default
 

Static Public Member Functions

static bool IsSupported ()
 Checks whether the technique is supported. More...
 

Friends

class Graphics
 

Additional Inherited Members

- Protected Attributes inherited from Nz::AbstractRenderTechnique
bool m_instancingEnabled
 

Detailed Description

Graphics class that represents the technique used in deferred rendering.

Constructor & Destructor Documentation

◆ DeferredRenderTechnique()

Nz::DeferredRenderTechnique::DeferredRenderTechnique ( )

Constructs a DeferredRenderTechnique object by default.

Remarks
Produces a NazaraError if one pass could not be created

Member Function Documentation

◆ Clear()

void Nz::DeferredRenderTechnique::Clear ( const SceneData &  sceneData) const
overridevirtual

Clears the data.

Parameters
sceneDataData of the scene

Implements Nz::AbstractRenderTechnique.

◆ Draw()

bool Nz::DeferredRenderTechnique::Draw ( const SceneData &  sceneData) const
overridevirtual

Draws the data of the scene.

Returns
true If successful
Parameters
sceneDataData of the scene
Remarks
Produces a NazaraAssert if viewer of the scene is invalid
Produces a NazaraError if updating viewport dimensions failed

Implements Nz::AbstractRenderTechnique.

◆ EnablePass()

void Nz::DeferredRenderTechnique::EnablePass ( RenderPassType  renderPass,
int  position,
bool  enable 
)

Enables a pass.

Parameters
renderPassEnumeration for the pass
positionPosition of the pass
enableShould the pass be enabled

◆ GetDepthStencilTexture()

Texture * Nz::DeferredRenderTechnique::GetDepthStencilTexture ( ) const

Gets the stencil buffer.

Returns
Pointer to the rendering buffer

◆ GetForwardTechnique()

const ForwardRenderTechnique * Nz::DeferredRenderTechnique::GetForwardTechnique ( ) const

Gets the forward technique.

Returns
Constant pointer to the forward technique

◆ GetGBuffer()

Texture * Nz::DeferredRenderTechnique::GetGBuffer ( unsigned int  i) const

Gets the G-buffer.

Returns
Pointer to the ith texture
Parameters
iIndex of the G-buffer
Remarks
Produces a NazaraError with NAZARA_GRAPHICS_SAFE defined if index is invalid

◆ GetGBufferRTT()

RenderTexture * Nz::DeferredRenderTechnique::GetGBufferRTT ( ) const

Gets the rendering texture of the G-buffer.

Returns
Pointer to the rendering buffer

◆ GetPass()

DeferredRenderPass * Nz::DeferredRenderTechnique::GetPass ( RenderPassType  renderPass,
int  position = 0 
)

Gets the pass.

Returns
Pointer to the deferred render pass
Parameters
renderPassEnumeration for the pass
positionPosition of the pass

◆ GetRenderQueue()

AbstractRenderQueue * Nz::DeferredRenderTechnique::GetRenderQueue ( )
overridevirtual

Gets the render queue.

Returns
Pointer to the render queue

Implements Nz::AbstractRenderTechnique.

◆ GetType()

RenderTechniqueType Nz::DeferredRenderTechnique::GetType ( ) const
overridevirtual

Gets the type of the current technique.

Returns
Type of the render technique

Implements Nz::AbstractRenderTechnique.

◆ GetWorkRTT()

RenderTexture * Nz::DeferredRenderTechnique::GetWorkRTT ( ) const

Gets the render texture used to work.

Returns
Pointer to the rendering texture

◆ GetWorkTexture()

Texture * Nz::DeferredRenderTechnique::GetWorkTexture ( unsigned int  i) const

Gets the ith texture to work.

Returns
Pointer to the texture
Parameters
iIndex of the texture used to work
Remarks
Produces a NazaraError with NAZARA_GRAPHICS_SAFE defined if index is invalid

◆ IsPassEnabled()

bool Nz::DeferredRenderTechnique::IsPassEnabled ( RenderPassType  renderPass,
int  position 
)

Checks whether the pass is enable.

Returns
true If it is the case
Parameters
renderPassEnumeration for the pass
positionPosition of the pass

◆ IsSupported()

bool Nz::DeferredRenderTechnique::IsSupported ( )
static

Checks whether the technique is supported.

Returns
true if it is the case

◆ ResetPass()

DeferredRenderPass * Nz::DeferredRenderTechnique::ResetPass ( RenderPassType  renderPass,
int  position 
)

Resets the pass.

Returns
Pointer to the new deferred render pass
Parameters
renderPassEnumeration for the pass
positionPosition of the pass

◆ SetPass()

void Nz::DeferredRenderTechnique::SetPass ( RenderPassType  relativeTo,
int  position,
DeferredRenderPass pass 
)

Sets the pass.

Parameters
relativeToEnumeration for the pass
positionPosition of the pass
passRender pass to set

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