Browse Source

Shaders: documentation improvements.

pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
ae9462b4c8
  1. 4
      src/Magnum/Shaders/AbstractVector.h
  2. 20
      src/Magnum/Shaders/DistanceFieldVector.h
  3. 15
      src/Magnum/Shaders/MeshVisualizer.h
  4. 2
      src/Magnum/Shaders/Phong.h
  5. 2
      src/Magnum/Shaders/Shaders.h
  6. 4
      src/Magnum/Shaders/VertexColor.h

4
src/Magnum/Shaders/AbstractVector.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Shaders::AbstractVector, typedef Magnum::Shaders::AbstractVector2D, Magnum::Shaders::AbstractVector3D
* @brief Class @ref Magnum::Shaders::AbstractVector, typedef @ref Magnum::Shaders::AbstractVector2D, @ref Magnum::Shaders::AbstractVector3D
*/
#include "Magnum/Shaders/Generic.h"
@ -36,7 +36,7 @@ namespace Magnum { namespace Shaders {
/**
@brief Base for vector shaders
@see AbstractVector2D, AbstractVector3D
@see @ref AbstractVector2D, @ref AbstractVector3D
*/
template<UnsignedInt dimensions> class AbstractVector: public AbstractShaderProgram {
public:

20
src/Magnum/Shaders/DistanceFieldVector.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Shaders::DistanceFieldVector, typedef Magnum::Shaders::DistanceFieldVector2D, Magnum::Shaders::DistanceFieldVector3D
* @brief Class @ref Magnum::Shaders::DistanceFieldVector, typedef @ref Magnum::Shaders::DistanceFieldVector2D, @ref Magnum::Shaders::DistanceFieldVector3D
*/
#include "Magnum/Color.h"
@ -41,10 +41,10 @@ namespace Magnum { namespace Shaders {
/**
@brief Distance field vector shader
Renders vector art in form of signed distance field. See TextureTools::distanceField()
Renders vector art in form of signed distance field. See @ref TextureTools::distanceField()
for more information. Note that the final rendered outlook will greatly depend
on radius of input distance field and value passed to setSmoothness().
@see DistanceFieldVector2D, DistanceFieldVector3D
on radius of input distance field and value passed to @ref setSmoothness().
@see @ref DistanceFieldVector2D, @ref DistanceFieldVector3D
@todo Use fragment shader derivations to have proper smoothness in perspective/
large zoom levels, make it optional as it might have negative performance
impact
@ -66,7 +66,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT DistanceFieldVector
* @brief Set fill color
* @return Reference to self (for method chaining)
*
* @see setOutlineColor()
* @see @ref setOutlineColor()
*/
DistanceFieldVector& setColor(const Color4& color) {
AbstractShaderProgram::setUniform(colorUniform, color);
@ -77,7 +77,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT DistanceFieldVector
* @brief Set outline color
* @return Reference to self (for method chaining)
*
* @see setOutlineRange(), setColor()
* @see @ref setOutlineRange(), @ref setColor()
*/
DistanceFieldVector& setOutlineColor(const Color4& color) {
AbstractShaderProgram::setUniform(outlineColorUniform, color);
@ -96,7 +96,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT DistanceFieldVector
* larger than @p start the outline is not drawn. Initial value is
* `1.0f`.
*
* @see setOutlineColor()
* @see @ref setOutlineColor()
*/
DistanceFieldVector& setOutlineRange(Float start, Float end) {
AbstractShaderProgram::setUniform(outlineRangeUniform, Vector2(start, end));
@ -107,9 +107,9 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT DistanceFieldVector
* @brief Set smoothness radius
* @return Reference to self (for method chaining)
*
* Larger values will make edges look less aliased (but blurry), smaller
* values will make them look more crisp (but possibly aliased). Initial
* value is `0.04f`.
* Larger values will make edges look less aliased (but blurry),
* smaller values will make them look more crisp (but possibly
* aliased). Initial value is `0.04f`.
*/
DistanceFieldVector& setSmoothness(Float value) {
AbstractShaderProgram::setUniform(smoothnessUniform, value);

15
src/Magnum/Shaders/MeshVisualizer.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Shaders::MeshVisualizer
* @brief Class @ref Magnum::Shaders::MeshVisualizer
*/
#include "Magnum/Math/Matrix4.h"
@ -56,9 +56,9 @@ If you have geometry shaders available, you don't need to do anything else.
If you don't have geometry shaders, you need to set @ref Flag::NoGeometryShader
(it's enabled by default in OpenGL ES) and use only **non-indexed** triangle
meshes (see MeshTools::duplicate() for possible solution). Additionaly, if you
have OpenGL < 3.1 or OpenGL ES 2.0, you need to provide also @ref VertexIndex
attribute.
meshes (see @ref MeshTools::duplicate() for possible solution). Additionaly, if
you have OpenGL < 3.1 or OpenGL ES 2.0, you need to provide also
@ref VertexIndex attribute.
@requires_es_extension %Extension @extension{OES,standard_derivatives} for
wireframe rendering.
@ -83,7 +83,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
/**
* @brief %Flag
*
* @see Flags, MeshVisualizer()
* @see @ref Flags, @ref MeshVisualizer()
*/
enum class Flag: UnsignedByte {
/**
@ -98,8 +98,9 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
/**
* Don't use geometry shader for wireframe visualization. If
* enabled, you might need to provide also VertexIndex attribute in
* the mesh. In OpenGL ES enabled alongside @ref Flag::Wireframe.
* enabled, you might need to provide also @ref VertexIndex
* attribute in the mesh. In OpenGL ES enabled alongside
* @ref Flag::Wireframe.
*/
NoGeometryShader = 1 << 1
};

2
src/Magnum/Shaders/Phong.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Shaders::Phong
* @brief Class @ref Magnum::Shaders::Phong
*/
#include "Magnum/Color.h"

2
src/Magnum/Shaders/Shaders.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Forward declarations for Magnum::Shaders namespace
* @brief Forward declarations for @ref Magnum::Shaders namespace
*/
#include "Magnum/Types.h"

4
src/Magnum/Shaders/VertexColor.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Shaders::VertexColor
* @brief Class @ref Magnum::Shaders::VertexColor
*/
#include "Magnum/Color.h"
@ -42,7 +42,7 @@ namespace Magnum { namespace Shaders {
@brief Vertex color shader
Draws vertex-colored mesh.
@see VertexColor2D, VertexColor3D
@see @ref VertexColor2D, @ref VertexColor3D
*/
template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT VertexColor: public AbstractShaderProgram {
public:

Loading…
Cancel
Save