From 6995ad4fa75317d4cd6bc527bbddf194395c4a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 13 Mar 2023 13:09:53 +0100 Subject: [PATCH] Shaders: update outdated docs about passing stuff to constructors. There's a Configuration class now. --- src/Magnum/Shaders/FlatGL.h | 8 ++++---- src/Magnum/Shaders/MeshVisualizerGL.h | 12 ++++++------ src/Magnum/Shaders/PhongGL.h | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Magnum/Shaders/FlatGL.h b/src/Magnum/Shaders/FlatGL.h index 1315ec1eb..e33e183ed 100644 --- a/src/Magnum/Shaders/FlatGL.h +++ b/src/Magnum/Shaders/FlatGL.h @@ -94,10 +94,10 @@ Common rendering setup: @section Shaders-FlatGL-textured Textured rendering If you want to use a texture, you need to provide also the -@ref TextureCoordinates attribute. Pass @ref Flag::Textured to the constructor -and then at render time don't forget to bind also the texture via -@ref bindTexture(). The texture is multiplied by the color, which is by default -set to @cpp 0xffffffff_rgbaf @ce. Common mesh setup: +@ref TextureCoordinates attribute. Pass @ref Flag::Textured to +@ref Configuration::setFlags() and then at render time don't forget to bind +also the texture via @ref bindTexture(). The texture is multiplied by the +color, which is by default set to @cpp 0xffffffff_rgbaf @ce. Common mesh setup: @snippet MagnumShaders-gl.cpp FlatGL-usage-textured1 diff --git a/src/Magnum/Shaders/MeshVisualizerGL.h b/src/Magnum/Shaders/MeshVisualizerGL.h index f8fada44f..459d38134 100644 --- a/src/Magnum/Shaders/MeshVisualizerGL.h +++ b/src/Magnum/Shaders/MeshVisualizerGL.h @@ -170,10 +170,10 @@ configure the shader. @endparblock The shader expects that you enable wireframe visualization by passing an -appropriate @ref Flag to the constructor --- there's no default behavior with -nothing enabled. The shader is a 2D variant of @ref MeshVisualizerGL3D with -mostly identical workflow. See its documentation for more information, -workflows that differ are shown below. +appropriate @ref Flag to @ref Configuration::setFlags() --- there's no default +behavior with nothing enabled. The shader is a 2D variant of +@ref MeshVisualizerGL3D with mostly identical workflow. See its documentation +for more information, workflows that differ are shown below. @section Shaders-MeshVisualizerGL2D-instancing Instanced rendering @@ -1390,8 +1390,8 @@ shader. The shader expects that you enable wireframe visualization, tangent space visualization or object/primitive ID visualization by passing an appropriate -@ref Flag to the constructor --- there's no default behavior with nothing -enabled. +@ref Flag to @ref Configuration::setFlags() --- there's no default behavior +with nothing enabled. @section Shaders-MeshVisualizerGL3D-wireframe Wireframe visualization diff --git a/src/Magnum/Shaders/PhongGL.h b/src/Magnum/Shaders/PhongGL.h index b196ce3c5..5f8d61659 100644 --- a/src/Magnum/Shaders/PhongGL.h +++ b/src/Magnum/Shaders/PhongGL.h @@ -69,11 +69,11 @@ Common rendering setup: If you want to use textures, you need to provide also the @ref TextureCoordinates attribute. Pass appropriate @ref Flag combination to -the constructor and then at render time don't forget to also call appropriate -subset of @ref bindAmbientTexture(), @ref bindDiffuseTexture() and -@ref bindSpecularTexture() (or the combined @ref bindTextures()). The texture -is multiplied by the color, which is by default set to fully opaque white for -enabled textures. Mesh setup with a diffuse and a specular texture: +@ref Configuration::setFlags() and then at render time don't forget to also +call appropriate subset of @ref bindAmbientTexture(), @ref bindDiffuseTexture() +and @ref bindSpecularTexture() (or the combined @ref bindTextures()). The +texture is multiplied by the color, which is by default set to fully opaque +white for enabled textures. Mesh setup with a diffuse and a specular texture: @snippet MagnumShaders-gl.cpp PhongGL-usage-texture1 @@ -84,8 +84,8 @@ Common rendering setup: @section Shaders-PhongGL-lights Light specification By default, the shader provides a single directional "fill" light, coming from -the center of the camera. Using the @p lightCount parameter in constructor, you -can specify how many lights you want, and then control light parameters using +the center of the camera. With @ref Configuration::setLightCount() you can +specify how many lights you want, and then control light parameters using @ref setLightPositions(), @ref setLightColors(), @ref setLightSpecularColors() and @ref setLightRanges(). Light positions are specified as four-component vectors, the last component distinguishing between directional and point