From f70bbef4738fe6e34f75c802568316174dd831bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 17 Apr 2021 18:56:03 +0200 Subject: [PATCH] Shaders: group uniform setters and texture binding functions together. Otherwise it would get way too messy with the introduction of uniform buffers. --- src/Magnum/Shaders/AbstractVectorGL.h | 8 ++ src/Magnum/Shaders/DistanceFieldVectorGL.h | 8 ++ src/Magnum/Shaders/FlatGL.cpp | 14 +- src/Magnum/Shaders/FlatGL.h | 38 ++++-- src/Magnum/Shaders/MeshVisualizerGL.h | 88 ++++++++---- src/Magnum/Shaders/PhongGL.cpp | 70 +++++----- src/Magnum/Shaders/PhongGL.h | 148 ++++++++++++--------- src/Magnum/Shaders/VectorGL.h | 8 ++ src/Magnum/Shaders/VertexColorGL.h | 8 ++ 9 files changed, 245 insertions(+), 145 deletions(-) diff --git a/src/Magnum/Shaders/AbstractVectorGL.h b/src/Magnum/Shaders/AbstractVectorGL.h index c6b8a0c01..95933640d 100644 --- a/src/Magnum/Shaders/AbstractVectorGL.h +++ b/src/Magnum/Shaders/AbstractVectorGL.h @@ -82,6 +82,10 @@ template class AbstractVectorGL: public GL::AbstractShad /** @brief Move assignment */ AbstractVectorGL& operator=(AbstractVectorGL&&) noexcept = default; + /** @{ + * @name Texture binding + */ + /** * @brief Bind vector texture * @return Reference to self (for method chaining) @@ -93,6 +97,10 @@ template class AbstractVectorGL: public GL::AbstractShad */ AbstractVectorGL& bindVectorTexture(GL::Texture2D& texture); + /** + * @} + */ + #ifndef DOXYGEN_GENERATING_OUTPUT protected: #else diff --git a/src/Magnum/Shaders/DistanceFieldVectorGL.h b/src/Magnum/Shaders/DistanceFieldVectorGL.h index 92ede2175..e588179a8 100644 --- a/src/Magnum/Shaders/DistanceFieldVectorGL.h +++ b/src/Magnum/Shaders/DistanceFieldVectorGL.h @@ -154,6 +154,10 @@ template class MAGNUM_SHADERS_EXPORT DistanceFieldVector */ Flags flags() const { return _flags; } + /** @{ + * @name Uniform setters + */ + /** * @brief Set transformation and projection matrix * @return Reference to self (for method chaining) @@ -218,6 +222,10 @@ template class MAGNUM_SHADERS_EXPORT DistanceFieldVector */ DistanceFieldVectorGL& setSmoothness(Float value); + /** + * @} + */ + #ifndef DOXYGEN_GENERATING_OUTPUT /* Overloads to remove WTF-factor from method chaining order */ DistanceFieldVectorGL& bindVectorTexture(GL::Texture2D& texture) { diff --git a/src/Magnum/Shaders/FlatGL.cpp b/src/Magnum/Shaders/FlatGL.cpp index 2501bf049..bfd7b355a 100644 --- a/src/Magnum/Shaders/FlatGL.cpp +++ b/src/Magnum/Shaders/FlatGL.cpp @@ -168,13 +168,6 @@ template FlatGL& FlatGL::setColo return *this; } -template FlatGL& FlatGL::bindTexture(GL::Texture2D& texture) { - CORRADE_ASSERT(_flags & Flag::Textured, - "Shaders::FlatGL::bindTexture(): the shader was not created with texturing enabled", *this); - texture.bind(TextureUnit); - return *this; -} - template FlatGL& FlatGL::setAlphaMask(Float mask) { CORRADE_ASSERT(_flags & Flag::AlphaMask, "Shaders::FlatGL::setAlphaMask(): the shader was not created with alpha mask enabled", *this); @@ -191,6 +184,13 @@ template FlatGL& FlatGL::setObje } #endif +template FlatGL& FlatGL::bindTexture(GL::Texture2D& texture) { + CORRADE_ASSERT(_flags & Flag::Textured, + "Shaders::FlatGL::bindTexture(): the shader was not created with texturing enabled", *this); + texture.bind(TextureUnit); + return *this; +} + template class MAGNUM_SHADERS_EXPORT FlatGL<2>; template class MAGNUM_SHADERS_EXPORT FlatGL<3>; diff --git a/src/Magnum/Shaders/FlatGL.h b/src/Magnum/Shaders/FlatGL.h index 7256bf3cf..8fa33dfb4 100644 --- a/src/Magnum/Shaders/FlatGL.h +++ b/src/Magnum/Shaders/FlatGL.h @@ -416,6 +416,10 @@ template class MAGNUM_SHADERS_EXPORT FlatGL: public GL:: /** @brief Flags */ Flags flags() const { return _flags; } + /** @{ + * @name Uniform setters + */ + /** * @brief Set transformation and projection matrix * @return Reference to self (for method chaining) @@ -446,17 +450,6 @@ template class MAGNUM_SHADERS_EXPORT FlatGL: public GL:: */ FlatGL& setColor(const Magnum::Color4& color); - /** - * @brief Bind a color texture - * @return Reference to self (for method chaining) - * - * Expects that the shader was created with @ref Flag::Textured - * enabled. - * @see @ref setColor(), @ref Flag::TextureTransformation, - * @ref setTextureMatrix() - */ - FlatGL& bindTexture(GL::Texture2D& texture); - /** * @brief Set alpha mask value * @return Reference to self (for method chaining) @@ -489,6 +482,29 @@ template class MAGNUM_SHADERS_EXPORT FlatGL: public GL:: FlatGL& setObjectId(UnsignedInt id); #endif + /** + * @} + */ + + /** @{ + * @name Texture binding + */ + + /** + * @brief Bind a color texture + * @return Reference to self (for method chaining) + * + * Expects that the shader was created with @ref Flag::Textured + * enabled. + * @see @ref setColor(), @ref Flag::TextureTransformation, + * @ref setTextureMatrix() + */ + FlatGL& bindTexture(GL::Texture2D& texture); + + /** + * @} + */ + private: /* Prevent accidentally calling irrelevant functions */ #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/Shaders/MeshVisualizerGL.h b/src/Magnum/Shaders/MeshVisualizerGL.h index c0997486e..6929bde97 100644 --- a/src/Magnum/Shaders/MeshVisualizerGL.h +++ b/src/Magnum/Shaders/MeshVisualizerGL.h @@ -249,6 +249,10 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizerGL2D: public Implementation::MeshVisua return Flag(UnsignedShort(Implementation::MeshVisualizerGLBase::_flags)); } + /** @{ + * @name Uniform setters + */ + /** * @brief Set transformation and projection matrix * @return Reference to self (for method chaining) @@ -309,11 +313,6 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizerGL2D: public Implementation::MeshVisua MeshVisualizerGL2D& setColorMapTransformation(Float offset, Float scale) { return static_cast(Implementation::MeshVisualizerGLBase::setColorMapTransformation(offset, scale)); } - - /** @copydoc MeshVisualizerGL3D::bindColorMapTexture() */ - MeshVisualizerGL2D& bindColorMapTexture(GL::Texture2D& texture) { - return static_cast(Implementation::MeshVisualizerGLBase::bindColorMapTexture(texture)); - } #endif /** @@ -326,6 +325,25 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizerGL2D: public Implementation::MeshVisua */ MeshVisualizerGL2D& setSmoothness(Float smoothness); + /** + * @} + */ + + /** @{ + * @name Texture binding + */ + + #ifndef MAGNUM_TARGET_GLES2 + /** @copydoc MeshVisualizerGL3D::bindColorMapTexture() */ + MeshVisualizerGL2D& bindColorMapTexture(GL::Texture2D& texture) { + return static_cast(Implementation::MeshVisualizerGLBase::bindColorMapTexture(texture)); + } + #endif + + /** + * @} + */ + private: Int _transformationProjectionMatrixUniform{0}; }; @@ -801,6 +819,10 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizerGL3D: public Implementation::MeshVisua return Flag(UnsignedShort(Implementation::MeshVisualizerGLBase::_flags)); } + /** @{ + * @name Uniform setters + */ + #ifdef MAGNUM_BUILD_DEPRECATED /** * @brief Set transformation and projection matrix @@ -933,27 +955,6 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizerGL3D: public Implementation::MeshVisua MeshVisualizerGL3D& setColorMapTransformation(Float offset, Float scale) { return static_cast(Implementation::MeshVisualizerGLBase::setColorMapTransformation(offset, scale)); } - - /** - * @brief Bind a color map texture - * @return Reference to self (for method chaining) - * @m_since{2020,06} - * - * See also @ref setColorMapTransformation(). Expects that either - * @ref Flag::InstancedObjectId or @ref Flag::PrimitiveId / - * @ref Flag::PrimitiveIdFromVertexId is enabled. - * @requires_gles30 Object ID visualization requires integer attributes - * while primitive ID visualization requires the `gl_VertexID` / - * `gl_PrimitiveID` builtins, neither of which is available in - * OpenGL ES 2.0. - * @requires_webgl20 Object ID visualization requires integer - * attributes while primitive ID visualization requires at least - * the `gl_VertexID` builtin, neither of which is available in - * WebGL 1. - */ - MeshVisualizerGL3D& bindColorMapTexture(GL::Texture2D& texture) { - return static_cast(Implementation::MeshVisualizerGLBase::bindColorMapTexture(texture)); - } #endif #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) @@ -1008,6 +1009,41 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizerGL3D: public Implementation::MeshVisua */ MeshVisualizerGL3D& setSmoothness(Float smoothness); + /** + * @} + */ + + /** @{ + * @name Texture binding + */ + + #ifndef MAGNUM_TARGET_GLES2 + /** + * @brief Bind a color map texture + * @return Reference to self (for method chaining) + * @m_since{2020,06} + * + * See also @ref setColorMapTransformation(). Expects that either + * @ref Flag::InstancedObjectId or @ref Flag::PrimitiveId / + * @ref Flag::PrimitiveIdFromVertexId is enabled. + * @requires_gles30 Object ID visualization requires integer attributes + * while primitive ID visualization requires the `gl_VertexID` / + * `gl_PrimitiveID` builtins, neither of which is available in + * OpenGL ES 2.0. + * @requires_webgl20 Object ID visualization requires integer + * attributes while primitive ID visualization requires at least + * the `gl_VertexID` builtin, neither of which is available in + * WebGL 1. + */ + MeshVisualizerGL3D& bindColorMapTexture(GL::Texture2D& texture) { + return static_cast(Implementation::MeshVisualizerGLBase::bindColorMapTexture(texture)); + } + #endif + + /** + * @} + */ + private: Int _transformationMatrixUniform{0}, _projectionMatrixUniform{7}; diff --git a/src/Magnum/Shaders/PhongGL.cpp b/src/Magnum/Shaders/PhongGL.cpp index 4dfa76ae3..de4494706 100644 --- a/src/Magnum/Shaders/PhongGL.cpp +++ b/src/Magnum/Shaders/PhongGL.cpp @@ -280,51 +280,16 @@ PhongGL& PhongGL::setAmbientColor(const Magnum::Color4& color) { return *this; } -PhongGL& PhongGL::bindAmbientTexture(GL::Texture2D& texture) { - CORRADE_ASSERT(_flags & Flag::AmbientTexture, - "Shaders::PhongGL::bindAmbientTexture(): the shader was not created with ambient texture enabled", *this); - texture.bind(AmbientTextureUnit); - return *this; -} - PhongGL& PhongGL::setDiffuseColor(const Magnum::Color4& color) { if(_lightCount) setUniform(_diffuseColorUniform, color); return *this; } -PhongGL& PhongGL::bindDiffuseTexture(GL::Texture2D& texture) { - CORRADE_ASSERT(_flags & Flag::DiffuseTexture, - "Shaders::PhongGL::bindDiffuseTexture(): the shader was not created with diffuse texture enabled", *this); - if(_lightCount) texture.bind(DiffuseTextureUnit); - return *this; -} - PhongGL& PhongGL::setSpecularColor(const Magnum::Color4& color) { if(_lightCount) setUniform(_specularColorUniform, color); return *this; } -PhongGL& PhongGL::bindSpecularTexture(GL::Texture2D& texture) { - CORRADE_ASSERT(_flags & Flag::SpecularTexture, - "Shaders::PhongGL::bindSpecularTexture(): the shader was not created with specular texture enabled", *this); - if(_lightCount) texture.bind(SpecularTextureUnit); - return *this; -} - -PhongGL& PhongGL::bindNormalTexture(GL::Texture2D& texture) { - CORRADE_ASSERT(_flags & Flag::NormalTexture, - "Shaders::PhongGL::bindNormalTexture(): the shader was not created with normal texture enabled", *this); - if(_lightCount) texture.bind(NormalTextureUnit); - return *this; -} - -PhongGL& PhongGL::bindTextures(GL::Texture2D* ambient, GL::Texture2D* diffuse, GL::Texture2D* specular, GL::Texture2D* normal) { - CORRADE_ASSERT(_flags & (Flag::AmbientTexture|Flag::DiffuseTexture|Flag::SpecularTexture|Flag::NormalTexture), - "Shaders::PhongGL::bindTextures(): the shader was not created with any textures enabled", *this); - GL::AbstractTexture::bind(AmbientTextureUnit, {ambient, diffuse, specular, normal}); - return *this; -} - PhongGL& PhongGL::setShininess(Float shininess) { if(_lightCount) setUniform(_shininessUniform, shininess); return *this; @@ -503,6 +468,41 @@ PhongGL& PhongGL::setLightRange(const UnsignedInt id, const Float range) { return *this; } +PhongGL& PhongGL::bindAmbientTexture(GL::Texture2D& texture) { + CORRADE_ASSERT(_flags & Flag::AmbientTexture, + "Shaders::PhongGL::bindAmbientTexture(): the shader was not created with ambient texture enabled", *this); + texture.bind(AmbientTextureUnit); + return *this; +} + +PhongGL& PhongGL::bindDiffuseTexture(GL::Texture2D& texture) { + CORRADE_ASSERT(_flags & Flag::DiffuseTexture, + "Shaders::PhongGL::bindDiffuseTexture(): the shader was not created with diffuse texture enabled", *this); + if(_lightCount) texture.bind(DiffuseTextureUnit); + return *this; +} + +PhongGL& PhongGL::bindSpecularTexture(GL::Texture2D& texture) { + CORRADE_ASSERT(_flags & Flag::SpecularTexture, + "Shaders::PhongGL::bindSpecularTexture(): the shader was not created with specular texture enabled", *this); + if(_lightCount) texture.bind(SpecularTextureUnit); + return *this; +} + +PhongGL& PhongGL::bindNormalTexture(GL::Texture2D& texture) { + CORRADE_ASSERT(_flags & Flag::NormalTexture, + "Shaders::PhongGL::bindNormalTexture(): the shader was not created with normal texture enabled", *this); + if(_lightCount) texture.bind(NormalTextureUnit); + return *this; +} + +PhongGL& PhongGL::bindTextures(GL::Texture2D* ambient, GL::Texture2D* diffuse, GL::Texture2D* specular, GL::Texture2D* normal) { + CORRADE_ASSERT(_flags & (Flag::AmbientTexture|Flag::DiffuseTexture|Flag::SpecularTexture|Flag::NormalTexture), + "Shaders::PhongGL::bindTextures(): the shader was not created with any textures enabled", *this); + GL::AbstractTexture::bind(AmbientTextureUnit, {ambient, diffuse, specular, normal}); + return *this; +} + Debug& operator<<(Debug& debug, const PhongGL::Flag value) { debug << "Shaders::PhongGL::Flag" << Debug::nospace; diff --git a/src/Magnum/Shaders/PhongGL.h b/src/Magnum/Shaders/PhongGL.h index 65d4990bc..177aeed60 100644 --- a/src/Magnum/Shaders/PhongGL.h +++ b/src/Magnum/Shaders/PhongGL.h @@ -604,6 +604,10 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { /** @brief Light count */ UnsignedInt lightCount() const { return _lightCount; } + /** @{ + * @name Uniform setters + */ + /** * @brief Set ambient color * @return Reference to self (for method chaining) @@ -615,17 +619,6 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { */ PhongGL& setAmbientColor(const Magnum::Color4& color); - /** - * @brief Bind an ambient texture - * @return Reference to self (for method chaining) - * - * Expects that the shader was created with @ref Flag::AmbientTexture - * enabled. - * @see @ref bindTextures(), @ref setAmbientColor(), - * @ref Shaders-PhongGL-lights-ambient - */ - PhongGL& bindAmbientTexture(GL::Texture2D& texture); - /** * @brief Set diffuse color * @return Reference to self (for method chaining) @@ -637,17 +630,6 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { */ PhongGL& setDiffuseColor(const Magnum::Color4& color); - /** - * @brief Bind a diffuse texture - * @return Reference to self (for method chaining) - * - * Expects that the shader was created with @ref Flag::DiffuseTexture - * enabled. If @ref lightCount() is zero, this function is a no-op, as - * diffuse color doesn't contribute to the output in that case. - * @see @ref bindTextures(), @ref setDiffuseColor() - */ - PhongGL& bindDiffuseTexture(GL::Texture2D& texture); - /** * @brief Set normal texture scale * @return Reference to self (for method chaining) @@ -666,20 +648,6 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { */ PhongGL& setNormalTextureScale(Float scale); - /** - * @brief Bind a normal texture - * @return Reference to self (for method chaining) - * @m_since{2019,10} - * - * Expects that the shader was created with @ref Flag::NormalTexture - * enabled and the @ref Tangent attribute was supplied. If - * @ref lightCount() is zero, this function is a no-op, as normals - * don't contribute to the output in that case. - * @see @ref Shaders-PhongGL-normal-mapping, - * @ref bindTextures(), @ref setNormalTextureScale() - */ - PhongGL& bindNormalTexture(GL::Texture2D& texture); - /** * @brief Set specular color * @return Reference to self (for method chaining) @@ -694,36 +662,6 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { */ PhongGL& setSpecularColor(const Magnum::Color4& color); - /** - * @brief Bind a specular texture - * @return Reference to self (for method chaining) - * - * Expects that the shader was created with @ref Flag::SpecularTexture - * enabled. If @ref lightCount() is zero, this function is a no-op, as - * specular color doesn't contribute to the output in that case. - * @see @ref bindTextures(), @ref setSpecularColor() - */ - PhongGL& bindSpecularTexture(GL::Texture2D& texture); - - /** - * @brief Bind textures - * @return Reference to self (for method chaining) - * - * A particular texture has effect only if particular texture flag from - * @ref PhongGL::Flag "Flag" is set, you can use @cpp nullptr @ce for - * the rest. Expects that the shader was created with at least one of - * @ref Flag::AmbientTexture, @ref Flag::DiffuseTexture, - * @ref Flag::SpecularTexture or @ref Flag::NormalTexture enabled. More - * efficient than setting each texture separately. - * @see @ref bindAmbientTexture(), @ref bindDiffuseTexture(), - * @ref bindSpecularTexture(), @ref bindNormalTexture() - */ - PhongGL& bindTextures(GL::Texture2D* ambient, GL::Texture2D* diffuse, GL::Texture2D* specular, GL::Texture2D* normal - #ifdef MAGNUM_BUILD_DEPRECATED - = nullptr - #endif - ); - /** * @brief Set shininess * @return Reference to self (for method chaining) @@ -1009,6 +947,84 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { */ PhongGL& setLightRange(UnsignedInt id, Float range); + /** + * @} + */ + + /** @{ + * @name Texture binding + */ + + /** + * @brief Bind a diffuse texture + * @return Reference to self (for method chaining) + * + * Expects that the shader was created with @ref Flag::DiffuseTexture + * enabled. If @ref lightCount() is zero, this function is a no-op, as + * diffuse color doesn't contribute to the output in that case. + * @see @ref bindTextures(), @ref setDiffuseColor() + */ + PhongGL& bindDiffuseTexture(GL::Texture2D& texture); + + /** + * @brief Bind an ambient texture + * @return Reference to self (for method chaining) + * + * Expects that the shader was created with @ref Flag::AmbientTexture + * enabled. + * @see @ref bindTextures(), @ref setAmbientColor(), + * @ref Shaders-PhongGL-lights-ambient + */ + PhongGL& bindAmbientTexture(GL::Texture2D& texture); + + /** + * @brief Bind a normal texture + * @return Reference to self (for method chaining) + * @m_since{2019,10} + * + * Expects that the shader was created with @ref Flag::NormalTexture + * enabled and the @ref Tangent attribute was supplied. If + * @ref lightCount() is zero, this function is a no-op, as normals + * don't contribute to the output in that case. + * @see @ref Shaders-PhongGL-normal-mapping, + * @ref bindTextures(), @ref setNormalTextureScale() + */ + PhongGL& bindNormalTexture(GL::Texture2D& texture); + + /** + * @brief Bind a specular texture + * @return Reference to self (for method chaining) + * + * Expects that the shader was created with @ref Flag::SpecularTexture + * enabled. If @ref lightCount() is zero, this function is a no-op, as + * specular color doesn't contribute to the output in that case. + * @see @ref bindTextures(), @ref setSpecularColor() + */ + PhongGL& bindSpecularTexture(GL::Texture2D& texture); + + /** + * @brief Bind textures + * @return Reference to self (for method chaining) + * + * A particular texture has effect only if particular texture flag from + * @ref PhongGL::Flag "Flag" is set, you can use @cpp nullptr @ce for + * the rest. Expects that the shader was created with at least one of + * @ref Flag::AmbientTexture, @ref Flag::DiffuseTexture, + * @ref Flag::SpecularTexture or @ref Flag::NormalTexture enabled. More + * efficient than setting each texture separately. + * @see @ref bindAmbientTexture(), @ref bindDiffuseTexture(), + * @ref bindSpecularTexture(), @ref bindNormalTexture() + */ + PhongGL& bindTextures(GL::Texture2D* ambient, GL::Texture2D* diffuse, GL::Texture2D* specular, GL::Texture2D* normal + #ifdef MAGNUM_BUILD_DEPRECATED + = nullptr + #endif + ); + + /** + * @} + */ + private: /* Prevent accidentally calling irrelevant functions */ #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/Shaders/VectorGL.h b/src/Magnum/Shaders/VectorGL.h index 8cca43e87..f8a8f0db1 100644 --- a/src/Magnum/Shaders/VectorGL.h +++ b/src/Magnum/Shaders/VectorGL.h @@ -150,6 +150,10 @@ template class MAGNUM_SHADERS_EXPORT VectorGL: public Ab */ Flags flags() const { return _flags; } + /** @{ + * @name Uniform setters + */ + /** * @brief Set transformation and projection matrix * @return Reference to self (for method chaining) @@ -187,6 +191,10 @@ template class MAGNUM_SHADERS_EXPORT VectorGL: public Ab */ VectorGL& setColor(const Color4& color); + /** + * @} + */ + #ifndef DOXYGEN_GENERATING_OUTPUT /* Overloads to remove WTF-factor from method chaining order */ VectorGL& bindVectorTexture(GL::Texture2D& texture) { diff --git a/src/Magnum/Shaders/VertexColorGL.h b/src/Magnum/Shaders/VertexColorGL.h index 5bbd17fdc..513312fba 100644 --- a/src/Magnum/Shaders/VertexColorGL.h +++ b/src/Magnum/Shaders/VertexColorGL.h @@ -135,6 +135,10 @@ template class MAGNUM_SHADERS_EXPORT VertexColorGL: publ /** @brief Move assignment */ VertexColorGL& operator=(VertexColorGL&&) noexcept = default; + /** @{ + * @name Uniform setters + */ + /** * @brief Set transformation and projection matrix * @return Reference to self (for method chaining) @@ -143,6 +147,10 @@ template class MAGNUM_SHADERS_EXPORT VertexColorGL: publ */ VertexColorGL& setTransformationProjectionMatrix(const MatrixTypeFor& matrix); + /** + * @} + */ + private: /* Prevent accidentally calling irrelevant functions */ #ifndef MAGNUM_TARGET_GLES