A pass doing an instanced draw, during which one mesh is drawn X times, in one go.
More...
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.
◆ 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()
- 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
-
object | The mesh to render. |
◆ setInstanceNumber()
void nkGraphics::InstancingPass::setInstanceNumber |
( |
unsigned int |
value | ) |
|
Sets the number of instances to render.
- Parameters
-
value | The number of instances to render. |
◆ setShader()
virtual void nkGraphics::InstancingPass::setShader |
( |
Shader * |
value | ) |
|
|
virtual |
Sets the shader to use during the pass.
- Parameters
-
value | The 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
-
◆ setCullingCamera()
void nkGraphics::InstancingPass::setCullingCamera |
( |
Camera * |
value | ) |
|
Sets the culling camera to use during the pass.
- Parameters
-
◆ setLodCamera()
void nkGraphics::InstancingPass::setLodCamera |
( |
Camera * |
value | ) |
|
Sets the LOD camera to use during the pass.
- Parameters
-
◆ setBlendState()
virtual void nkGraphics::InstancingPass::setBlendState |
( |
BlendState * |
holder | ) |
|
|
virtual |
Sets the blend state to use during the pass.
- Parameters
-
holder | The blend state to use. |
◆ setRasterState()
virtual void nkGraphics::InstancingPass::setRasterState |
( |
RasterState * |
holder | ) |
|
|
virtual |
Sets the raster state to use during the pass.
- Parameters
-
holder | The 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
-
holder | The 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
-
rootNode | The 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
-
rootNode | The root node of the tree holding the information. |
Reimplemented from nkGraphics::Pass.
The documentation for this class was generated from the following file: