Magnum::Shaders::MeshVisualizerGL2D::Configuration class new in Git master

Configuration.

Public functions

auto flags() const -> Flags
Flags.
auto setFlags(Flags flags) -> Configuration&
Set flags.
auto jointCount() const -> UnsignedInt
Joint count.
auto perVertexJointCount() const -> UnsignedInt
Per-vertex joint count.
auto secondaryPerVertexJointCount() const -> UnsignedInt
Secondary per-vertex joint count.
auto setJointCount(UnsignedInt count, UnsignedInt perVertexCount, UnsignedInt secondaryPerVertexCount = 0) -> Configuration&
Set joint count.
auto materialCount() const -> UnsignedInt
Material count.
auto setMaterialCount(UnsignedInt count) -> Configuration&
Set material count.
auto drawCount() const -> UnsignedInt
Draw count.
auto setDrawCount(UnsignedInt count) -> Configuration&
Set draw count.

Function documentation

Configuration& Magnum::Shaders::MeshVisualizerGL2D::Configuration::setFlags(Flags flags)

Set flags.

At least one of Flag::Wireframe, Flag::ObjectId, Flag::VertexId, Flag::PrimitiveId or Flag::PrimitiveIdFromVertexId is expected to be enabled. No flags are set by default.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::Configuration::jointCount() const

Joint count.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::Configuration::perVertexJointCount() const

Per-vertex joint count.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::Configuration::secondaryPerVertexJointCount() const

Secondary per-vertex joint count.

Configuration& Magnum::Shaders::MeshVisualizerGL2D::Configuration::setJointCount(UnsignedInt count, UnsignedInt perVertexCount, UnsignedInt secondaryPerVertexCount = 0)

Set joint count.

If Flag::UniformBuffers isn't set, count describes an upper bound on how many joint matrices get supplied to each draw with setJointMatrices() / setJointMatrix().

If Flag::UniformBuffers is set, count describes size of a TransformationUniform2D buffer bound with bindJointBuffer(). Uniform buffers have a statically defined size and count*sizeof(TransformationUniform2D) has to be within GL::AbstractShaderProgram::maxUniformBlockSize(), if Flag::ShaderStorageBuffers is set as well, the buffer is unbounded and count is ignored. The per-vertex joints index into the array offset by MeshVisualizerDrawUniform2D::jointOffset.

The perVertexCount and secondaryPerVertexCount parameters describe how many components are taken from JointIds / Weights and SecondaryJointIds / SecondaryWeights attributes. Both values are expected to not be larger than 4, setting either of these to 0 means given attribute is not used at all. If both perVertexCount and secondaryPerVertexCount are set to 0, skinning is not performed. Unless Flag::ShaderStorageBuffers is set, if either of them is non-zero, count is expected to be non-zero as well.

Default value for all three is 0.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::Configuration::materialCount() const

Material count.

Configuration& Magnum::Shaders::MeshVisualizerGL2D::Configuration::setMaterialCount(UnsignedInt count)

Set material count.

If Flag::UniformBuffers is set, describes size of a MeshVisualizerMaterialUniform buffer bound with bindMaterialBuffer(). Uniform buffers have a statically defined size and count*sizeof(MeshVisualizerMaterialUniform) has to be within GL::AbstractShaderProgram::maxUniformBlockSize(), if Flag::ShaderStorageBuffers is set as well, the buffer is unbounded and count is ignored. The per-draw materials are specified via MeshVisualizerDrawUniform2D::materialId. Default value is 1.

If Flag::UniformBuffers isn't set, this value is ignored.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::Configuration::drawCount() const

Draw count.

Configuration& Magnum::Shaders::MeshVisualizerGL2D::Configuration::setDrawCount(UnsignedInt count)

Set draw count.

If Flag::UniformBuffers is set, describes size of a TransformationProjectionUniform2D / MeshVisualizerDrawUniform2D / TextureTransformationUniform buffer bound with bindTransformationProjectionBuffer(), bindDrawBuffer() and bindTextureTransformationBuffer(). Uniform buffers have a statically defined size and the maximum of count*sizeof(TransformationProjectionUniform2D), count*sizeof(MeshVisualizerDrawUniform2D) and count*sizeof(TextureTransformationUniform) has to be within GL::AbstractShaderProgram::maxUniformBlockSize(), if Flag::ShaderStorageBuffers is set as well, the buffers are unbounded and count is ignored. The draw offset is set via setDrawOffset(). Default value is 1.

If Flag::UniformBuffers isn't set, this value is ignored.