Browse Source

Shaders: update outdated docs about passing stuff to constructors.

There's a Configuration class now.
pull/617/head
Vladimír Vondruš 3 years ago
parent
commit
6995ad4fa7
  1. 8
      src/Magnum/Shaders/FlatGL.h
  2. 12
      src/Magnum/Shaders/MeshVisualizerGL.h
  3. 14
      src/Magnum/Shaders/PhongGL.h

8
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

12
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

14
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

Loading…
Cancel
Save