class
#include <nCine/Graphics/RenderCommand.h>
RenderCommand Wraps all the information needed for issuing a draw command.
Public types
- enum class Type { Unspecified = 0, Sprite, MeshSprite, TileMap, Particle, Lighting, Text, ImGui, Count }
- Command types.
Public static functions
-
static auto calculateDepth(std::
uint16_t layer, float nearClip, float farClip) -> float - Calculates the Z-depth of command layer using the specified near and far planes.
Constructors, destructors, conversion operators
- RenderCommand(Type profilingType) explicit
- RenderCommand()
Public functions
-
auto numInstances() const -> std::
int32_t - Returns the number of instances collected in the command or zero if instancing is not used.
-
void setNumInstances(std::
int32_t numInstances) - Sets the number of instances collected in the command.
-
auto batchSize() const -> std::
int32_t - Returns the number of elements collected by the command or zero if it's not a batch.
-
void setBatchSize(std::
int32_t batchSize) - Sets the number of batch elements collected by the command.
-
auto layer() const -> std::
uint16_t - Returns the drawing layer for this command.
-
void setLayer(std::
uint16_t layer) - Sets the drawing layer for this command.
-
auto visitOrder() const -> std::
uint16_t - Returns the visit order index for this command.
-
void setVisitOrder(std::
uint16_t visitOrder) - Sets the visit order index for this command.
-
auto materialSortKey() const -> std::
uint64_t - Returns the material sort key for the queue.
-
auto lowerMaterialSortKey() const -> std::
uint32_t - Returns the lower part of the material sort key, used for batch splitting logic.
- void calculateMaterialSortKey()
- Calculates a material sort key for the queue.
-
auto idSortKey() const -> std::
uint32_t - Returns the id based secondary sort key for the queue.
-
void setIdSortKey(std::
uint32_t idSortKey) - Sets the id based secondary sort key for the queue.
- void issue()
- Issues the render command.
- auto type() const -> Type
- Gets the command type (for profiling purposes)
- void setType(Type type)
- Sets the command type (for profiling purposes)
- void setScissor(Recti scissorRect)
- void setScissor(GLint x, GLint y, GLsizei width, GLsizei height)
- auto transformation() const -> const Matrix4x4f&
- void setTransformation(const Matrix4x4f& modelMatrix)
- auto material() const -> const Material&
- auto geometry() const -> const Geometry&
- auto material() -> Material&
- auto geometry() -> Geometry&
- void commitNodeTransformation()
- Commits the model matrix uniform block.
- void commitCameraTransformation()
- Commits the projection and view matrix uniforms.
- void commitAll()
- Calls all the commit methods except the camera uniforms commit.
Enum documentation
enum class nCine:: RenderCommand:: Type
Command types.
Its sole purpose is to allow separated profiling counters in the RenderStatistics
class.