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

2D mesh visualization OpenGL shader

Visualizes wireframe, per-vertex/per-instance object ID or primitive ID of 2D meshes. You need to provide the Position attribute in your triangle mesh. Use setTransformationProjectionMatrix(), setColor() and others to configure the shader.

Image
Image

The shader expects that you enable wireframe visualization by passing an appropriate Flag to the constructor — there's no default behavior with nothing enabled. The shader is a 2D variant of MeshVisualizerGL3D with mostly identical workflow. See its documentation for more information, workflows that differ are shown below.

Instanced rendering

Enabling Flag::InstancedTransformation will turn the shader into an instanced one. It'll take per-instance transformation from the TransformationMatrix attribute, applying it before the matrix set by setTransformationProjectionMatrix(). The snippet below shows adding a buffer with per-instance transformation to a mesh:

Matrix3 instancedTransformations[] {
    Matrix3::translation({1.0f, 2.0f}),
    Matrix3::translation({2.0f, 1.0f}),
    Matrix3::translation({3.0f, 0.0f}),
    // ...
};

mesh.setInstanceCount(Containers::arraySize(instancedTransformations))
    .addVertexBufferInstanced(GL::Buffer{instancedTransformations}, 1, 0,
        Shaders::MeshVisualizerGL2D::TransformationMatrix{});

If Flag::ObjectIdTexture is used and Flag::InstancedTextureOffset is enabled, the TextureOffset attribute (or TextureOffsetLayer in case Flag::TextureArrays is enabled as well) then can supply per-instance texture offset (or offset and layer).

Public types

enum (anonymous): UnsignedInt { ColorOutput = GenericGL2D::ColorOutput }
enum class Flag: UnsignedInt { Wireframe = 1 << 0, NoGeometryShader = 1 << 1, ObjectId = 1 << 12 new in Git master, InstancedObjectId = (1 << 2)|ObjectId new in 2020.06, ObjectIdTexture = (1 << 14)|ObjectId new in Git master, VertexId = 1 << 3 new in 2020.06, PrimitiveId = 1 << 4 new in 2020.06, PrimitiveIdFromVertexId = (1 << 5)|PrimitiveId new in 2020.06, InstancedTransformation = 1 << 13 new in Git master, TextureTransformation = 1 << 15 new in Git master, InstancedTextureOffset = (1 << 16)|TextureTransformation new in Git master, UniformBuffers = 1 << 10 new in Git master, MultiDraw = UniformBuffers|(1 << 11) new in Git master, TextureArrays = 1 << 17 new in Git master }
Flag.
using Position = GenericGL2D::Position
Vertex position.
using TextureCoordinates = GenericGL2D::TextureCoordinates new in Git master
2D texture coordinates
using VertexIndex = GL::Attribute<4, Float>
Vertex index.
using ObjectId = GenericGL2D::ObjectId new in 2020.06
(Instanced) object ID
using TransformationMatrix = GenericGL2D::TransformationMatrix new in Git master
(Instanced) transformation matrix
using TextureOffset = GenericGL2D::TextureOffset new in Git master
(Instanced) texture offset for an object ID texture
using TextureOffsetLayer = GenericGL2D::TextureOffsetLayer new in Git master
(Instanced) texture offset and layer for an object ID texture
using Flags = Containers::EnumSet<Flag>
Flags.

Constructors, destructors, conversion operators

MeshVisualizerGL2D(Flags flags) explicit
Constructor.
MeshVisualizerGL2D(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount) explicit
Construct for a multi-draw scenario.
MeshVisualizerGL2D(NoCreateT) explicit noexcept
Construct without creating the underlying OpenGL object.
MeshVisualizerGL2D(const MeshVisualizerGL2D&) deleted
Copying is not allowed.
MeshVisualizerGL2D(MeshVisualizerGL2D&&) defaulted noexcept
Move constructor.

Public functions

