API Documentation
Public Member Functions | List of all members
nkGraphics::InstancingPass Class Reference

A pass doing an instanced draw, during which one mesh is drawn X times, in one go. More...

Inheritance diagram for nkGraphics::InstancingPass:
nkGraphics::Pass nkExport::Exportable

Public Member Functions

MeshgetToRender () const
 
unsigned int getInstanceNumber () const
 
ShadergetShader () const
 
CameragetRenderCamera () const
 
CameragetCullingCamera () const
 
CameragetLodCamera () const
 
BlendStategetBlendState () const
 
RasterStategetRasterState () const
 
DepthStencilStategetDepthStencilState () const
 
virtual void setToRender (Mesh *object)
 
void setInstanceNumber (unsigned int value)
 
virtual void setShader (Shader *value)
 
void setRenderCamera (Camera *value)
 
void setCullingCamera (Camera *value)
 
void setLodCamera (Camera *value)
 
virtual void setBlendState (BlendState *holder)
 
virtual void setRasterState (RasterState *holder)
 
virtual void setDepthStencilState (DepthStencilState *holder)
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkGraphics::Pass
 Pass (System *system) noexcept
 
virtual ~Pass ()
 
SystemgetSystem () const
 
TargetOperationsgetParent () const
 
PASS_TYPE getType () const
 
nkMemory::StringView getName () const
 
void setParent (TargetOperations *parent)
 
void setName (nkMemory::StringView name)
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Detailed Description

A pass doing an instanced draw, during which one mesh is drawn X times, in one go.

Can be used to draw a lot of instance of a mesh in one go, bypassing the rendering queue logic and being more efficient.
See TargetOperations::addInstancingPass to use it.

Member Function Documentation

◆ getToRender()

Mesh* nkGraphics::InstancingPass::getToRender ( ) const
Returns
The mesh the pass should render.

◆ getInstanceNumber()

unsigned int nkGraphics::InstancingPass::getInstanceNumber ( ) const
Returns
The number of instance drawn.

◆ getShader()

Shader* nkGraphics::InstancingPass::getShader ( ) const
Returns
The shader used to render the instances.

◆ getRenderCamera()

Camera* nkGraphics::InstancingPass::getRenderCamera ( ) const
Returns
The render camera used for the pass.

◆ getCullingCamera()

Camera* nkGraphics::InstancingPass::getCullingCamera ( ) const
Returns
The culling camera used for the pass.

◆ getLodCamera()

Camera* nkGraphics::InstancingPass::getLodCamera ( ) const
Returns
The LOD camera used for the pass.

◆ getBlendState()

BlendState* nkGraphics::InstancingPass::getBlendState ( ) const
Returns
The blend state used during the pass.

◆ getRasterState()

RasterState* nkGraphics::InstancingPass::getRasterState ( ) const
Returns
The raster state used during the pass.

◆ getDepthStencilState()

DepthStencilState* nkGraphics::InstancingPass::getDepthStencilState ( ) const
Returns
The depth and stencil state used during the pass.

◆ setToRender()

virtual void nkGraphics::InstancingPass::setToRender ( Mesh object)
virtual

Sets the mesh to render in the pass.

Parameters
objectThe mesh to render.

◆ setInstanceNumber()

void nkGraphics::InstancingPass::setInstanceNumber ( unsigned int  value)

Sets the number of instances to render.

Parameters
valueThe number of instances to render.

◆ setShader()

virtual void nkGraphics::InstancingPass::setShader ( Shader value)
virtual

Sets the shader to use during the pass.

Parameters
valueThe shader to use. Needs to be a pipeline shader.

◆ setRenderCamera()

void nkGraphics::InstancingPass::setRenderCamera ( Camera value)

Sets the render camera to use during the pass.

Parameters
valueThe camera to use.

◆ setCullingCamera()

void nkGraphics::InstancingPass::setCullingCamera ( Camera value)

Sets the culling camera to use during the pass.

Parameters
valueThe camera to use.

◆ setLodCamera()

void nkGraphics::InstancingPass::setLodCamera ( Camera value)

Sets the LOD camera to use during the pass.

Parameters
valueThe camera to use.

◆ setBlendState()

virtual void nkGraphics::InstancingPass::setBlendState ( BlendState holder)
virtual

Sets the blend state to use during the pass.

Parameters
holderThe blend state to use.

◆ setRasterState()

virtual void nkGraphics::InstancingPass::setRasterState ( RasterState holder)
virtual

Sets the raster state to use during the pass.

Parameters
holderThe raster state to use.

◆ setDepthStencilState()

virtual void nkGraphics::InstancingPass::setDepthStencilState ( DepthStencilState holder)
virtual

Sets the depth and stencil state to use during the pass.

Parameters
holderThe depth and stencil state to use.

◆ exportClassToTree()

virtual void nkGraphics::InstancingPass::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Exports an item into a tree describing its structure and its data.

Parameters
rootNodeThe node into which the object has to write its related information.

Reimplemented from nkGraphics::Pass.

◆ importClassFromTree()

virtual void nkGraphics::InstancingPass::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Imports information from a tree which is supposed to describe its structure and data.

Parameters
rootNodeThe root node of the tree holding the information.

Reimplemented from nkGraphics::Pass.


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