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

Graphics class that represents the rendering queue for deferred rendering. More...

Inheritance diagram for Nz::DeferredRenderQueue:
Nz::AbstractRenderQueue

Public Types

typedef std::map< MeshData, MeshInstanceEntry, ForwardRenderQueue::MeshDataComparatorMeshInstanceContainer
 
typedef std::map< const Material *, BatchedModelEntry, ForwardRenderQueue::MaterialComparator > MeshMaterialBatches
 
typedef std::map< const MaterialPipeline *, BatchedMaterialEntry, ForwardRenderQueue::MaterialPipelineComparator > MeshPipelineBatches
 

Public Member Functions

 DeferredRenderQueue (ForwardRenderQueue *forwardQueue)
 Constructs a DeferredRenderQueue object with the rendering queue of forward rendering. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const Vector2f > sizePtr, SparsePtr< const Vector2f > sinCosPtr=nullptr, SparsePtr< const Color > colorPtr=nullptr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const Vector2f > sizePtr, SparsePtr< const Vector2f > sinCosPtr, SparsePtr< const float > alphaPtr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const Vector2f > sizePtr, SparsePtr< const float > anglePtr, SparsePtr< const Color > colorPtr=nullptr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const Vector2f > sizePtr, SparsePtr< const float > anglePtr, SparsePtr< const float > alphaPtr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const float > sizePtr, SparsePtr< const Vector2f > sinCosPtr=nullptr, SparsePtr< const Color > colorPtr=nullptr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const float > sizePtr, SparsePtr< const Vector2f > sinCosPtr, SparsePtr< const float > alphaPtr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const float > sizePtr, SparsePtr< const float > anglePtr, SparsePtr< const Color > colorPtr=nullptr) override
 Adds multiple billboards to the queue. More...
 
void AddBillboards (int renderOrder, const Material *material, unsigned int count, SparsePtr< const Vector3f > positionPtr, SparsePtr< const float > sizePtr, SparsePtr< const float > anglePtr, SparsePtr< const float > alphaPtr) override
 Adds multiple billboards to the queue. More...
 
void AddDrawable (int renderOrder, const Drawable *drawable) override
 Adds drawable to the queue. More...
 
void AddMesh (int renderOrder, const Material *material, const MeshData &meshData, const Boxf &meshAABB, const Matrix4f &transformMatrix) override
 Adds mesh to the queue. More...
 
void AddSprites (int renderOrder, const Material *material, const VertexStruct_XYZ_Color_UV *vertices, std::size_t spriteCount, const Texture *overlay=nullptr) override
 Adds sprites to the queue. More...
 
void Clear (bool fully=false) override
 Clears the queue. More...
 
- Public Member Functions inherited from Nz::AbstractRenderQueue
 AbstractRenderQueue (const AbstractRenderQueue &)=delete
 
 AbstractRenderQueue (AbstractRenderQueue &&)=default
 
virtual void AddDirectionalLight (const DirectionalLight &light)
 Adds a directional light to the rendering queue. More...
 
virtual void AddPointLight (const PointLight &light)
 Adds a point light to the rendering queue. More...
 
virtual void AddSpotLight (const SpotLight &light)
 Adds a spot light to the rendering queue. More...
 
AbstractRenderQueueoperator= (const AbstractRenderQueue &)=delete
 
AbstractRenderQueueoperator= (AbstractRenderQueue &&)=default
 

Public Attributes

std::map< int, Layer > layers
 
- Public Attributes inherited from Nz::AbstractRenderQueue
std::vector< DirectionalLight > directionalLights
 
std::vector< PointLight > pointLights
 
std::vector< SpotLight > spotLights
 

Detailed Description

Graphics class that represents the rendering queue for deferred rendering.

Constructor & Destructor Documentation

◆ DeferredRenderQueue()

Nz::DeferredRenderQueue::DeferredRenderQueue ( ForwardRenderQueue forwardQueue)

Constructs a DeferredRenderQueue object with the rendering queue of forward rendering.

Parameters
forwardQueueQueue of data to render

Member Function Documentation