auto operator=(const MeshVisualizerGL2D&) -> MeshVisualizerGL2D& deleted
Copying is not allowed.
auto operator=(MeshVisualizerGL2D&&) -> MeshVisualizerGL2D& defaulted noexcept
Move assignment.
auto flags() const -> Flags
Flags.
auto materialCount() const -> UnsignedInt new in Git master
Material count.
auto drawCount() const -> UnsignedInt new in Git master
Draw count.

Uniform setters

Used only if Flag::UniformBuffers is not set.

auto setTransformationProjectionMatrix(const Matrix3& matrix) -> MeshVisualizerGL2D&
Set transformation and projection matrix.
auto setTextureMatrix(const Matrix3& matrix) -> MeshVisualizerGL2D& new in Git master
Set texture coordinate transformation matrix for an object ID texture.
auto setTextureLayer(UnsignedInt layer) -> MeshVisualizerGL2D& new in Git master
Set texture array layer for an object ID texture.
auto setViewportSize(const Vector2& size) -> MeshVisualizerGL2D&
Set viewport size.
auto setObjectId(UnsignedInt id) -> MeshVisualizerGL2D& new in Git master
Set object ID.
auto setColor(const Color4& color) -> MeshVisualizerGL2D&
Set base object color.
auto setWireframeColor(const Color4& color) -> MeshVisualizerGL2D&
Set wireframe color.
auto setWireframeWidth(Float width) -> MeshVisualizerGL2D&
Set wireframe width.
auto setColorMapTransformation(Float offset, Float scale) -> MeshVisualizerGL2D& new in 2020.06
Set color map transformation.
auto setSmoothness(Float smoothness) -> MeshVisualizerGL2D&
Set line smoothness.

Texture binding

auto bindColorMapTexture(GL::Texture2D& texture) -> MeshVisualizerGL2D& new in 2020.06
Bind a color map texture.
auto bindObjectIdTexture(GL::Texture2D& texture) -> MeshVisualizerGL2D& new in Git master
Bind an object ID texture.
auto bindObjectIdTexture(GL::Texture2DArray& texture) -> MeshVisualizerGL2D& new in Git master
Bind an object ID array texture.

Enum documentation

enum Magnum::Shaders::MeshVisualizerGL2D::(anonymous): UnsignedInt

Enumerators
ColorOutput

Color shader output. Generic output, present always. Expects three- or four-component floating-point or normalized buffer attachment.

enum class Magnum::Shaders::MeshVisualizerGL2D::Flag: UnsignedInt

Flag.

Enumerators
Wireframe

Visualize wireframe. On OpenGL ES 2.0 and WebGL this also enables Flag::NoGeometryShader.

NoGeometryShader

Don't use a geometry shader for wireframe visualization. If enabled, you might need to provide also the VertexIndex attribute in the mesh. On OpenGL ES 2.0 and WebGL enabled alongside Flag::Wireframe.

ObjectId new in Git master

Visualize object ID set via setObjectId() or MeshVisualizerDrawUniform2D::objectId. Since the ID is uniform for the whole draw, this feature is mainly useful in multidraw scenarios or when combined with Flag::InstancedObjectId. Mutually exclusive with Flag::VertexId and Flag::PrimitiveId.

InstancedObjectId new in 2020.06

Visualize instanced object ID. You need to provide the ObjectId attribute in the mesh, which then gets summed with the ID coming from setObjectId() or MeshVisualizerDrawUniform2D::objectId. Implicitly enables Flag::ObjectId. Mutually exclusive with Flag::VertexId and Flag::PrimitiveId.

ObjectIdTexture new in Git master

Object ID texture. Retrieves object IDs from a texture bound with bindObjectIdTexture(), outputting a sum of the object ID texture, the ID coming from setObjectId() or MeshVisualizerDrawUniform2D::objectId and possibly also the per-vertex ID, if Flag::InstancedObjectId is enabled as well. Implicitly enables Flag::ObjectId.

VertexId new in 2020.06

