GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::Instances3D Class Reference

Batch of instances to be drawn in a Renderer3D frame. More...

#include <GREM/graphics_3d/Instances3D.hpp>

Public Member Functions

 Instances3D (Device &device, Renderer3D &renderer3D)
 Construct a batch of instances.
void clear ()
 Clear the batch of all instances.
void putPBRModelInstance (const Model3D &model, resource::Model::TransformationView transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered using the default PBR shader.
void putPBRModelInstance (const Model3D &model, const mat4 &transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in its default bind pose using the default PBR shader.
void putPBRModelInstance (const Model3D &model, const mat4 &transformation, resource::Model::PoseView pose, const ModelInstance3D &instance)
 Add a 3D model instance to be rendered in a specific local pose using the default PBR shader.
void putPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances)
 Add a list of instances of a 3D model to be rendered using the default PBR shader.
void putPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance)
 Add a list of instances of a 3D model to be rendered using the default PBR shader.
void putPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations)
 Add a list of instances of a 3D model to be rendered using the default PBR shader.
void putVisiblePBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default PBR shader if they are in a visible set.
void putVisiblePBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default PBR shader if they are in a visible set.
void putVisiblePBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default PBR shader if they are in a visible set.
void putHDRPBRModelInstance (const Model3D &model, resource::Model::TransformationView transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered using the default HDR PBR shader.
void putHDRPBRModelInstance (const Model3D &model, const mat4 &transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in its default bind pose using the default HDR PBR shader.
void putHDRPBRModelInstance (const Model3D &model, const mat4 &transformation, resource::Model::PoseView pose, const ModelInstance3D &instance)
 Add a 3D model instance to be rendered in a specific local pose using the default HDR PBR shader.
void putHDRPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances)
 Add a list of instances of a 3D model to be rendered using the default HDR PBR shader.
void putHDRPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance)
 Add a list of instances of a 3D model to be rendered using the default HDR PBR shader.
void putHDRPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations)
 Add a list of instances of a 3D model to be rendered using the default HDR PBR shader.
void putVisibleHDRPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default HDR PBR shader if they are in a visible set.
void putVisibleHDRPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default HDR PBR shader if they are in a visible set.
void putVisibleHDRPBRModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default HDR PBR shader if they are in a visible set.
void putUnlitModelInstance (const Model3D &model, resource::Model::TransformationView transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered using the default unlit shader.
void putUnlitModelInstance (const Model3D &model, const mat4 &transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in its default bind pose using the default unlit shader.
void putUnlitModelInstance (const Model3D &model, const mat4 &transformation, resource::Model::PoseView pose, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in a specific local pose using the default unlit shader.
void putUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances)
 Add a list of instances of a 3D model to be rendered using the default unlit shader.
void putUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance)
 Add a list of instances of a 3D model to be rendered using the default unlit shader.
void putUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations)
 Add a list of instances of a 3D model to be rendered using the default unlit shader.
void putVisibleUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default unlit shader if they are in a visible set.
void putVisibleUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default unlit shader if they are in a visible set.
void putVisibleUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default unlit shader if they are in a visible set.
void putHDRUnlitModelInstance (const Model3D &model, resource::Model::TransformationView transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered using the default HDR unlit shader.
void putHDRUnlitModelInstance (const Model3D &model, const mat4 &transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in its default bind pose using the default HDR unlit shader.
void putHDRUnlitModelInstance (const Model3D &model, const mat4 &transformation, resource::Model::PoseView pose, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in a specific local pose using the default HDR unlit shader.
void putHDRUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances)
 Add a list of instances of a 3D model to be rendered using the default HDR unlit shader.
void putHDRUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance)
 Add a list of instances of a 3D model to be rendered using the default HDR unlit shader.
void putHDRUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations)
 Add a list of instances of a 3D model to be rendered using the default HDR unlit shader.
void putVisibleHDRUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default HDR unlit shader if they are in a visible set.
void putVisibleHDRUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default HDR unlit shader if they are in a visible set.
void putVisibleHDRUnlitModelInstances (const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using the default HDR unlit shader if they are in a visible set.
void putShadedModelInstance (auto &&shaderPipelineSelector, const Model3D &model, resource::Model::TransformationView transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered using a specific shader pipeline.
void putShadedModelInstance (auto &&shaderPipelineSelector, const Model3D &model, const mat4 &transformation, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in its default bind pose using a specific shader pipeline.
void putShadedModelInstance (auto &&shaderPipelineSelector, const Model3D &model, const mat4 &transformation, resource::Model::PoseView pose, const ModelInstance3D &instance={})
 Add a 3D model instance to be rendered in a specific local pose using a specific shader pipeline.
void putShadedModelInstances (auto &&shaderPipelineSelector, const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances)
 Add a list of instances of a 3D model to be rendered using a specific shader pipeline.
void putShadedModelInstances (auto &&shaderPipelineSelector, const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance)
 Add a list of instances of a 3D model to be rendered using a specific shader pipeline.
void putShadedModelInstances (auto &&shaderPipelineSelector, const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations)
 Add a list of instances of a 3D model to be rendered using a specific shader pipeline.
void putVisibleShadedModelInstances (auto &&shaderPipelineSelector, const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const ModelInstance3D > instances, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using a specific shader pipeline if they are in a visible set.
void putVisibleShadedModelInstances (auto &&shaderPipelineSelector, const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, const ModelInstance3D &instance, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using a specific shader pipeline if they are in a visible set.
void putVisibleShadedModelInstances (auto &&shaderPipelineSelector, const Model3D &model, StridedSpan< const resource::Model::TransformationView > transformations, StridedSpan< const bool > instancesVisible)
 Add a list of instances of a 3D model to be rendered using a specific shader pipeline if they are in a visible set.
void putFlatModelInstance (const Model2D &model, const FlatModelInstance3D &instance)
 Add a flat 2D model instance to be rendered using a plain 2D model shader.
void putShadedFlatModelInstance (const Model2D::ShaderPipeline &shaderPipeline, const Model2D &model, const FlatModelInstance3D &instance)
 Add a flat 2D model instance to be rendered using a specific shader pipeline.
void putTriangleInstance (const TriangleInstance3D &instance)
 Add a triangle instance to be rendered using a plain 2D model shader.
void putShadedTriangleInstance (const Model2D::ShaderPipeline &shaderPipeline, const TriangleInstance3D &instance)
 Add a triangle instance to be rendered using a specific shader pipeline.
void putQuadInstance (const QuadInstance3D &instance)
 Add a quad instance to be rendered using a plain 2D model shader.
void putShadedQuadInstance (const Model2D::ShaderPipeline &shaderPipeline, const QuadInstance3D &instance)
 Add a quad instance to be rendered using a specific shader pipeline.
void putSpriteInstance (const SpriteAtlas &spriteAtlas, SpriteID spriteID, const SpriteInstance3D &instance)
 Add a sprite instance to be rendered using a plain 2D model shader.
void putShadedSpriteInstance (const Model2D::ShaderPipeline &shaderPipeline, const SpriteAtlas &spriteAtlas, SpriteID spriteID, const SpriteInstance3D &instance)
 Add a sprite instance to be rendered using a specific shader pipeline.
void putTextInstance (const Text2D &text, const TextInstance3D &instance)
 Add a 3D text instance to be rendered using a plain 3D text shader.
void putShadedTextInstance (const Model2D::ShaderPipeline &shaderPipeline, const Text2D &text, const TextInstance3D &instance)
 Add a 3D text instance to be rendered using a specific shader pipeline.
void putTextStringInstance (Font2D &font, UTF8StringView string, const TextStringInstance3D &instance)
 Add a 3D text string instance to be rendered using a plain 3D text shader.
void putShadedTextStringInstance (const Model2D::ShaderPipeline &shaderPipeline, Font2D &font, UTF8StringView string, const TextStringInstance3D &instance)
 Add a 3D text string instance to be rendered using a specific shader pipeline.
void putTextStringInstance (Font2D &font, StringView string, const TextStringInstance3D &instance)
 Add a 3D text string instance to be rendered using a plain 3D text shader.
void putShadedTextStringInstance (const Model2D::ShaderPipeline &shaderPipeline, Font2D &font, StringView string, const TextStringInstance3D &instance)
 Add a 3D text string instance to be rendered using a specific shader pipeline.

Detailed Description

Batch of instances to be drawn in a Renderer3D frame.

Constructor & Destructor Documentation

◆ Instances3D()

grem::graphics::Instances3D::Instances3D ( Device & device,
Renderer3D & renderer3D )
inline

Construct a batch of instances.

Parameters
devicedevice to create the batch for. Must outlive the batch.
renderer3Drenderer to create the batch for. Must be associated with the given device. Must outlive the batch.
Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

Member Function Documentation

◆ clear()

void grem::graphics::Instances3D::clear ( )
inline

Clear the batch of all instances.

Exceptions
graphics::Errorif resource creation failed.
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putPBRModelInstance() [1/3]

void grem::graphics::Instances3D::putPBRModelInstance ( const Model3D & model,
resource::Model::TransformationView transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered using the default PBR shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance. Must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putPBRModelInstance() [2/3]

void grem::graphics::Instances3D::putPBRModelInstance ( const Model3D & model,
const mat4 & transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered in its default bind pose using the default PBR shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putPBRModelInstance() [3/3]

void grem::graphics::Instances3D::putPBRModelInstance ( const Model3D & model,
const mat4 & transformation,
resource::Model::PoseView pose,
const ModelInstance3D & instance )

Add a 3D model instance to be rendered in a specific local pose using the default PBR shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
poselocal pose to draw the model in. The number of joints in the pose must match the number of joints in the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putPBRModelInstances() [1/3]

void grem::graphics::Instances3D::putPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances )

Add a list of instances of a 3D model to be rendered using the default PBR shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putPBRModelInstances() [2/3]

void grem::graphics::Instances3D::putPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance )

Add a list of instances of a 3D model to be rendered using the default PBR shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putPBRModelInstances() [3/3]

void grem::graphics::Instances3D::putPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations )

Add a list of instances of a 3D model to be rendered using the default PBR shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisiblePBRModelInstances() [1/3]

void grem::graphics::Instances3D::putVisiblePBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default PBR shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisiblePBRModelInstances() [2/3]

void grem::graphics::Instances3D::putVisiblePBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default PBR shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisiblePBRModelInstances() [3/3]

void grem::graphics::Instances3D::putVisiblePBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default PBR shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRPBRModelInstance() [1/3]

void grem::graphics::Instances3D::putHDRPBRModelInstance ( const Model3D & model,
resource::Model::TransformationView transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered using the default HDR PBR shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance. Must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRPBRModelInstance() [2/3]

void grem::graphics::Instances3D::putHDRPBRModelInstance ( const Model3D & model,
const mat4 & transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered in its default bind pose using the default HDR PBR shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRPBRModelInstance() [3/3]

void grem::graphics::Instances3D::putHDRPBRModelInstance ( const Model3D & model,
const mat4 & transformation,
resource::Model::PoseView pose,
const ModelInstance3D & instance )

Add a 3D model instance to be rendered in a specific local pose using the default HDR PBR shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
poselocal pose to draw the model in. The number of joints in the pose must match the number of joints in the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRPBRModelInstances() [1/3]

void grem::graphics::Instances3D::putHDRPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances )

Add a list of instances of a 3D model to be rendered using the default HDR PBR shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRPBRModelInstances() [2/3]

void grem::graphics::Instances3D::putHDRPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance )

Add a list of instances of a 3D model to be rendered using the default HDR PBR shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRPBRModelInstances() [3/3]

void grem::graphics::Instances3D::putHDRPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations )

Add a list of instances of a 3D model to be rendered using the default HDR PBR shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleHDRPBRModelInstances() [1/3]

void grem::graphics::Instances3D::putVisibleHDRPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default HDR PBR shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleHDRPBRModelInstances() [2/3]

void grem::graphics::Instances3D::putVisibleHDRPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default HDR PBR shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleHDRPBRModelInstances() [3/3]

void grem::graphics::Instances3D::putVisibleHDRPBRModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default HDR PBR shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putUnlitModelInstance() [1/3]

void grem::graphics::Instances3D::putUnlitModelInstance ( const Model3D & model,
resource::Model::TransformationView transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered using the default unlit shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance. Must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putUnlitModelInstance() [2/3]

void grem::graphics::Instances3D::putUnlitModelInstance ( const Model3D & model,
const mat4 & transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered in its default bind pose using the default unlit shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putUnlitModelInstance() [3/3]

void grem::graphics::Instances3D::putUnlitModelInstance ( const Model3D & model,
const mat4 & transformation,
resource::Model::PoseView pose,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered in a specific local pose using the default unlit shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
poselocal pose to draw the model in. The number of joints in the pose must match the number of joints in the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putUnlitModelInstances() [1/3]

void grem::graphics::Instances3D::putUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances )

Add a list of instances of a 3D model to be rendered using the default unlit shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each instance to draw, see ModelInstance3D. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putUnlitModelInstances() [2/3]

void grem::graphics::Instances3D::putUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance )

Add a list of instances of a 3D model to be rendered using the default unlit shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the instances to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putUnlitModelInstances() [3/3]

void grem::graphics::Instances3D::putUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations )

Add a list of instances of a 3D model to be rendered using the default unlit shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleUnlitModelInstances() [1/3]

void grem::graphics::Instances3D::putVisibleUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default unlit shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each instance to draw, see ModelInstance3D. Must have the same size as transformations.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleUnlitModelInstances() [2/3]

void grem::graphics::Instances3D::putVisibleUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default unlit shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the instances to draw, see ModelInstance3D.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleUnlitModelInstances() [3/3]

void grem::graphics::Instances3D::putVisibleUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default unlit shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRUnlitModelInstance() [1/3]

void grem::graphics::Instances3D::putHDRUnlitModelInstance ( const Model3D & model,
resource::Model::TransformationView transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered using the default HDR unlit shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance. Must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRUnlitModelInstance() [2/3]

void grem::graphics::Instances3D::putHDRUnlitModelInstance ( const Model3D & model,
const mat4 & transformation,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered in its default bind pose using the default HDR unlit shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRUnlitModelInstance() [3/3]

void grem::graphics::Instances3D::putHDRUnlitModelInstance ( const Model3D & model,
const mat4 & transformation,
resource::Model::PoseView pose,
const ModelInstance3D & instance = {} )

Add a 3D model instance to be rendered in a specific local pose using the default HDR unlit shader.

Parameters
modelmodel to draw.
transformationtransformation of the model instance.
poselocal pose to draw the model in. The number of joints in the pose must match the number of joints in the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRUnlitModelInstances() [1/3]

void grem::graphics::Instances3D::putHDRUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances )

Add a list of instances of a 3D model to be rendered using the default HDR unlit shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRUnlitModelInstances() [2/3]

void grem::graphics::Instances3D::putHDRUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance )

Add a list of instances of a 3D model to be rendered using the default HDR unlit shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putHDRUnlitModelInstances() [3/3]

void grem::graphics::Instances3D::putHDRUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations )

Add a list of instances of a 3D model to be rendered using the default HDR unlit shader.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleHDRUnlitModelInstances() [1/3]

void grem::graphics::Instances3D::putVisibleHDRUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default HDR unlit shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleHDRUnlitModelInstances() [2/3]

void grem::graphics::Instances3D::putVisibleHDRUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default HDR unlit shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleHDRUnlitModelInstances() [3/3]

void grem::graphics::Instances3D::putVisibleHDRUnlitModelInstances ( const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const bool > instancesVisible )

Add a list of instances of a 3D model to be rendered using the default HDR unlit shader if they are in a visible set.

Parameters
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putShadedModelInstance() [1/3]

void grem::graphics::Instances3D::putShadedModelInstance ( auto && shaderPipelineSelector,
const Model3D & model,
resource::Model::TransformationView transformation,
const ModelInstance3D & instance = {} )
inline

Add a 3D model instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationtransformation of the model instance. Must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putShadedModelInstance() [2/3]

void grem::graphics::Instances3D::putShadedModelInstance ( auto && shaderPipelineSelector,
const Model3D & model,
const mat4 & transformation,
const ModelInstance3D & instance = {} )
inline

Add a 3D model instance to be rendered in its default bind pose using a specific shader pipeline.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its mesh configuration.
modelmodel to draw.
transformationtransformation of the model instance.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putShadedModelInstance() [3/3]

void grem::graphics::Instances3D::putShadedModelInstance ( auto && shaderPipelineSelector,
const Model3D & model,
const mat4 & transformation,
resource::Model::PoseView pose,
const ModelInstance3D & instance = {} )
inline

Add a 3D model instance to be rendered in a specific local pose using a specific shader pipeline.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its mesh configuration.
modelmodel to draw.
transformationtransformation of the model instance.
poselocal pose to draw the model in. The number of joints in the pose must match the number of joints in the model.
instanceconfiguration of the model instance to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putShadedModelInstances() [1/3]

void grem::graphics::Instances3D::putShadedModelInstances ( auto && shaderPipelineSelector,
const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances )
inline

Add a list of instances of a 3D model to be rendered using a specific shader pipeline.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putShadedModelInstances() [2/3]

void grem::graphics::Instances3D::putShadedModelInstances ( auto && shaderPipelineSelector,
const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance )
inline

Add a list of instances of a 3D model to be rendered using a specific shader pipeline.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the instances to draw, see ModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putShadedModelInstances() [3/3]

void grem::graphics::Instances3D::putShadedModelInstances ( auto && shaderPipelineSelector,
const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations )
inline

Add a list of instances of a 3D model to be rendered using a specific shader pipeline.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleShadedModelInstances() [1/3]

void grem::graphics::Instances3D::putVisibleShadedModelInstances ( auto && shaderPipelineSelector,
const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const ModelInstance3D > instances,
StridedSpan< const bool > instancesVisible )
inline

Add a list of instances of a 3D model to be rendered using a specific shader pipeline if they are in a visible set.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesconfiguration of each model instance to draw, see ModelInstance3D. Must have the same size as transformations.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleShadedModelInstances() [2/3]

void grem::graphics::Instances3D::putVisibleShadedModelInstances ( auto && shaderPipelineSelector,
const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
const ModelInstance3D & instance,
StridedSpan< const bool > instancesVisible )
inline

Add a list of instances of a 3D model to be rendered using a specific shader pipeline if they are in a visible set.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instanceconfiguration of the model instances to draw, see ModelInstance3D.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putVisibleShadedModelInstances() [3/3]

void grem::graphics::Instances3D::putVisibleShadedModelInstances ( auto && shaderPipelineSelector,
const Model3D & model,
StridedSpan< const resource::Model::TransformationView > transformations,
StridedSpan< const bool > instancesVisible )
inline

Add a list of instances of a 3D model to be rendered using a specific shader pipeline if they are in a visible set.

Parameters
shaderPipelineSelectorfunction that returns the shader pipeline to render each mesh of the model with, given its shader configuration.
modelmodel to draw.
transformationstransformation of each model instance. Each must contain at least as many joints and morph target weights as the model.
instancesVisiblevisibility of each instance. Must have the same size as transformations.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.

◆ putFlatModelInstance()

void grem::graphics::Instances3D::putFlatModelInstance ( const Model2D & model,
const FlatModelInstance3D & instance )

Add a flat 2D model instance to be rendered using a plain 2D model shader.

Parameters
modelmodel to draw.
instanceconfiguration of the flat model instance to draw, see FlatModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putQuadInstance()
putSpriteInstance()

◆ putShadedFlatModelInstance()

void grem::graphics::Instances3D::putShadedFlatModelInstance ( const Model2D::ShaderPipeline & shaderPipeline,
const Model2D & model,
const FlatModelInstance3D & instance )

Add a flat 2D model instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the model with.
modelmodel to draw.
instanceconfiguration of the flat model instance to draw, see FlatModelInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putShadedQuadInstance()
putShadedSpriteInstance()

◆ putTriangleInstance()

void grem::graphics::Instances3D::putTriangleInstance ( const TriangleInstance3D & instance)

Add a triangle instance to be rendered using a plain 2D model shader.

Parameters
instanceconfiguration of the triangle instance to draw, see TriangleInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putQuadInstance()

◆ putShadedTriangleInstance()

void grem::graphics::Instances3D::putShadedTriangleInstance ( const Model2D::ShaderPipeline & shaderPipeline,
const TriangleInstance3D & instance )

Add a triangle instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the triangle with.
instanceconfiguration of the triangle instance to draw, see TriangleInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putShadedQuadInstance()

◆ putQuadInstance()

void grem::graphics::Instances3D::putQuadInstance ( const QuadInstance3D & instance)

Add a quad instance to be rendered using a plain 2D model shader.

Parameters
instanceconfiguration of the quad instance to draw, see QuadInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putFlatModelInstance()
putSpriteInstance()

◆ putShadedQuadInstance()

void grem::graphics::Instances3D::putShadedQuadInstance ( const Model2D::ShaderPipeline & shaderPipeline,
const QuadInstance3D & instance )

Add a quad instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the quad with.
instanceconfiguration of the quad instance to draw, see QuadInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putShadedFlatModelInstance()
putShadedSpriteInstance()

◆ putSpriteInstance()

void grem::graphics::Instances3D::putSpriteInstance ( const SpriteAtlas & spriteAtlas,
SpriteID spriteID,
const SpriteInstance3D & instance )

Add a sprite instance to be rendered using a plain 2D model shader.

Parameters
spriteAtlassprite atlas to fetch the sprite image from.
spriteIDidentifier of the sprite in the atlas to draw. Must be a valid sprite identifier obtained from the given atlas.
instanceconfiguration of the sprite instance to draw, see SpriteInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putFlatModelInstance()
putQuadInstance()

◆ putShadedSpriteInstance()

void grem::graphics::Instances3D::putShadedSpriteInstance ( const Model2D::ShaderPipeline & shaderPipeline,
const SpriteAtlas & spriteAtlas,
SpriteID spriteID,
const SpriteInstance3D & instance )

Add a sprite instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the sprite with.
spriteAtlassprite atlas to fetch the sprite image from.
spriteIDidentifier of the sprite in the atlas to draw. Must be a valid sprite identifier obtained from the given atlas.
instanceconfiguration of the sprite instance to draw, see SpriteInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putShadedFlatModelInstance()
putShadedQuadInstance()

◆ putTextInstance()

void grem::graphics::Instances3D::putTextInstance ( const Text2D & text,
const TextInstance3D & instance )

Add a 3D text instance to be rendered using a plain 3D text shader.

Parameters
textshaped text to draw.
instanceconfiguration of the text instance to draw, see TextInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putTextStringInstance()

◆ putShadedTextInstance()

void grem::graphics::Instances3D::putShadedTextInstance ( const Model2D::ShaderPipeline & shaderPipeline,
const Text2D & text,
const TextInstance3D & instance )

Add a 3D text instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the text with.
textshaped text to draw.
instanceconfiguration of the text instance to draw, see TextInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
See also
putShadedTextStringInstance()

◆ putTextStringInstance() [1/2]

void grem::graphics::Instances3D::putTextStringInstance ( Font2D & font,
UTF8StringView string,
const TextStringInstance3D & instance )

Add a 3D text string instance to be rendered using a plain 3D text shader.

Parameters
fontfont from which to shape the text.
stringUTF-8-encoded string to shape the text from.
instanceconfiguration of the text string instance to draw, see TextStringInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
Right-to-left text shaping is currently not supported.
Grapheme clusters are currently not supported, and may be rendered incorrectly. Only one Unicode code point is rendered at a time.
Warning
If the string contains invalid UTF-8, the invalid code points will generate unspecified glyphs that may have any appearance.
See also
putTextInstance()

◆ putShadedTextStringInstance() [1/2]

void grem::graphics::Instances3D::putShadedTextStringInstance ( const Model2D::ShaderPipeline & shaderPipeline,
Font2D & font,
UTF8StringView string,
const TextStringInstance3D & instance )

Add a 3D text string instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the text with.
fontfont from which to shape the text.
stringUTF-8-encoded string to shape the text from.
instanceconfiguration of the text string instance to draw, see TextStringInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
Right-to-left text shaping is currently not supported.
Grapheme clusters are currently not supported, and may be rendered incorrectly. Only one Unicode code point is rendered at a time.
Warning
If the string contains invalid UTF-8, the invalid code points will generate unspecified glyphs that may have any appearance.
See also
putShadedTextInstance()

◆ putTextStringInstance() [2/2]

void grem::graphics::Instances3D::putTextStringInstance ( Font2D & font,
StringView string,
const TextStringInstance3D & instance )

Add a 3D text string instance to be rendered using a plain 3D text shader.

Parameters
fontfont from which to shape the text.
stringstring to shape the text from, which will be interpreted as being UTF-8-encoded.
instanceconfiguration of the text string instance to draw, see TextStringInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
Right-to-left text shaping is currently not supported.
Grapheme clusters are currently not supported, and may be rendered incorrectly. Only one Unicode code point is rendered at a time.
Warning
If the string contains invalid UTF-8, the invalid code points will generate unspecified glyphs that may have any appearance.
See also
putTextInstance()

◆ putShadedTextStringInstance() [2/2]

void grem::graphics::Instances3D::putShadedTextStringInstance ( const Model2D::ShaderPipeline & shaderPipeline,
Font2D & font,
StringView string,
const TextStringInstance3D & instance )

Add a 3D text string instance to be rendered using a specific shader pipeline.

Parameters
shaderPipelineshader pipeline to render the text with.
fontfont from which to shape the text.
stringstring to shape the text from, which will be interpreted as being UTF-8-encoded.
instanceconfiguration of the text string instance to draw, see TextStringInstance3D.
Exceptions
std::length_errorif an internal size limit was exceeded.
std::bad_array_new_lengthif an internal size limit was exceeded.
std::bad_allocon allocation failure.
Note
Right-to-left text shaping is currently not supported.
Grapheme clusters are currently not supported, and may be rendered incorrectly. Only one Unicode code point is rendered at a time.
Warning
If the string contains invalid UTF-8, the invalid code points will generate unspecified glyphs that may have any appearance.
See also
putShadedTextInstance()

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