class new in Git master
#include <Magnum/Shaders/MeshVisualizerGL.h>
MeshVisualizerGL2D 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.
The shader expects that you enable wireframe visualization by passing an appropriate Flag to Configuration::
Instanced rendering
Enabling Flag::
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::
Uniform buffers
Unlike with uniform buffers in the 3D variant, because the shader doesn't need a separate projection and transformation matrix, a combined one is supplied via a TransformationProjectionUniform2D buffer bound with bindTransformationProjectionBuffer(), and a trimmed-down MeshVisualizerDrawUniform2D is used instead of MeshVisualizerDrawUniform3D. The rest is the same.
Derived classes
- class Magnum::Shaders::MeshVisualizerGL2D::CompileState new in Git master
- Asynchronous compilation state.
Public types
- class CompileState new in Git master
- Asynchronous compilation state.
- class Configuration new in Git master
- Configuration.
- 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, ShaderStorageBuffers = UniformBuffers|(1 << 19) new in Git master, MultiDraw = UniformBuffers|(1 << 11) new in Git master, TextureArrays = 1 << 17 new in Git master, DynamicPerVertexJointCount = 1 << 18 new in Git master }
- Flag.
-
using Position = GenericGL2D::
Position - Vertex position.
-
using TextureCoordinates = GenericGL2D::
TextureCoordinates new in Git master - 2D texture coordinates
-
using JointIds = GenericGL3D::
JointIds new in Git master - Joint ids.
-
using Weights = GenericGL3D::
Weights new in Git master - Weights.
-
using SecondaryJointIds = GenericGL3D::
SecondaryJointIds new in Git master - Secondary joint ids.
-
using SecondaryWeights = GenericGL3D::
SecondaryWeights new in Git master - Secondary weights.
-
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.
Public static functions
- static auto compile(const Configuration& configuration) -> CompileState new in Git master
- Compile asynchronously.
- static auto compile(Flags flags) -> CompileState deprecated in Git master
- Compile asynchronously.
- static auto compile(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount) -> CompileState deprecated in Git master
- Compile for a multi-draw scenario asynchronously.
Constructors, destructors, conversion operators
- MeshVisualizerGL2D(const Configuration& configuration) explicit new in Git master
- Constructor.
- MeshVisualizerGL2D(Flags flags) deprecated in Git master explicit
- Constructor.
- MeshVisualizerGL2D(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount) deprecated in Git master explicit
- Construct for a multi-draw scenario.
- MeshVisualizerGL2D(CompileState&& state) explicit new in Git master
- Finalize an asynchronous compilation.
- 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 jointCount() const -> UnsignedInt new in Git master
- Joint count.
- auto perVertexJointCount() const -> UnsignedInt new in Git master
- Per-vertex joint count.
- auto secondaryPerVertexJointCount() const -> UnsignedInt new in Git master
- Secondary per-vertex joint count.
- auto materialCount() const -> UnsignedInt new in Git master
- Material count.
- auto drawCount() const -> UnsignedInt new in Git master
- Draw count.
- auto setPerVertexJointCount(UnsignedInt count, UnsignedInt secondaryCount = 0) -> MeshVisualizerGL2D& new in Git master
- Set dynamic per-vertex skinning joint count.
Uniform setters
Used only if Flag::
- 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.
-
auto setJointMatrices(Containers::
ArrayView<const Matrix3> matrices) -> MeshVisualizerGL2D& new in Git master - Set joint matrices.
-
auto setJointMatrices(std::
initializer_list<Matrix3> matrices) -> MeshVisualizerGL2D& new in Git master - auto setJointMatrix(UnsignedInt id, const Matrix3& matrix) -> MeshVisualizerGL2D& new in Git master
- Set joint matrix for given joint.
- auto setPerInstanceJointCount(UnsignedInt count) -> MeshVisualizerGL2D& new in Git master
- Set per-instance joint count.
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 |
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:: |
ObjectId new in Git master |
Visualize object ID set via setObjectId() or MeshVisualizerDrawUniform2D:: |
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:: |
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:: |
VertexId new in 2020.06 |
Visualize vertex ID ( |
PrimitiveId new in 2020.06 |
Visualize primitive ID ( |
PrimitiveIdFromVertexId new in 2020.06 |
Visualize primitive ID on a non-indexed triangle mesh using |
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:: |
TextureTransformation new in Git master |
Enable texture coordinate transformation for an object ID texture. If this flag is set, the shader expects that Flag:: |
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:: If Flag:: |
UniformBuffers new in Git master |
Use uniform buffers. Expects that uniform data are supplied via bindTransformationProjectionBuffer(), bindDrawBuffer() and bindMaterialBuffer() instead of direct uniform setters. |
ShaderStorageBuffers new in Git master |
Use shader storage buffers. Superset of functionality provided by Flag:: |
MultiDraw new in Git master |
Enable multidraw functionality. Implies Flag:: |
TextureArrays new in Git master |
Use 2D texture arrays for an object ID texture. Expects that the texture is supplied via bindObjectIdTexture(GL:: |
DynamicPerVertexJointCount new in Git master |
Dynamic per-vertex joint count for skinning. Uses only the first M / N primary / secondary components defined by setPerVertexJointCount() instead of all primary / secondary components defined by Configuration:: |
Typedef documentation
typedef GenericGL2D:: Position Magnum:: Shaders:: MeshVisualizerGL2D:: Position
Vertex position.
typedef GenericGL2D:: TextureCoordinates Magnum:: Shaders:: MeshVisualizerGL2D:: TextureCoordinates new in Git master
2D texture coordinates
Generic attribute, Vector2. Used only if Flag::
typedef GenericGL3D:: JointIds Magnum:: Shaders:: MeshVisualizerGL2D:: JointIds new in Git master
Joint ids.
Generic attribute, Vector4ui. Used only if perVertexJointCount() isn't 0
.
typedef GenericGL3D:: Weights Magnum:: Shaders:: MeshVisualizerGL2D:: Weights new in Git master
Weights.
Generic attribute, Vector4. Used only if perVertexJointCount() isn't 0
.
typedef GenericGL3D:: SecondaryJointIds Magnum:: Shaders:: MeshVisualizerGL2D:: SecondaryJointIds new in Git master
Secondary joint ids.
Generic attribute, Vector4ui. Used only if secondaryPerVertexJointCount() isn't 0
.
typedef GenericGL3D:: SecondaryWeights Magnum:: Shaders:: MeshVisualizerGL2D:: SecondaryWeights new in Git master
Secondary weights.
Generic attribute, Vector4. Used only if secondaryPerVertexJointCount() isn't 0
.
typedef GL:: Attribute<4, Float> Magnum:: Shaders:: MeshVisualizerGL2D:: VertexIndex
Vertex index.
Float, used only in OpenGL < 3.1 and OpenGL ES 2.0 if Flag::0.0f
for first, 1.0f
for second, 2.0f
for third. In OpenGL 3.1, OpenGL ES 3.0 and newer this value is provided via the gl_VertexID
shader builtin, so the attribute is not needed.
typedef GenericGL2D:: ObjectId Magnum:: Shaders:: MeshVisualizerGL2D:: ObjectId new in 2020.06
(Instanced) object ID
Generic attribute, UnsignedInt. Used only if Flag::
typedef GenericGL2D:: TransformationMatrix Magnum:: Shaders:: MeshVisualizerGL2D:: TransformationMatrix new in Git master
(Instanced) transformation matrix
Generic attribute, Matrix3. Used only if Flag::
typedef GenericGL2D:: TextureOffset Magnum:: Shaders:: MeshVisualizerGL2D:: TextureOffset new in Git master
(Instanced) texture offset for an object ID texture
Generic attribute, Vector2. Used only if Flag::
typedef GenericGL2D:: TextureOffsetLayer Magnum:: Shaders:: MeshVisualizerGL2D:: TextureOffsetLayer new in Git master
(Instanced) texture offset and layer for an object ID texture
Generic attribute, Vector3, with the last component interpreted as an integer. Use either this or the TextureOffset attribute. First two components used only if Flag::
typedef Containers:: EnumSet<Flag> Magnum:: Shaders:: MeshVisualizerGL2D:: Flags
Flags.
Function documentation
static CompileState Magnum:: Shaders:: MeshVisualizerGL2D:: compile(const Configuration& configuration) new in Git master
Compile asynchronously.
Compared to MeshVisualizerGL2D(const Configuration&) can perform an asynchronous compilation and linking. See Async shader compilation and linking for more information.
static CompileState Magnum:: Shaders:: MeshVisualizerGL2D:: compile(Flags flags)
Compile asynchronously.
static CompileState Magnum:: Shaders:: MeshVisualizerGL2D:: compile(Flags flags,
UnsignedInt materialCount,
UnsignedInt drawCount)
Compile for a multi-draw scenario asynchronously.
Magnum:: Shaders:: MeshVisualizerGL2D:: MeshVisualizerGL2D(Flags flags) explicit
Constructor.
Magnum:: Shaders:: MeshVisualizerGL2D:: MeshVisualizerGL2D(Flags flags,
UnsignedInt materialCount,
UnsignedInt drawCount) explicit
Construct for a multi-draw scenario.
Magnum:: Shaders:: MeshVisualizerGL2D:: MeshVisualizerGL2D(CompileState&& state) explicit new in Git master
Finalize an asynchronous compilation.
Takes an asynchronous compilation state returned by compile() and forms a ready-to-use shader object. See Async shader compilation and linking for more information.
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:: jointCount() const new in Git master
Joint count.
If Flag::
UnsignedInt Magnum:: Shaders:: MeshVisualizerGL2D:: perVertexJointCount() const new in Git master
Per-vertex joint count.
Returns the value set with Configuration::
UnsignedInt Magnum:: Shaders:: MeshVisualizerGL2D:: secondaryPerVertexJointCount() const new in Git master
Secondary per-vertex joint count.
Returns the value set with Configuration::
UnsignedInt Magnum:: Shaders:: MeshVisualizerGL2D:: materialCount() const new in Git master
Material count.
Statically defined size of the MeshVisualizerMaterialUniform uniform buffer bound with bindMaterialBuffer(). Has use only if Flag::
UnsignedInt Magnum:: Shaders:: MeshVisualizerGL2D:: drawCount() const new in Git master
Draw count.
Statically defined size of each of the TransformationProjectionUniform2D and MeshVisualizerDrawUniform2D uniform buffers bound with bindTransformationProjectionBuffer() and bindDrawBuffer(). Has use only if Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: setPerVertexJointCount(UnsignedInt count,
UnsignedInt secondaryCount = 0) new in Git master
Set dynamic per-vertex skinning joint count.
Returns | Reference to self (for method chaining) |
---|
Allows reducing the count of iterated joints for a particular draw call, making it possible to use a single shader with meshes that contain different count of per-vertex joints. See Flag::
Expects that Flag::count
is not larger than perVertexJointCount() and secondaryCount
not larger than secondaryPerVertexJointCount().
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::
Expects that Flag::
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::
Expects that Flag::
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::0
. If Flag::
Expects that Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: setViewportSize(const Vector2& size)
Set viewport size.
Returns | Reference to self (for method chaining) |
---|
Has effect only if Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: setObjectId(UnsignedInt id) new in Git master
Set object ID.
Returns | Reference to self (for method chaining) |
---|
Expects that Flag::0
. If Flag::
Expects that Flag::
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::
Expects that Flag::
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::
Expects that Flag::
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::
Expects that Flag::
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::
Expects that Flag::
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::
Expects that Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: setJointMatrices(Containers:: ArrayView<const Matrix3> matrices) new in Git master
Set joint matrices.
Returns | Reference to self (for method chaining) |
---|
Initial values are identity transformations. Expects that the size of the matrices
array is not larger than jointCount().
Expects that Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: setJointMatrices(std:: initializer_list<Matrix3> matrices) 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:: setJointMatrix(UnsignedInt id,
const Matrix3& matrix) new in Git master
Set joint matrix for given joint.
Returns | Reference to self (for method chaining) |
---|
Unlike setJointMatrices() updates just a single joint matrix. Expects that id
is less than jointCount().
Expects that Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: setPerInstanceJointCount(UnsignedInt count) new in Git master
Set per-instance joint count.
Returns | Reference to self (for method chaining) |
---|
Offset added to joint IDs in the JointIds and SecondaryJointIds in instanced draws. Should be less than jointCount(). Initial value is 0
, meaning every instance will use the same joint matrices, setting it to a non-zero value causes the joint IDs to be interpreted as gl_InstanceID*count + jointId
.
Expects that Flag::
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::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::gl_DrawID
is added to this value, which makes each draw submitted via GL::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: bindTransformationProjectionBuffer(GL:: Buffer& buffer) new in Git master
Bind a transformation and projection uniform / shader storage buffer.
Returns | Reference to self (for method chaining) |
---|
Expects that Flag::
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
Bind a draw uniform / shader storage buffer.
Returns | Reference to self (for method chaining) |
---|
Expects that Flag::
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
Bind a texture transformation uniform / shader storage buffer for an object ID texture.
Returns | Reference to self (for method chaining) |
---|
Expects that both Flag::
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
Bind a material uniform / shader storage buffer.
Returns | Reference to self (for method chaining) |
---|
Expects that Flag::
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:: bindJointBuffer(GL:: Buffer& buffer) new in Git master
Bind a joint matrix uniform / shader storage buffer.
Returns | Reference to self (for method chaining) |
---|
Expects that Flag::
MeshVisualizerGL2D& Magnum:: Shaders:: MeshVisualizerGL2D:: bindJointBuffer(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::
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::
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::
Debug& operator<<(Debug& debug,
MeshVisualizerGL2D:: Flag value)
Debug output operator.
Debug& operator<<(Debug& debug,
MeshVisualizerGL2D:: Flags value)
Debug output operator.