Visualize vertex ID (gl_VertexID). Useful for visualizing mesh connectivity — primitives sharing vertices will have a smooth color map transition while duplicated vertices will cause a sharp edge. Mutually exclusive with Flag::InstancedObjectId and Flag::PrimitiveId.

PrimitiveId new in 2020.06

Visualize primitive ID (gl_PrimitiveID). Useful for visualizing how well is the mesh optimized for a post-transform vertex cache. Mutually exclusive with Flag::InstancedObjectId and Flag::VertexId. See also Flag::PrimitiveIdFromVertexId.

PrimitiveIdFromVertexId new in 2020.06

Visualize primitive ID on a non-indexed triangle mesh using gl_VertexID/3. Implicitly enables Flag::PrimitiveId, mutually exclusive with Flag::InstancedObjectId. Usable on OpenGL < 3.2, OpenGL ES < 3.2 and WebGL where gl_PrimitiveID is not available.

InstancedTransformation new in Git master

Instanced transformation. Retrieves a per-instance transformation matrix from the TransformationMatrix attribute and uses it together with the matrix coming from setTransformationProjectionMatrix() or TransformationProjectionUniform2D::transformationProjectionMatrix (first the per-instance, then the uniform matrix). See Instanced rendering for more information.

TextureTransformation new in Git master

Enable texture coordinate transformation for an object ID texture. If this flag is set, the shader expects that Flag::ObjectIdTexture is enabled as well.

InstancedTextureOffset new in Git master

Instanced texture offset for an object ID texture. Retrieves a per-instance offset vector from the TextureOffset attribute and uses it together with the matrix coming from setTextureMatrix() or TextureTransformationUniform::rotationScaling and TextureTransformationUniform::offset (first the per-instance vector, then the uniform matrix). Instanced texture scaling and rotation is not supported at the moment, you can specify that only via the uniform setTextureMatrix(). Implicitly enables Flag::TextureTransformation. See Instanced rendering for more information.

If Flag::TextureArrays is set as well, a three-component TextureOffsetLayer attribute can be used instead of TextureOffset to specify per-instance texture layer, which gets added to the uniform layer numbers set by setTextureLayer() or TextureTransformationUniform::layer.

UniformBuffers new in Git master

Use uniform buffers. Expects that uniform data are supplied via bindTransformationProjectionBuffer(), bindDrawBuffer() and bindMaterialBuffer() instead of direct uniform setters.

MultiDraw new in Git master

Enable multidraw functionality. Implies Flag::UniformBuffers and combines the value from setDrawOffset() with the gl_DrawID builtin, which makes draws submitted via GL::AbstractShaderProgram::draw(Containers::ArrayView<const Containers::Reference<MeshView>>) pick up per-draw parameters directly, without having to rebind the uniform buffers or specify setDrawOffset() before each draw. In a non-multidraw scenario, gl_DrawID is 0, which means a shader with this flag enabled can be used for regular draws as well.

TextureArrays new in Git master

Use 2D texture arrays for an object ID texture. Expects that the texture is supplied via bindObjectIdTexture(GL::Texture2DArray&) and the layer is set via setTextureLayer() or TextureTransformationUniform::layer. If Flag::InstancedTextureOffset is set as well and a three-component TextureOffsetLayer attribute is used instead of TextureOffset, the per-instance and uniform layer numbers are added together.

Typedef documentation

typedef GenericGL2D::Position Magnum::Shaders::MeshVisualizerGL2D::Position

Vertex position.

Generic attribute, Vector2.

typedef GenericGL2D::TextureCoordinates Magnum::Shaders::MeshVisualizerGL2D::TextureCoordinates new in Git master

2D texture coordinates

Generic attribute, Vector2. Used only if Flag::ObjectIdTexture is enabled.

typedef GL::Attribute<4, Float> Magnum::Shaders::MeshVisualizerGL2D::VertexIndex

Vertex index.

See MeshVisualizerGL3D::VertexIndex for more information.

typedef GenericGL2D::ObjectId Magnum::Shaders::MeshVisualizerGL2D::ObjectId new in 2020.06