◆ AddBillboards() [1/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const Vector2f sizePtr,
SparsePtr< const Vector2f sinCosPtr = nullptr,
SparsePtr< const Color colorPtr = nullptr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSizes of the billboards
sinCosPtrRotation of the billboards if null, Vector2f(0.f, 1.f) is used
colorPtrColor of the billboards if null, Color::White is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [2/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const Vector2f sizePtr,
SparsePtr< const Vector2f sinCosPtr,
SparsePtr< const float >  alphaPtr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSizes of the billboards
sinCosPtrRotation of the billboards if null, Vector2f(0.f, 1.f) is used
alphaPtrAlpha parameters of the billboards if null, 1.f is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [3/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const Vector2f sizePtr,
SparsePtr< const float >  anglePtr,
SparsePtr< const Color colorPtr = nullptr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSizes of the billboards
anglePtrRotation of the billboards if null, 0.f is used
colorPtrColor of the billboards if null, Color::White is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [4/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const Vector2f sizePtr,
SparsePtr< const float >  anglePtr,
SparsePtr< const float >  alphaPtr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSizes of the billboards
anglePtrRotation of the billboards if null, 0.f is used
alphaPtrAlpha parameters of the billboards if null, 1.f is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [5/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const float >  sizePtr,
SparsePtr< const Vector2f sinCosPtr = nullptr,
SparsePtr< const Color colorPtr = nullptr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSize of the billboards
sinCosPtrRotation of the billboards if null, Vector2f(0.f, 1.f) is used
colorPtrColor of the billboards if null, Color::White is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [6/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const float >  sizePtr,
SparsePtr< const Vector2f sinCosPtr,
SparsePtr< const float >  alphaPtr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSize of the billboards
sinCosPtrRotation of the billboards if null, Vector2f(0.f, 1.f) is used
alphaPtrAlpha parameters of the billboards if null, 1.f is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [7/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const float >  sizePtr,
SparsePtr< const float >  anglePtr,
SparsePtr< const Color colorPtr = nullptr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSize of the billboards
anglePtrRotation of the billboards if null, 0.f is used
colorPtrColor of the billboards if null, Color::White is used

Implements Nz::AbstractRenderQueue.

◆ AddBillboards() [8/8]

void Nz::DeferredRenderQueue::AddBillboards ( int  renderOrder,
const Material material,
unsigned int  count,
SparsePtr< const Vector3f positionPtr,
SparsePtr< const float >  sizePtr,
SparsePtr< const float >  anglePtr,
SparsePtr< const float >  alphaPtr 
)
overridevirtual

Adds multiple billboards to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the billboards
countNumber of billboards
positionPtrPosition of the billboards
sizePtrSize of the billboards
anglePtrRotation of the billboards if null, 0.f is used
alphaPtrAlpha parameters of the billboards if null, 1.f is used

Implements Nz::AbstractRenderQueue.

◆ AddDrawable()

void Nz::DeferredRenderQueue::AddDrawable ( int  renderOrder,
const Drawable drawable 
)
overridevirtual

Adds drawable to the queue.

Parameters
renderOrderOrder of rendering
drawableDrawable user defined
Remarks
Produces a NazaraError if drawable is invalid

Implements Nz::AbstractRenderQueue.

◆ AddMesh()

void Nz::DeferredRenderQueue::AddMesh ( int  renderOrder,
const Material material,
const MeshData &  meshData,
const Boxf meshAABB,
const Matrix4f transformMatrix 
)
overridevirtual

Adds mesh to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the mesh
meshDataData of the mesh
meshAABBBox of the mesh
transformMatrixMatrix of the mesh

Implements Nz::AbstractRenderQueue.

◆ AddSprites()

void Nz::DeferredRenderQueue::AddSprites ( int  renderOrder,
const Material material,
const VertexStruct_XYZ_Color_UV *  vertices,
std::size_t  spriteCount,
const Texture *  overlay = nullptr 
)
overridevirtual

Adds sprites to the queue.

Parameters
renderOrderOrder of rendering
materialMaterial of the sprites
verticesBuffer of data for the sprites
spriteCountNumber of sprites
overlayTexture of the sprites

Implements Nz::AbstractRenderQueue.

◆ Clear()

void Nz::DeferredRenderQueue::Clear ( bool  fully = false)
overridevirtual

Clears the queue.

Parameters
fullyShould everything be cleared or we can keep layers

Reimplemented from Nz::AbstractRenderQueue.


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