(Instanced) object ID

Generic attribute, Magnum::UnsignedInt. Used only if Flag::InstancedObjectId is set.

typedef GenericGL2D::TextureOffset Magnum::Shaders::MeshVisualizerGL2D::TextureOffset new in Git master

(Instanced) texture offset for an object ID texture

Generic attribute, Magnum::Vector2. Used only if Flag::InstancedTextureOffset is set.

typedef GenericGL2D::TextureOffsetLayer Magnum::Shaders::MeshVisualizerGL2D::TextureOffsetLayer new in Git master

(Instanced) texture offset and layer for an object ID texture

Generic attribute, Magnum::Vector3, with the last component interpreted as an integer. Use either this or the TextureOffset attribute. First two components used only if Flag::InstancedTextureOffset is set, third component only if Flag::TextureArrays is set.

Function documentation

Magnum::Shaders::MeshVisualizerGL2D::MeshVisualizerGL2D(Flags flags) explicit

Constructor.

Parameters
flags Flags

At least Flag::Wireframe is expected to be enabled.

While this function is meant mainly for the classic uniform scenario (without Flag::UniformBuffers set), it's equivalent to MeshVisualizerGL2D(Flags, UnsignedInt, UnsignedInt) with materialCount and drawCount set to 1.

Magnum::Shaders::MeshVisualizerGL2D::MeshVisualizerGL2D(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount) explicit

Construct for a multi-draw scenario.

Parameters
flags Flags
materialCount Size of a MeshVisualizerMaterialUniform buffer bound with bindMaterialBuffer()
drawCount Size of a TransformationProjectionUniform2D / MeshVisualizerMaterialUniform buffer bound with bindTransformationProjectionBuffer() and bindDrawBuffer()

At least Flag::Wireframe is expected to be enabled.

If flags contains Flag::UniformBuffers, materialCount and drawCount describe the uniform buffer sizes as these are required to have a statically defined size. The draw offset is then set via setDrawOffset() and the per-draw materials are specified via MeshVisualizerDrawUniform2D::materialId.

If flags don't contain Flag::UniformBuffers, materialCount and drawCount is ignored and the constructor behaves the same as MeshVisualizerGL2D(Flags).

Magnum::Shaders::MeshVisualizerGL2D::MeshVisualizerGL2D(NoCreateT) explicit noexcept

Construct without creating the underlying OpenGL object.

The constructed instance is equivalent to a moved-from state. Useful in cases where you will overwrite the instance later anyway. Move another object over it to make it useful.

This function can be safely used for constructing (and later destructing) objects even without any OpenGL context being active. However note that this is a low-level and a potentially dangerous API, see the documentation of NoCreate for alternatives.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::materialCount() const new in Git master

Material count.

Statically defined size of the MeshVisualizerMaterialUniform uniform buffer. Has use only if Flag::UniformBuffers is set.

UnsignedInt Magnum::Shaders::MeshVisualizerGL2D::drawCount() const new in Git master

Draw count.

Statically defined size of each of the TransformationProjectionUniform2D and MeshVisualizerDrawUniform2D uniform buffers. Has use only if Flag::UniformBuffers is set.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setTransformationProjectionMatrix(const Matrix3& matrix)

Set transformation and projection matrix.

Returns Reference to self (for method chaining)

Initial value is an identity matrix. If Flag::InstancedTransformation is set, the per-instance transformation matrix coming from the TransformationMatrix attribute is applied first, before this one.

Expects that Flag::UniformBuffers is not set, in that case fill TransformationProjectionUniform2D::transformationProjectionMatrix and call bindTransformationProjectionBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setTextureMatrix(const Matrix3& matrix) new in Git master

Set texture coordinate transformation matrix for an object ID texture.

Returns Reference to self (for method chaining)

Expects that the shader was created with Flag::TextureTransformation enabled. Initial value is an identity matrix. If Flag::InstancedTextureOffset is set, the per-instance offset coming from the TextureOffset attribute is applied first, before this matrix.

Expects that Flag::UniformBuffers is not set, in that case fill TextureTransformationUniform::rotationScaling and TextureTransformationUniform::offset and call bindTextureTransformationBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setTextureLayer(UnsignedInt layer) new in Git master

Set texture array layer for an object ID texture.

Returns Reference to self (for method chaining)

Expects that the shader was created with Flag::TextureArrays enabled. Initial value is 0. If Flag::InstancedTextureOffset is set and a three-component TextureOffsetLayer attribute is used instead of TextureOffset, this value is added to the layer coming from the third component.

Expects that Flag::UniformBuffers is not set, in that case fill TextureTransformationUniform::layer and call bindTextureTransformationBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setViewportSize(const Vector2& size)

Set viewport size.

Returns Reference to self (for method chaining)

Has effect only if Flag::Wireframe is enabled and geometry shaders are used, otherwise it does nothing. Initial value is a zero vector.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setObjectId(UnsignedInt id) new in Git master

Set object ID.

Returns Reference to self (for method chaining)

Expects that Flag::ObjectId is enabled. Default is 0. If Flag::InstancedObjectId is enabled as well, this value is added to the ID coming from the ObjectId attribute.

Expects that Flag::UniformBuffers is not set, in that case fill MeshVisualizerDrawUniform2D::objectId and call bindDrawBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setColor(const Color4& color)

Set base object color.

Returns Reference to self (for method chaining)

Initial value is 0xffffffff_rgbaf. Expects that either Flag::Wireframe or Flag::InstancedObjectId / Flag::PrimitiveId / Flag::PrimitiveIdFromVertexId is enabled. In case of the latter, the color is multiplied with the color map coming from bindColorMapTexture().

Expects that Flag::UniformBuffers is not set, in that case fill MeshVisualizerMaterialUniform::color and call bindMaterialBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setWireframeColor(const Color4& color)

Set wireframe color.

Returns Reference to self (for method chaining)

Initial value is 0x000000ff_rgbaf. Expects that Flag::Wireframe is enabled.

Expects that Flag::UniformBuffers is not set, in that case fill MeshVisualizerMaterialUniform::wireframeColor and call bindMaterialBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setWireframeWidth(Float width)

Set wireframe width.

Returns Reference to self (for method chaining)

The value is in screen space (depending on setViewportSize()), initial value is 1.0f. Expects that Flag::Wireframe is enabled.

Expects that Flag::UniformBuffers is not set, in that case fill MeshVisualizerMaterialUniform::wireframeWidth and call bindMaterialBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setColorMapTransformation(Float offset, Float scale) new in 2020.06

Set color map transformation.

Returns Reference to self (for method chaining)

Offset and scale applied to the input value coming either from the ObjectId attribute or gl_PrimitiveID, resulting value is then used to fetch a color from a color map bound with bindColorMapTexture(). Initial value is 1.0f/512.0f and 1.0/256.0f, meaning that for a 256-entry colormap the first 256 values get an exact color from it and the next values will be either clamped to last color or repeated depending on the color map texture wrapping mode. Expects that either Flag::InstancedObjectId or Flag::PrimitiveId / Flag::PrimitiveIdFromVertexId is enabled.

Expects that Flag::UniformBuffers is not set, in that case fill MeshVisualizerMaterialUniform::colorMapOffset and MeshVisualizerMaterialUniform::colorMapScale and call bindMaterialBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setSmoothness(Float smoothness)

Set line smoothness.

Returns Reference to self (for method chaining)

Value is in screen space (depending on setViewportSize()), initial value is 2.0f. Expects that Flag::Wireframe is enabled.

Expects that Flag::UniformBuffers is not set, in that case fill MeshVisualizerMaterialUniform::smoothness and call bindMaterialBuffer() instead.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::setDrawOffset(UnsignedInt offset) new in Git master

Set a draw offset.

Returns Reference to self (for method chaining)

Specifies which item in the TransformationProjectionUniform2D and MeshVisualizerDrawUniform2D buffers bound with bindTransformationProjectionBuffer() and bindDrawBuffer() should be used for current draw. Expects that Flag::UniformBuffers is set and offset is less than drawCount(). Initial value is 0, if drawCount() is 1, the function is a no-op as the shader assumes draw offset to be always zero.

If Flag::MultiDraw is set, gl_DrawID is added to this value, which makes each draw submitted via GL::AbstractShaderProgram::draw(Containers::ArrayView<const Containers::Reference<MeshView>>) pick up its own per-draw parameters.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindTransformationProjectionBuffer(GL::Buffer& buffer) new in Git master

Set a transformation and projection uniform buffer.

Returns Reference to self (for method chaining)

Expects that Flag::UniformBuffers is set. The buffer is expected to contain drawCount() instances of TransformationUniform3D. At the very least you need to call also bindDrawBuffer() and bindMaterialBuffer().

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindTransformationProjectionBuffer(GL::Buffer& buffer, GLintptr offset, GLsizeiptr size) new in Git master

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindDrawBuffer(GL::Buffer& buffer) new in Git master

Set a draw uniform buffer.

Returns Reference to self (for method chaining)

Expects that Flag::UniformBuffers is set. The buffer is expected to contain drawCount() instances of MeshVisualizerDrawUniform2D. At the very least you need to call also bindTransformationProjectionBuffer() and bindMaterialBuffer().

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindDrawBuffer(GL::Buffer& buffer, GLintptr offset, GLsizeiptr size) new in Git master

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindTextureTransformationBuffer(GL::Buffer& buffer) new in Git master

Set a texture transformation uniform buffer for an object ID texture.

Returns Reference to self (for method chaining)

Expects that both Flag::UniformBuffers and Flag::TextureTransformation is set. The buffer is expected to contain drawCount() instances of TextureTransformationUniform.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindTextureTransformationBuffer(GL::Buffer& buffer, GLintptr offset, GLsizeiptr size) new in Git master

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindMaterialBuffer(GL::Buffer& buffer) new in Git master

Set a material uniform buffer.

Returns Reference to self (for method chaining)

Expects that Flag::UniformBuffers is set. The buffer is expected to contain materialCount() instances of MeshVisualizerMaterialUniform. At the very least you need to call also bindTransformationProjectionBuffer() and bindDrawBuffer().

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindMaterialBuffer(GL::Buffer& buffer, GLintptr offset, GLsizeiptr size) new in Git master

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindColorMapTexture(GL::Texture2D& texture) new in 2020.06

Bind a color map texture.

Returns Reference to self (for method chaining)

See also setColorMapTransformation(). Expects that either Flag::InstancedObjectId or Flag::PrimitiveId / Flag::PrimitiveIdFromVertexId is enabled.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindObjectIdTexture(GL::Texture2D& texture) new in Git master

Bind an object ID texture.

Returns Reference to self (for method chaining)

Expects that the shader was created with Flag::ObjectIdTexture enabled. If Flag::TextureArrays is enabled as well, use bindObjectIdTexture(GL::Texture2DArray&) instead. The texture needs to have an unsigned integer format.

MeshVisualizerGL2D& Magnum::Shaders::MeshVisualizerGL2D::bindObjectIdTexture(GL::Texture2DArray& texture) new in Git master

Bind an object ID array texture.

Returns Reference to self (for method chaining)

Expects that the shader was created with both Flag::ObjectIdTexture and Flag::TextureArrays enabled. If Flag::UniformBuffers is not enabled, the layer is set via setTextureLayer(); if Flag::UniformBuffers is enabled, Flag::TextureTransformation has to be enabled as well and the layer is set via TextureTransformationUniform::layer.

Debug& operator<<(Debug& debug, MeshVisualizerGL2D::Flag value)

Debug output operator.

Debug& operator<<(Debug& debug, MeshVisualizerGL2D::Flags value)

Debug output operator.