Browse Source

Removed enum-referencing Doxygen workarounds.

In 1.8.5 it is now possible to reference directly to enum member.
Hooray! Also added explicit @ref here and there, fixing some referencing
bugs along the way.
pull/23/head
Vladimír Vondruš 13 years ago
parent
commit
13d5e2a50f
  1. 10
      doc/best-practices.dox
  2. 15
      src/AbstractFramebuffer.h
  3. 17
      src/AbstractResourceLoader.h
  4. 11
      src/AbstractShaderProgram.h
  5. 11
      src/AbstractTexture.h
  6. 13
      src/Audio/AbstractImporter.h
  7. 2
      src/Audio/Renderer.h
  8. 7
      src/Audio/Source.h
  9. 20
      src/Buffer.h
  10. 8
      src/Context.h
  11. 10
      src/CubeMapTexture.h
  12. 4
      src/CubeMapTextureArray.h
  13. 8
      src/DebugTools/ShapeRenderer.h
  14. 8
      src/DefaultFramebuffer.h
  15. 10
      src/Mesh.h
  16. 2
      src/Platform/GlutApplication.h
  17. 2
      src/Platform/NaClApplication.h
  18. 4
      src/Platform/Sdl2Application.h
  19. 127
      src/Renderer.h
  20. 6
      src/Resource.h
  21. 4
      src/ResourceManager.h
  22. 16
      src/SceneGraph/AbstractFeature.h
  23. 89
      src/SceneGraph/Animable.h
  24. 26
      src/Shaders/MeshVisualizer.h
  25. 17
      src/Shaders/Phong.h
  26. 41
      src/Text/AbstractFont.h
  27. 204
      src/Text/AbstractFontConverter.h
  28. 2
      src/Text/DistanceFieldGlyphCache.h
  29. 2
      src/Text/GlyphCache.h
  30. 24
      src/Texture.h
  31. 11
      src/TextureTools/DistanceField.h
  32. 22
      src/Trade/AbstractImageConverter.h
  33. 22
      src/Trade/AbstractImporter.h
  34. 12
      src/Trade/PhongMaterialData.h
  35. 2
      src/Trade/TextureData.h

10
doc/best-practices.dox

@ -56,11 +56,11 @@ information.
@subsubsection best-practices-nacl-buffer-types Native Client requires unique buffer binding
As noted in the above link, buffers in NaCl implementation need to be bound
only to one unique target, i.e., Buffer bound to @ref Buffer::Target "Target::Array"
cannot be later rebound to @ref Buffer::Target "Target::ElementArray". However,
%Magnum by default uses any sufficient target when binding the buffer
internally (e.g. for setting data or copying). To avoid this, set target hint
to desired target, either in constructor or using Buffer::setTargetHint().
only to one unique target, i.e., @ref Buffer bound to @ref Buffer::Target::Array
cannot be later rebound to @ref Buffer::Target::ElementArray. However, %Magnum
by default uses any sufficient target when binding the buffer internally (e.g.
for setting data or copying). To avoid this, set target hint to desired target,
either in constructor or using @ref Buffer::setTargetHint().
To ease up the development, @ref Mesh checks proper target hint when adding
vertex and index buffers.

15
src/AbstractFramebuffer.h

@ -157,12 +157,12 @@ class MAGNUM_EXPORT AbstractFramebuffer {
* @param mask Which buffers to perform blit operation on
* @param filter Interpolation filter
*
* Binds @p source framebuffer to @ref FramebufferTarget "FramebufferTarget::Read"
* and @p destination framebuffer to @ref FramebufferTarget "FramebufferTarget::Draw"
* and performs blitting operation. See DefaultFramebuffer::mapForRead(),
* Framebuffer::mapForRead(), DefaultFramebuffer::mapForDraw() and
* Framebuffer::mapForDraw() for specifying particular buffers for
* blitting operation.
* Binds @p source framebuffer to @ref FramebufferTarget::Read and
* @p destination framebuffer to @ref FramebufferTarget::Draw and
* performs blitting operation. See @ref DefaultFramebuffer::mapForRead(),
* @ref Framebuffer::mapForRead(), @ref DefaultFramebuffer::mapForDraw()
* and @ref Framebuffer::mapForDraw() for specifying particular buffers
* for blitting operation.
* @see @fn_gl{BlitFramebuffer}
* @requires_gles30 %Extension @es_extension{ANGLE,framebuffer_blit} or
* @es_extension{NV,framebuffer_blit}
@ -179,8 +179,7 @@ class MAGNUM_EXPORT AbstractFramebuffer {
* Convenience alternative to above function when source rectangle is
* the same as destination rectangle. As the image is copied
* pixel-by-pixel, no interpolation is needed and thus
* @ref FramebufferBlitFilter "FramebufferBlitFilter::Nearest"
* filtering is used by default.
* @ref FramebufferBlitFilter::Nearest filtering is used by default.
* @see @fn_gl{BlitFramebuffer}
* @requires_gles30 %Extension @es_extension{ANGLE,framebuffer_blit} or
* @es_extension{NV,framebuffer_blit}

17
src/AbstractResourceLoader.h

@ -140,9 +140,9 @@ template<class T> class AbstractResourceLoader {
* @brief Request resource to be loaded
*
* If the resource isn't yet loaded or loading, state of the resource
* is set to @ref Resource::ResourceState "ResourceState::Loading" and count of
* requested features is incremented. Depending on implementation the
* resource might be loaded synchronously or asynchronously.
* is set to @ref ResourceState::Loading and count of requested
* features is incremented. Depending on implementation the resource
* might be loaded synchronously or asynchronously.
*
* @see ResourceManager::state(), requestedCount(), notFoundCount(),
* loadedCount()
@ -153,10 +153,9 @@ template<class T> class AbstractResourceLoader {
/**
* @brief Set loaded resource to resource manager
*
* Also increments count of loaded resources. Parameter @p state
* must be either @ref ResourceManager::ResourceDataState "ResourceDataState::Mutable"
* or @ref ResourceManager::ResourceDataState "ResourceDataState::Final". See
* ResourceManager::set() for more information.
* Also increments count of loaded resources. Parameter @p state must
* be either @ref ResourceDataState::Mutable or @ref ResourceDataState::Final.
* See @ref ResourceManager::set() for more information.
* @see loadedCount()
*/
void set(ResourceKey key, T* data, ResourceDataState state, ResourcePolicy policy);
@ -169,8 +168,8 @@ template<class T> class AbstractResourceLoader {
/**
* @brief Set loaded resource to resource manager
*
* Same as above function with state set to @ref ResourceDataState "ResourceDataState::Final"
* and policy to @ref ResourcePolicy "ResourcePolicy::Resident".
* Same as above function with state set to @ref ResourceDataState::Final
* and policy to @ref ResourcePolicy::Resident.
*/
void set(ResourceKey key, T* data) {
set(key, data, ResourceDataState::Final, ResourcePolicy::Resident);

11
src/AbstractShaderProgram.h

@ -951,10 +951,9 @@ always have vertex attribute with location `0`.
Template parameter @p T is the type which is used for shader attribute, e.g.
@ref Vector4i for `ivec4`. DataType is type of passed data when adding vertex
buffers to mesh. By default it is the same as type used in shader (e.g.
@ref DataType "DataType::Int" for @ref Vector4i). It's also possible to pass
integer data to floating-point shader inputs. In this case you may want to
normalize the values (e.g. color components from 0-255 to 0.0f - 1.0f) -- see
@ref DataOption "DataOption::Normalize".
@ref DataType::Int for @ref Vector4i). It's also possible to pass integer data
to floating-point shader inputs. In this case you may want to normalize the
values (e.g. color components from 0-255 to 0.0f - 1.0f) -- see @ref DataOption::Normalize.
Only some types are allowed as attribute types, see @ref AbstractShaderProgram-types
or TypeTraits::AttributeType for more information.
@ -1123,11 +1122,11 @@ template<UnsignedInt location, class T> class AbstractShaderProgram::Attribute {
/**
* @brief Constructor
* @param dataType Type of passed data. Default is the same as
* type used in shader (e.g. DataType::Integer for Vector4i).
* type used in shader (e.g. @ref DataType::Int for @ref Vector4i).
* @param dataOptions Data options. Default is no options.
*
* Component count is set to the same value as in type used in shader
* (e.g. @ref Components "Components::Three" for Vector3).
* (e.g. @ref Components::Three for @ref Vector3).
*/
constexpr Attribute(DataType dataType = Implementation::Attribute<T>::DefaultDataType, DataOptions dataOptions = DataOptions()): _components(Implementation::Attribute<T>::DefaultComponents), _dataType(dataType), _dataOptions(dataOptions) {}

11
src/AbstractTexture.h

@ -146,11 +146,10 @@ class MAGNUM_EXPORT AbstractTexture {
* Sets filter used when the object pixel size is smaller than the
* texture size. If @extension{EXT,direct_state_access} is not
* available, the texture is bound to some layer before the operation.
* Initial value is (@ref Sampler::Filter "Sampler::Filter::Nearest",
* @ref Sampler::Mipmap "Sampler::Mipmap::Linear").
* Initial value is (@ref Sampler::Filter::Nearest, @ref Sampler::Mipmap::Linear).
* @attention For rectangle textures only some modes are supported,
* see @ref Sampler::Filter "Sampler::Filter" and @ref Sampler::Mipmap "Sampler::Mipmap"
* documentation for more information.
* see @ref Sampler::Filter and @ref Sampler::Mipmap documentation
* for more information.
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter}
* or @fn_gl_extension{TextureParameter,EXT,direct_state_access}
* with @def_gl{TEXTURE_MIN_FILTER}
@ -165,7 +164,7 @@ class MAGNUM_EXPORT AbstractTexture {
* Sets filter used when the object pixel size is larger than largest
* texture size. If @extension{EXT,direct_state_access} is not
* available, the texture is bound to some layer before the operation.
* Initial value is @ref Sampler::Filter "Sampler::Filter::Linear".
* Initial value is @ref Sampler::Filter::Linear.
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter}
* or @fn_gl_extension{TextureParameter,EXT,direct_state_access}
* with @def_gl{TEXTURE_MAG_FILTER}
@ -180,7 +179,7 @@ class MAGNUM_EXPORT AbstractTexture {
* @brief Set border color
* @return Reference to self (for method chaining)
*
* Border color when wrapping is set to @ref Sampler::Wrapping "Sampler::Wrapping::ClampToBorder".
* Border color when wrapping is set to @ref Sampler::Wrapping::ClampToBorder.
* If @extension{EXT,direct_state_access} is not available, the texture
* is bound to some layer before the operation. Initial value is
* `{0.0f, 0.0f, 0.0f, 0.0f}`.

13
src/Audio/AbstractImporter.h

@ -49,8 +49,8 @@ checked by the implementation:
- Functions doOpenData() and doOpenFile() are called after the previous file
was closed, function doClose() is called only if there is any file opened.
- Function doOpenData() is called only if @ref Feature "Feature::OpenData"
is supported.
- Function doOpenData() is called only if @ref Feature::OpenData is
supported.
- All `do*()` implementations working on opened file are called only if
there is any file opened.
*/
@ -91,8 +91,8 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin
* @brief Open raw data
*
* Closes previous file, if it was opened, and tries to open given
* file. Available only if @ref Feature "Feature::OpenData" is
* supported. Returns `true` on success, `false` otherwise.
* file. Available only if @ref Feature::OpenData is supported. Returns
* `true` on success, `false` otherwise.
* @see features(), openFile()
*/
bool openData(Containers::ArrayReference<const unsigned char> data);
@ -139,9 +139,8 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin
/**
* @brief Implementation for openFile()
*
* If @ref Feature "Feature::OpenData" is supported, default
* implementation opens the file and calls doOpenData() with its
* contents.
* If @ref Feature::OpenData is supported, default implementation opens
* the file and calls @ref doOpenData() with its contents.
*/
virtual void doOpenFile(const std::string& filename);

2
src/Audio/Renderer.h

@ -174,7 +174,7 @@ class Renderer {
/**
* @brief Set distance model
*
* Default is @ref DistanceModel "DistanceModel::InverseClamped".
* Default is @ref DistanceModel::InverseClamped.
* @see @fn_al{DistanceModel}
*/
static void setDistanceModel(DistanceModel model) {

7
src/Audio/Source.h

@ -347,10 +347,9 @@ class MAGNUM_AUDIO_EXPORT Source {
* @param buffer Buffer to attach or `nullptr`
* @return Reference to self (for method chaining)
*
* If an buffer is attached, changes source type to
* @ref Type "Type::Static", if detached, changes source type to
* @ref Type "Type::Undetermined". The buffer must be already filled
* with data.
* If an buffer is attached, changes source type to @ref Type::Static,
* if detached, changes source type to @ref Type::Undetermined. The
* buffer must be already filled with data.
* @see @ref type(), @fn_al{Sourcei} with @def_al{BUFFER}
*/
Source& setBuffer(Buffer* buffer);

20
src/Buffer.h

@ -89,8 +89,8 @@ for(std::size_t i = 0; i != 200; ++i)
CORRADE_INTERNAL_ASSERT_OUTPUT(buffer.unmap());
@endcode
If you are updating only a few discrete portions of the buffer, you can use
@ref MapFlag "MapFlag::FlushExplicit" and flushMappedRange() to reduce number
of memory operations performed by OpenGL on unmapping. Example:
@ref MapFlag::FlushExplicit and flushMappedRange() to reduce number of memory
operations performed by OpenGL on unmapping. Example:
@code
Vector3* data = static_cast<Vector3*>(buffer.map(0, 200*sizeof(Vector3), Buffer::MapFlag::Write|Buffer::MapFlag::FlushExplicit));
for(std::size_t i: {7, 27, 56, 128}) {
@ -382,7 +382,7 @@ class MAGNUM_EXPORT Buffer {
/**
* Previous contents of the entire buffer may be discarded. May
* not be used in combination with @ref MapFlag "MapFlag::Read".
* not be used in combination with @ref MapFlag::Read.
* @see invalidateData()
*/
#ifndef MAGNUM_TARGET_GLES2
@ -393,7 +393,7 @@ class MAGNUM_EXPORT Buffer {
/**
* Previous contents of mapped range may be discarded. May not
* be used in combination with @ref MapFlag "MapFlag::Read".
* be used in combination with @ref MapFlag::Read.
* @see invalidateSubData()
*/
#ifndef MAGNUM_TARGET_GLES2
@ -405,7 +405,7 @@ class MAGNUM_EXPORT Buffer {
/**
* Only one or more discrete subranges of the mapping will be
* modified. See flushMappedRange() for more information. May only
* be used in conjuction with @ref MapFlag "MapFlag::Write".
* be used in conjuction with @ref MapFlag::Write.
*/
#ifndef MAGNUM_TARGET_GLES2
FlushExplicit = GL_MAP_FLUSH_EXPLICIT_BIT,
@ -683,7 +683,7 @@ class MAGNUM_EXPORT Buffer {
*
* If running on OpenGL ES or extension @extension{ARB,invalidate_subdata}
* is not available, this function does nothing.
* @see @ref MapFlag "MapFlag::InvalidateBuffer", @fn_gl{InvalidateBufferData}
* @see @ref MapFlag::InvalidateBuffer, @fn_gl{InvalidateBufferData}
*/
Buffer& invalidateData() {
(this->*invalidateImplementation)();
@ -698,7 +698,7 @@ class MAGNUM_EXPORT Buffer {
*
* If running on OpenGL ES or extension @extension{ARB,invalidate_subdata}
* is not available, this function does nothing.
* @see @ref MapFlag "MapFlag::InvalidateRange", @fn_gl{InvalidateBufferData}
* @see @ref MapFlag::InvalidateRange, @fn_gl{InvalidateBufferData}
*/
Buffer& invalidateSubData(GLintptr offset, GLsizeiptr length) {
(this->*invalidateSubImplementation)(offset, length);
@ -753,8 +753,8 @@ class MAGNUM_EXPORT Buffer {
* @brief Map buffer to client memory
* @param offset Offset into the buffer
* @param length Length of the mapped memory
* @param flags Flags. At least @ref MapFlag "MapFlag::Read" or
* @ref MapFlag "MapFlag::Write" must be specified.
* @param flags Flags. At least @ref MapFlag::Read or @ref MapFlag::Write
* must be specified.
* @return Pointer to buffer data
*
* If @extension{EXT,direct_state_access} is not available and the
@ -776,7 +776,7 @@ class MAGNUM_EXPORT Buffer {
* @return Reference to self (for method chaining)
*
* Flushes specified subsection of mapped range. Use only if you called
* map() with @ref MapFlag "MapFlag::FlushExplicit" flag. See
* map() with @ref MapFlag::FlushExplicit flag. See
* @ref Buffer-data-mapping "class documentation" for usage example.
*
* If @extension{EXT,direct_state_access} is not available and the

8
src/Context.h

@ -67,7 +67,7 @@ enum class Version: Int {
*
* All the functionality is present in OpenGL 4.2 (extension
* @extension{ARB,ES2_compatibility}), so on desktop OpenGL this is
* equivalent to @ref Version "Version::GL410".
* equivalent to @ref Version::GL410.
*/
#ifndef MAGNUM_TARGET_GLES
GLES200 = 410,
@ -80,7 +80,7 @@ enum class Version: Int {
*
* All the functionality is present in OpenGL 4.3 (extension
* @extension{ARB,ES3_compatibility}), so on desktop OpenGL this is the
* equivalent to @ref Version "Version::GL430".
* equivalent to @ref Version::GL430.
*/
#ifndef MAGNUM_TARGET_GLES
GLES300 = 430
@ -315,8 +315,8 @@ class MAGNUM_EXPORT Context {
* @endcode
*
* If no version from the list is supported, returns lowest available
* OpenGL version (@ref Version "Version::GL210" for desktop OpenGL,
* @ref Version "Version::GLES200" for OpenGL ES).
* OpenGL version (@ref Version::GL210 for desktop OpenGL, @ref Version::GLES200
* for OpenGL ES).
*/
Version supportedVersion(std::initializer_list<Version> versions) const;

10
src/CubeMapTexture.h

@ -73,8 +73,8 @@ is signed three-part vector from the center of the cube, which intersects one
of the six sides of the cube map. See also AbstractShaderProgram for more
information about usage in shaders.
@see @ref Renderer::Feature "Renderer::Feature::SeamlessCubeMapTexture",
CubeMapTextureArray, Texture, BufferTexture
@see @ref Renderer::Feature::SeamlessCubeMapTexture, @ref CubeMapTextureArray,
@ref Texture, @ref BufferTexture
*/
class CubeMapTexture: public AbstractTexture {
public:
@ -213,10 +213,10 @@ class CubeMapTexture: public AbstractTexture {
* @param size Size of invalidated data
*
* Z coordinate is equivalent to number of texture face, i.e.
* @ref Coordinate "Coordinate::PositiveX" is `0` and so on, in the
* same order as in the enum.
* @ref Coordinate::PositiveX is `0` and so on, in the same order as in
* the enum.
*
* See Texture::invalidateSubImage() for more information.
* See @ref Texture::invalidateSubImage() for more information.
*/
void invalidateSubImage(Int level, const Vector3i& offset, const Vector3i& size) {
DataHelper<3>::invalidateSubImage(this, level, offset, size);

4
src/CubeMapTextureArray.h

@ -75,8 +75,8 @@ parts define vector from the center of the cube which intersects with one of
the six sides of the cube map, fourth part is layer in the array. See also
AbstractShaderProgram for more information about usage in shaders.
@see @ref Renderer::Feature "Renderer::Feature::SeamlessCubeMapTexture",
CubeMapTexture, Texture, BufferTexture
@see @ref Renderer::Feature::SeamlessCubeMapTexture, @ref CubeMapTexture,
@ref Texture, @ref BufferTexture
@requires_gl40 %Extension @extension{ARB,texture_cube_map_array}
@requires_gl Cube map texture arrays are not available in OpenGL ES.
*/

8
src/DebugTools/ShapeRenderer.h

@ -62,8 +62,8 @@ class ShapeRendererOptions {
* @see setRenderMode()
*/
enum class RenderMode: UnsignedByte {
Wireframe,
Solid
Wireframe, /**< Wireframe rendering */
Solid /**< Solid rendering */
};
constexpr ShapeRendererOptions(): _color(1.0f), _pointSize(0.25f), _renderMode(RenderMode::Wireframe) {}
@ -75,7 +75,7 @@ class ShapeRendererOptions {
* @brief Set shape rendering mode
* @return Reference to self (for method chaining)
*
* Default is @ref RenderMode "RenderMode::Wireframe".
* Default is @ref RenderMode::Wireframe.
*/
ShapeRendererOptions& setRenderMode(RenderMode mode) {
_renderMode = mode;
@ -103,7 +103,7 @@ class ShapeRendererOptions {
* @brief Set point size
* @return Reference to self (for method chaining)
*
* Size of rendered crosshairs, representing Shapes::Point shapes.
* Size of rendered crosshairs, representing @ref Shapes::Point shapes.
* Default is `0.25f`.
*/
ShapeRendererOptions& setPointSize(Float size) {

8
src/DefaultFramebuffer.h

@ -142,7 +142,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
/**
* Write output to back buffer.
*
* On desktop OpenGL, this is equal to @ref DrawAttachment "DrawAttachment::BackLeft".
* On desktop OpenGL, this is equal to @ref DrawAttachment::BackLeft.
*/
#ifdef MAGNUM_TARGET_GLES
Back = GL_BACK,
@ -153,7 +153,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
/**
* Write output to front buffer.
*
* On desktop OpenGL, this is equal to @ref DrawAttachment "DrawAttachment::FrontLeft".
* On desktop OpenGL, this is equal to @ref DrawAttachment::FrontLeft.
*/
#ifdef MAGNUM_TARGET_GLES
Front = GL_FRONT
@ -313,8 +313,8 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
*
* @p attachments is list of shader outputs mapped to buffer
* attachments. %Shader outputs which are not listed are not used, you
* can achieve the same by passing @ref DrawAttachment "DrawAttachment::None"
* as attachment. Example usage:
* can achieve the same by passing @ref DrawAttachment::None as
* attachment. Example usage:
* @code
* framebuffer.mapForDraw({{MyShader::ColorOutput, DefaultFramebuffer::DrawAttachment::BackLeft},
* {MyShader::NormalOutput, DefaultFramebuffer::DrawAttachment::None}});

10
src/Mesh.h

@ -381,9 +381,9 @@ class MAGNUM_EXPORT Mesh {
* @brief Set primitive type
* @return Reference to self (for method chaining)
*
* Default is @ref Primitive "Primitive::Triangles".
* @see setVertexCount(), addVertexBuffer(),
* addInterleavedVertexBuffer(), addVertexBufferStride()
* Default is @ref Primitive::Triangles.
* @see @ref setVertexCount(), @ref addVertexBuffer(),
* @ref addInterleavedVertexBuffer(), @ref addVertexBufferStride()
*/
Mesh& setPrimitive(Primitive primitive) {
_primitive = primitive;
@ -834,7 +834,7 @@ template<> struct MAGNUM_EXPORT ConfigurationValue<Magnum::Mesh::Primitive> {
/**
* @brief Reads enum value as string
*
* If the value is invalid, returns @ref Magnum::Mesh::Primitive "Mesh::Primitive::Points".
* If the value is invalid, returns @ref Magnum::Mesh::Primitive::Points "Mesh::Primitive::Points".
*/
static Magnum::Mesh::Primitive fromString(const std::string& stringValue, ConfigurationValueFlags);
};
@ -853,7 +853,7 @@ template<> struct MAGNUM_EXPORT ConfigurationValue<Magnum::Mesh::IndexType> {
/**
* @brief Read enum value as string
*
* If the value is invalid, returns @ref Magnum::Mesh::IndexType "Mesh::IndexType::UnsignedInt".
* If the value is invalid, returns @ref Magnum::Mesh::IndexType::UnsignedInt "Mesh::IndexType::UnsignedInt".
*/
static Magnum::Mesh::IndexType fromString(const std::string& stringValue, ConfigurationValueFlags);
};

2
src/Platform/GlutApplication.h

@ -322,7 +322,7 @@ class GlutApplication::Configuration {
*
* Default is `0`, thus no multisampling. The actual sample count is
* ignored, GLUT either enables it or disables. See also
* @ref Renderer::Feature "Renderer::Feature::Multisampling".
* @ref Renderer::Feature::Multisampling.
*/
Configuration& setSampleCount(Int count) {
_sampleCount = count;

2
src/Platform/NaClApplication.h

@ -333,7 +333,7 @@ class NaClApplication::Configuration {
* @return Reference to self (for method chaining)
*
* Default is `0`, thus no multisampling. See also
* @ref Renderer::Feature "Renderer::Feature::Multisampling".
* @ref Renderer::Feature::Multisampling.
*/
Configuration& setSampleCount(Int count) {
_sampleCount = count;

4
src/Platform/Sdl2Application.h

@ -267,7 +267,7 @@ class Sdl2Application::Configuration {
* @brief Set window flags
* @return Reference to self (for method chaining)
*
* Default is @ref Flag "Flag::Resizable".
* Default is @ref Flag::Resizable.
*/
Configuration& setFlags(const Flags flags) {
_flags = flags;
@ -282,7 +282,7 @@ class Sdl2Application::Configuration {
* @return Reference to self (for method chaining)
*
* Default is `0`, thus no multisampling. See also
* @ref Renderer::Feature "Renderer::Feature::Multisampling".
* @ref Renderer::Feature::Multisampling.
*/
Configuration& setSampleCount(Int count) {
_sampleCount = count;

127
src/Renderer.h

@ -222,7 +222,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set hint
*
* Initial value is @ref HintMode "HintMode::DontCare" for all targets.
* Initial value is @ref HintMode::DontCare for all targets.
* @see @fn_gl{Hint}
*/
static void setHint(Hint target, HintMode mode);
@ -244,7 +244,7 @@ class MAGNUM_EXPORT Renderer {
* @brief Set clear depth
*
* Initial value is `1.0`.
* @see @ref Feature "Feature::DepthTest", @fn_gl{ClearDepth}
* @see @ref Feature::DepthTest, @fn_gl{ClearDepth}
* @requires_gl See setClearDepth(Float), which is available in OpenGL ES.
*/
static void setClearDepth(Double depth);
@ -253,7 +253,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @overload
*
* @see @ref Feature "Feature::DepthTest", @fn_gl{ClearDepth}
* @see @ref Feature::DepthTest, @fn_gl{ClearDepth}
* If OpenGL ES, OpenGL 4.1 or extension @extension{ARB,ES2_compatibility}
* is not available, this function behaves exactly as setClearDepth(Double).
*/
@ -265,7 +265,7 @@ class MAGNUM_EXPORT Renderer {
* @brief Set clear stencil
*
* Initial value is `0`.
* @see @ref Feature "Feature::StencilTest", @fn_gl{ClearStencil}
* @see @ref Feature::StencilTest, @fn_gl{ClearStencil}
*/
static void setClearStencil(Int stencil);
@ -297,9 +297,9 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Which polygon facing to cull
*
* Initial value is @ref PolygonFacing "PolygonFacing::Back". If set to
* both front and back, only points and lines are drawn.
* @see @ref Feature "Feature::FaceCulling", setFrontFace(),
* Initial value is @ref PolygonFacing::Back. If set to both front and
* back, only points and lines are drawn.
* @see @ref Feature::FaceCulling, setFrontFace(),
* @fn_gl{CullFace}
*/
static void setFaceCullingMode(PolygonFacing mode);
@ -326,7 +326,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set provoking vertex
*
* Initial value is @ref ProvokingVertex "ProvokingVertex::LastVertexConvention".
* Initial value is @ref ProvokingVertex::LastVertexConvention.
* @see @fn_gl{ProvokingVertex}
* @requires_gl32 %Extension @extension{ARB,provoking_vertex}. Older
* versions behave always like the default.
@ -363,7 +363,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set polygon drawing mode
*
* Initial value is @ref PolygonMode "PolygonMode::Fill".
* Initial value is @ref PolygonMode::Fill.
* @see @fn_gl{PolygonMode}
* @requires_gl OpenGL ES behaves always like the default. See
* @ref Magnum::Mesh::setPrimitive() "Mesh::setPrimitive()" for
@ -377,10 +377,8 @@ class MAGNUM_EXPORT Renderer {
* @param factor Scale factor
* @param units Offset units
*
* @see @ref Feature "Feature::PolygonOffsetFill",
* @ref Feature "Feature::PolygonOffsetLine",
* @ref Feature "Feature::PolygonOffsetPoint",
* @fn_gl{PolygonOffset}
* @see @ref Feature::PolygonOffsetFill, @ref Feature::PolygonOffsetLine,
* @ref Feature::PolygonOffsetPoint, @fn_gl{PolygonOffset}
*/
static void setPolygonOffset(Float factor, Float units);
@ -397,7 +395,7 @@ class MAGNUM_EXPORT Renderer {
* @brief Set point size
*
* Initial value is `1.0f`.
* @see @ref Feature "Feature::ProgramPointSize", @fn_gl{PointSize}
* @see @ref Feature::ProgramPointSize, @fn_gl{PointSize}
* @requires_gl In OpenGL ES use `gl_PointSize` builtin vertex shader
* variable.
*/
@ -411,7 +409,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set scissor rectangle
*
* @see @ref Feature "Feature::ScissorTest", @fn_gl{Scissor}
* @see @ref Feature::ScissorTest, @fn_gl{Scissor}
*/
static void setScissor(const Rectanglei& rectangle);
@ -484,24 +482,22 @@ class MAGNUM_EXPORT Renderer {
* @brief Set stencil function
* @param facing Affected polygon facing
* @param function Stencil function. Initial value is
* @ref StencilFunction "StencilFunction::Always".
* @ref StencilFunction::Always.
* @param referenceValue Reference value. Initial value is `0`.
* @param mask Mask for both reference and buffer value.
* Initial value is all `1`s.
*
* @see @ref Feature "Feature::StencilTest",
* setStencilFunction(StencilFunction, Int, UnsignedInt),
* setStencilOperation(),
* @fn_gl{StencilFuncSeparate}
* @see @ref Feature::StencilTest, @ref setStencilFunction(StencilFunction, Int, UnsignedInt),
* @ref setStencilOperation(), @fn_gl{StencilFuncSeparate}
*/
static void setStencilFunction(PolygonFacing facing, StencilFunction function, Int referenceValue, UnsignedInt mask);
/**
* @brief Set stencil function
*
* The same as setStencilFunction(PolygonFacing, StencilFunction, Int, UnsignedInt)
* with @p facing set to @ref PolygonFacing "PolygonFacing::FrontAndBack".
* @see @ref Feature "Feature::StencilTest", setStencilOperation(),
* The same as @ref setStencilFunction(PolygonFacing, StencilFunction, Int, UnsignedInt)
* with @p facing set to @ref PolygonFacing::FrontAndBack.
* @see @ref Feature::StencilTest, @ref setStencilOperation(),
* @fn_gl{StencilFunc}
*/
static void setStencilFunction(StencilFunction function, Int referenceValue, UnsignedInt mask);
@ -515,19 +511,18 @@ class MAGNUM_EXPORT Renderer {
* @param depthPass Action when both stencil and depth test
* pass
*
* Initial value for all fields is @ref StencilOperation "StencilOperation::Keep".
* @see @ref Feature "Feature::StencilTest",
* setStencilOperation(StencilOperation, StencilOperation, StencilOperation),
* setStencilFunction(), @fn_gl{StencilOpSeparate}
* Initial value for all fields is @ref StencilOperation::Keep.
* @see @ref Feature::StencilTest, @ref setStencilOperation(StencilOperation, StencilOperation, StencilOperation),
* @ref setStencilFunction(), @fn_gl{StencilOpSeparate}
*/
static void setStencilOperation(PolygonFacing facing, StencilOperation stencilFail, StencilOperation depthFail, StencilOperation depthPass);
/**
* @brief Set stencil operation
*
* The same as setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation)
* with @p facing set to @ref PolygonFacing "PolygonFacing::FrontAndBack".
* @see @ref Feature "Feature::StencilTest", setStencilFunction(),
* The same as @ref setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation)
* with @p facing set to @ref PolygonFacing::FrontAndBack.
* @see @ref Feature::StencilTest, @ref setStencilFunction(),
* @fn_gl{StencilOp}
*/
static void setStencilOperation(StencilOperation stencilFail, StencilOperation depthFail, StencilOperation depthPass);
@ -546,8 +541,8 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set depth function
*
* Initial value is @ref DepthFunction "DepthFunction::Less".
* @see @ref Feature "Feature::DepthTest", @fn_gl{DepthFunc}
* Initial value is @ref DepthFunction::Less.
* @see @ref Feature::DepthTest, @fn_gl{DepthFunc}
*/
static void setDepthFunction(DepthFunction function);
@ -560,7 +555,7 @@ class MAGNUM_EXPORT Renderer {
*
* Set to `false` to disallow writing to given color channel. Initial
* values are all `true`.
* @see setDepthMask(), setStencilMask(), @fn_gl{ColorMask}
* @see @ref setDepthMask(), @ref setStencilMask(), @fn_gl{ColorMask}
* @todo Masking only given draw buffer
*/
static void setColorMask(GLboolean allowRed, GLboolean allowGreen, GLboolean allowBlue, GLboolean allowAlpha);
@ -587,8 +582,8 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Mask stencil writes
*
* The same as calling setStencilMask(PolygonFacing, UnsignedInt) with
* `facing` set to @ref PolygonFacing "PolygonFacing::FrontAndBack".
* The same as calling @ref setStencilMask(PolygonFacing, UnsignedInt)
* with `facing` set to @ref PolygonFacing::FrontAndBack.
* @see @fn_gl{StencilMask}
*/
static void setStencilMask(UnsignedInt allowBits);
@ -760,53 +755,52 @@ class MAGNUM_EXPORT Renderer {
* @brief Set blend equation
*
* How to combine source color (pixel value) with destination color
* (framebuffer). Initial value is @ref BlendEquation "BlendEquation::Add".
* @see @ref Feature "Feature::Blending", setBlendEquation(BlendEquation, BlendEquation),
* setBlendFunction(), setBlendColor(), @fn_gl{BlendEquation}
* (framebuffer). Initial value is @ref BlendEquation::Add.
* @see @ref Feature::Blending, @ref setBlendEquation(BlendEquation, BlendEquation),
* @ref setBlendFunction(), @ref setBlendColor(),
* @fn_gl{BlendEquation}
*/
static void setBlendEquation(BlendEquation equation);
/**
* @brief Set blend equation separately for RGB and alpha components
*
* See setBlendEquation(BlendEquation) for more information.
* @see @ref Feature "Feature::Blending", setBlendFunction(),
* setBlendColor(), @fn_gl{BlendEquationSeparate}
* See @ref setBlendEquation(BlendEquation) for more information.
* @see @ref Feature::Blending, @ref setBlendFunction(),
* @ref setBlendColor(), @fn_gl{BlendEquationSeparate}
*/
static void setBlendEquation(BlendEquation rgb, BlendEquation alpha);
/**
* @brief Set blend function
* @param source How the source blending factor is computed
* from pixel value. Initial value is @ref BlendFunction "BlendFunction::One".
* from pixel value. Initial value is @ref BlendFunction::One.
* @param destination How the destination blending factor is
* computed from framebuffer. Initial value is @ref BlendFunction "BlendFunction::Zero".
* computed from framebuffer. Initial value is @ref BlendFunction::Zero.
*
* @see @ref Feature "Feature::Blending",
* setBlendFunction(BlendFunction, BlendFunction, BlendFunction, BlendFunction),
* setBlendEquation(), setBlendColor(), @fn_gl{BlendFunc}
* @see @ref Feature::Blending, @ref setBlendFunction(BlendFunction, BlendFunction, BlendFunction, BlendFunction),
* @ref setBlendEquation(), @ref setBlendColor(),
* @fn_gl{BlendFunc}
*/
static void setBlendFunction(BlendFunction source, BlendFunction destination);
/**
* @brief Set blend function separately for RGB and alpha components
*
* See setBlendFunction(BlendFunction, BlendFunction) for more information.
* @see @ref Feature "Feature::Blending", setBlendEquation(),
* setBlendColor(), @fn_gl{BlendFuncSeparate}
* See @ref setBlendFunction(BlendFunction, BlendFunction) for more information.
* @see @ref Feature::Blending, @ref setBlendEquation(),
* @ref setBlendColor(), @fn_gl{BlendFuncSeparate}
*/
static void setBlendFunction(BlendFunction sourceRgb, BlendFunction destinationRgb, BlendFunction sourceAlpha, BlendFunction destinationAlpha);
/**
* @brief Set blend color
*
* Sets constant color used in setBlendFunction() by
* @ref BlendFunction "BlendFunction::ConstantColor",
* @ref BlendFunction "BlendFunction::OneMinusConstantColor",
* @ref BlendFunction "BlendFunction::ConstantAlpha" and
* @ref BlendFunction "BlendFunction::OneMinusConstantAlpha".
* @see @ref Feature "Feature::Blending", setBlendEquation(),
* setBlendFunction(), @fn_gl{BlendColor}
* Sets constant color used in @ref setBlendFunction() by
* @ref BlendFunction::ConstantColor, @ref BlendFunction::OneMinusConstantColor,
* @ref BlendFunction::ConstantAlpha and @ref BlendFunction::OneMinusConstantAlpha.
* @see @ref Feature::Blending, @ref setBlendEquation(),
* @ref setBlendFunction(), @fn_gl{BlendColor}
*/
static void setBlendColor(const Color4& color);
@ -818,7 +812,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Logical operation
*
* @see setLogicOperation()
* @see @ref setLogicOperation()
* @requires_gl Logical operations on framebuffer are not available in
* OpenGL ES.
*/
@ -844,7 +838,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set logical operation
*
* @see @ref Feature "Feature::LogicOperation", @fn_gl{LogicOp}
* @see @ref Feature::LogicOperation, @fn_gl{LogicOp}
* @requires_gl Logical operations on framebuffer are not available in
* OpenGL ES.
*/
@ -927,8 +921,8 @@ class MAGNUM_EXPORT Renderer {
* @brief Error status
*
* Returns error flag, if any set. If there aren't any more error
* flags, returns @ref Error "Error::NoError". Thus this function
* should be always called in a loop until it returns @ref Error "Error::NoError".
* flags, returns @ref Error::NoError. Thus this function should be
* always called in a loop until it returns @ref Error::NoError.
* @see @fn_gl{GetError}
*/
static Error error() { return static_cast<Error>(glGetError()); }
@ -943,8 +937,8 @@ class MAGNUM_EXPORT Renderer {
*/
enum class ResetNotificationStrategy: GLint {
/**
* No reset notification, thus graphicsResetStatus() will always
* return @ref GraphicsResetStatus "GraphicsResetStatus::NoError".
* No reset notification, thus @ref graphicsResetStatus() will
* always return @ref GraphicsResetStatus::NoError.
* However this doesn't mean that the context cannot be lost.
*/
#ifndef MAGNUM_TARGET_GLES
@ -955,7 +949,7 @@ class MAGNUM_EXPORT Renderer {
/**
* Graphics reset will result in context loss, cause of the reset
* can be queried with graphicsResetStatus().
* can be queried with @ref graphicsResetStatus().
*/
#ifndef MAGNUM_TARGET_GLES
LoseContextOnReset = GL_LOSE_CONTEXT_ON_RESET_ARB
@ -970,7 +964,7 @@ class MAGNUM_EXPORT Renderer {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If OpenGL extension @extension{ARB,robustness} or ES
* extension @es_extension{EXT,robustness} is not available, this
* function always returns @ref ResetNotificationStrategy "ResetNotificationStrategy::NoResetNotification".
* function always returns @ref ResetNotificationStrategy::NoResetNotification.
* @see graphicsResetStatus(), @fn_gl{Get} with @def_gl{RESET_NOTIFICATION_STRATEGY_ARB}
*/
static ResetNotificationStrategy resetNotificationStrategy();
@ -1013,9 +1007,8 @@ class MAGNUM_EXPORT Renderer {
*
* Reset causes all context state to be lost. If OpenGL extension
* @extension{ARB,robustness} or ES extension @es_extension{EXT,robustness}
* is not available, this function always returns
* @ref GraphicsResetStatus "GraphicsResetStatus::NoError".
* @see resetNotificationStrategy(), @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness}
* is not available, this function always returns @ref GraphicsResetStatus::NoError.
* @see @ref resetNotificationStrategy(), @fn_gl_extension{GetGraphicsResetStatus,ARB,robustness}
*/
static GraphicsResetStatus graphicsResetStatus() {
return graphicsResetStatusImplementation();

6
src/Resource.h

@ -168,9 +168,9 @@ class Resource {
* @brief Whether the resource is available
*
* Returns `false` when resource is not loaded and no fallback is
* available (i.e. state() is either @ref ResourceState "ResourceState::NotLoaded",
* @ref ResourceState "ResourceState::Loading" or
* @ref ResourceState "ResourceState::NotFound"), true otherwise.
* available (i.e. state() is either @ref ResourceState::NotLoaded,
* @ref ResourceState::Loading or @ref ResourceState::NotFound), `true`
* otherwise.
*/
operator bool() {
acquire();

4
src/ResourceManager.h

@ -322,8 +322,8 @@ template<class... Types> class ResourceManager: private Implementation::Resource
* @brief Set resource data
* @return Reference to self (for method chaining)
*
* Same as above with state set to @ref ResourceDataState "ResourceDataState::Final"
* and policy to @ref ResourcePolicy "ResourcePolicy::Resident".
* Same as above with state set to @ref ResourceDataState::Final and
* policy to @ref ResourcePolicy::Resident.
*/
template<class T> ResourceManager<Types...>& set(ResourceKey key, T* data) {
return set(key, data, ResourceDataState::Final, ResourcePolicy::Resident);

16
src/SceneGraph/AbstractFeature.h

@ -267,23 +267,21 @@ template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT Abstrac
/**
* @brief Clean data based on absolute transformation
*
* When object is cleaned and
* @ref CachedTransformation "CachedTransformation::Absolute" is
* enabled in setCachedTransformations(), this function is called to
* recalculate data based on absolute object transformation.
* When object is cleaned and @ref CachedTransformation::Absolute is
* enabled in @ref setCachedTransformations(), this function is called
* to recalculate data based on absolute object transformation.
*
* Default implementation does nothing.
* @see @ref scenegraph-caching, cleanInverted()
* @see @ref scenegraph-caching, @ref cleanInverted()
*/
virtual void clean(const typename DimensionTraits<dimensions, T>::MatrixType& absoluteTransformationMatrix);
/**
* @brief Clean data based on inverted absolute transformation
*
* When object is cleaned and
* @ref CachedTransformation "CachedTransformation::InvertedAbsolute"
* is enabled in setCachedTransformations(), this function is called
* to recalculate data based on inverted absolute object
* When object is cleaned and @ref CachedTransformation::InvertedAbsolute
* is enabled in @ref setCachedTransformations(), this function is
* called to recalculate data based on inverted absolute object
* transformation.
*
* Default implementation does nothing.

89
src/SceneGraph/Animable.h

@ -42,13 +42,13 @@ namespace Magnum { namespace SceneGraph {
enum class AnimationState: UnsignedByte {
/**
* The animation is stopped. The animation will be started from the
* beginning when state is changed to @ref AnimationState "AnimationState::Running".
* beginning when state is changed to @ref AnimationState::Running.
*/
Stopped,
/**
* The animation is stopped. The animation will continue from paused
* position when state is changed to @ref AnimationState "AnimationState::Running".
* position when state is changed to @ref AnimationState::Running.
*/
Paused,
@ -121,11 +121,11 @@ void MyApplication::drawEvent() {
@section Animable-performance Using animable groups to improve performance
AnimableGroup is optimized for case when no animation is running - it just
AnimableGroup is optimized for case when no animation is running -- it just
puts itself to rest and waits until some animation changes its state to
@ref AnimationState "AnimationState::Running" again. If you put animations
which are not pernamently running to separate group, they will not be always
traversed when calling AnimableGroup::step(), saving precious frame time.
@ref AnimationState::Running again. If you put animations which are not
pernamently running to separate group, they will not be always traversed when
calling @ref AnimableGroup::step(), saving precious frame time.
@section Animable-explicit-specializations Explicit template specializations
@ -167,12 +167,12 @@ template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT Animabl
* @brief Set animation state
* @return Reference to self (for method chaining)
*
* Note that changing state from @ref AnimationState "AnimationState::Stopped"
* to @ref AnimationState "AnimationState::Paused" is ignored and
* animation remains in @ref AnimationState "AnimationState::Stopped"
* state. See also animationStep() for more information.
* @see animationStarted(), animationPaused(), animationResumed(),
* animationStopped()
* Note that changing state from @ref AnimationState::Stopped to
* @ref AnimationState::Paused is ignored and animation remains in
* @ref AnimationState::Stopped state. See also @ref animationStep()
* for more information.
* @see @ref animationStarted(), @ref animationPaused(),
* @ref animationResumed(), @ref animationStopped()
*/
Animable<dimensions, T>& setState(AnimationState state);
@ -242,78 +242,69 @@ template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT Animabl
* @param time Time from start of the animation
* @param delta Time delta for current frame
*
* This function is periodically called from AnimableGroup::step() if
* the animation state is set to @ref AnimationState "AnimationState::Running".
* After animation duration is exceeded and repeat is not enabled or
* repeat count is exceeded, the animation state is set to
* @ref AnimationState "AnimationState::Stopped".
* This function is periodically called from @ref AnimableGroup::step()
* if the animation state is set to @ref AnimationState::Running. After
* animation duration is exceeded and repeat is not enabled or repeat
* count is exceeded, the animation state is set to @ref AnimationState::Stopped.
*
* If the animation is resumed from @ref AnimationState "AnimationState::Paused",
* this function is called with @p time continuing from the point
* when it was paused. If the animation is resumed from
* @ref AnimationState "AnimationState::Stopped", @p time starts with
* zero.
* If the animation is resumed from @ref AnimationState::Paused, this
* function is called with @p time continuing from the point when it
* was paused. If the animation is resumed from @ref AnimationState::Stopped,
* @p time starts with zero.
*
* @see state(), duration(), isRepeated(), repeatCount()
* @see @ref state(), @ref duration(), @ref isRepeated(),
* @ref repeatCount()
*/
virtual void animationStep(Float time, Float delta) = 0;
/**
* @brief Action on animation start
*
* Called from AnimableGroup::step() when state is changed from
* @ref AnimationState "AnimationState::Stopped" to
* @ref AnimationState "AnimationState::Running" and before first
* animationStep() is called.
* Called from @ref AnimableGroup::step() when state is changed from
* @ref AnimationState::Stopped to @ref AnimationState::Running and
* before first @ref animationStep() is called.
*
* Default implementation does nothing.
*
* @see setState()
* @see @ref setState()
*/
virtual void animationStarted() {}
/**
* @brief Action on animation pause
*
* Called from AnimableGroup::step() when state changes from
* @ref AnimationState "AnimationState::Running" to
* @ref AnimationState "AnimationState::Paused" and after last
* animationStep() is called.
* Called from @ref AnimableGroup::step() when state changes from
* @ref AnimationState::Running to @ref AnimationState::Paused and
* after last @ref animationStep() is called.
*
* Default implementation does nothing.
*
* @see setState()
* @see @ref setState()
*/
virtual void animationPaused() {}
/**
* @brief Action on animation resume
*
* Called from AnimableGroup::step() when state changes from
* @ref AnimationState "AnimationState::Paused" to
* @ref AnimationState "AnimationState::Running" and before first
* animationStep() is called.
* Called from @ref AnimableGroup::step() when state changes from
* @ref AnimationState::Paused to @ref AnimationState::Running and
* before first @ref animationStep() is called.
*
* Default implementation does nothing.
*
* @see setState()
* @see @ref setState()
*/
virtual void animationResumed() {}
/**
* @brief Action on animation stop
*
* Called from AnimableGroup::step() when state changes from either
* @ref AnimationState "AnimationState::Running" or
* @ref AnimationState "AnimationState::Paused" to
* @ref AnimationState "AnimationState::Stopped" and after last
* animationStep() is called.
* Called from @ref AnimableGroup::step() when state changes from
* either @ref AnimationState::Running or @ref AnimationState::Paused
* to @ref AnimationState::Stopped and after last @ref animationStep()
* is called.
*
* You may want to use this function to properly finish the animation
* in case the framerate is not high enough to have animationStep()
* in case the framerate is not high enough to have @ref animationStep()
* called enough times. Default implementation does nothing.
*
* @see setState()
* @see @ref setState()
*/
virtual void animationStopped() {}

26
src/Shaders/MeshVisualizer.h

@ -45,15 +45,15 @@ to be able to render.
@section ShadersMeshVisualizer-wireframe Wireframe visualization
Wireframe visualization is done by enabling @ref Flag "Flag::Wireframe". It is
done either using geometry shaders or with help of additional vertex information.
Wireframe visualization is done by enabling @ref Flag::Wireframe. It is done
either using geometry shaders or with help of additional vertex information.
If you have geometry shaders available, you don't need to do anything else.
@requires_gl32 %Extension @extension{ARB,geometry_shader4} for wireframe
rendering using geometry shaders.
If you don't have geometry shaders, you need to set @ref Flag "Flag::NoGeometryShader"
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
@ -71,7 +71,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
/**
* @brief Vertex index
*
* Used only in OpenGL < 3.1 and OpenGL ES 2.0 if @ref Flag "Flag::Wireframe"
* Used only in OpenGL < 3.1 and OpenGL ES 2.0 if @ref Flag::Wireframe
* is enabled. This attribute specifies index of given vertex in
* triangle, i.e. `0` for first, `1` for second, `2` for third. In
* OpenGL 3.1, OpenGL ES 3.0 and newer this value is provided by the
@ -87,7 +87,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
enum class Flag: UnsignedByte {
/**
* Visualize wireframe. On OpenGL ES this also enables
* @ref Flag "Flag::NoGeometryShader".
* @ref Flag::NoGeometryShader.
*/
#ifndef MAGNUM_TARGET_GLES
Wireframe = 1 << 0,
@ -98,7 +98,7 @@ 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 "Flag::Wireframe".
* the mesh. In OpenGL ES enabled alongside @ref Flag::Wireframe.
*/
NoGeometryShader = 1 << 1
};
@ -125,8 +125,8 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
* @brief Set viewport size
* @return Reference to self (for method chaining)
*
* Has effect only if @ref Flag "Flag::Wireframe" is enabled and
* geometry shaders are used.
* Has effect only if @ref Flag::Wireframe is enabled and geometry
* shaders are used.
*/
MeshVisualizer& setViewportSize(const Vector2& size) {
if(flags & Flag::Wireframe && !(flags & Flag::NoGeometryShader))
@ -150,7 +150,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
* @return Reference to self (for method chaining)
*
* Initial value is fully opaque black. Has effect only if
* @ref Flag "Flag::Wireframe" is enabled.
* @ref Flag::Wireframe is enabled.
*/
MeshVisualizer& setWireframeColor(const Color4& color) {
if(flags & Flag::Wireframe) setUniform(wireframeColorUniform, color);
@ -161,8 +161,8 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
* @brief Set wireframe width
* @return Reference to self (for method chaining)
*
* Initial value is `1.0f`. Has effect only if
* @ref Flag "Flag::Wireframe" is enabled.
* Initial value is `1.0f`. Has effect only if @ref Flag::Wireframe is
* enabled.
*/
MeshVisualizer& setWireframeWidth(Float width) {
if(flags & Flag::Wireframe) setUniform(wireframeWidthUniform, width);
@ -173,8 +173,8 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
* @brief Set line smoothness
* @return Reference to self (for method chaining)
*
* Initial value is `2.0f`. Has effect only if
* @ref Flag "Flag::Wireframe" is enabled.
* Initial value is `2.0f`. Has effect only if @ref Flag::Wireframe is
* enabled.
*/
MeshVisualizer& setSmoothness(Float smoothness);

17
src/Shaders/Phong.h

@ -64,27 +64,26 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram {
/**
* @brief Texture coordinates
*
* Used only if one of @ref Flag "Flag::AmbientTexture",
* @ref Flag "Flag::DiffuseTexture" or @ref Flag "Flag::SpecularTexture"
* is set.
* Used only if one of @ref Flag::AmbientTexture, @ref Flag::DiffuseTexture
* or @ref Flag::SpecularTexture is set.
*/
typedef Attribute<2, Vector2> TextureCoordinates;
enum: Int {
/**
* Layer for ambient texture. Used only if @ref Flag "Flag::AmbientTexture"
* Layer for ambient texture. Used only if @ref Flag::AmbientTexture
* is set.
*/
AmbientTextureLayer = 0,
/**
* Layer for diffuse texture. Used only if @ref Flag "Flag::DiffuseTexture"
* Layer for diffuse texture. Used only if @ref Flag::DiffuseTexture
* is set.
*/
DiffuseTextureLayer = 1,
/**
* Layer for specular texture. Used only if @ref Flag "Flag::SpecularTexture"
* Layer for specular texture. Used only if @ref Flag::SpecularTexture
* is set.
*/
SpecularTextureLayer = 2
@ -122,7 +121,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram {
* @return Reference to self (for method chaining)
*
* If not set, default value is `(0.0f, 0.0f, 0.0f)`. Has no effect if
* @ref Flag "Flag::AmbientTexture" is set.
* @ref Flag::AmbientTexture is set.
*/
Phong& setAmbientColor(const Color3& color);
@ -130,7 +129,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram {
* @brief Set diffuse color
* @return Reference to self (for method chaining)
*
* Has no effect if @ref Flag "Flag::AmbientTexture" is used.
* Has no effect if @ref Flag::AmbientTexture is used.
*/
Phong& setDiffuseColor(const Color3& color);
@ -139,7 +138,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram {
* @return Reference to self (for method chaining)
*
* If not set, default value is `(1.0f, 1.0f, 1.0f)`. Has no effect if
* @ref Flag "Flag::SpecularTexture" is set.
* @ref Flag::SpecularTexture is set.
*/
Phong& setSpecularColor(const Color3& color);

41
src/Text/AbstractFont.h

@ -60,7 +60,7 @@ checked by the implementation:
after the previous file was closed, function doClose() is called only if
there is any file opened.
- Functions doOpenData() and doOpenSingleData() are called only if
@ref Feature "Feature::OpenData" is supported.
@ref Feature::OpenData is supported.
- All `do*()` implementations working on opened file are called only if
there is any file opened.
*/
@ -112,8 +112,8 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @param size Font size
*
* Closes previous file, if it was opened, and tries to open given
* file. Available only if @ref Feature "Feature::OpenData" is
* supported. Returns `true` on success, `false` otherwise.
* file. Available only if @ref Feature::OpenData is supported. Returns
* `true` on success, `false` otherwise.
*/
bool openData(const std::vector<std::pair<std::string, Containers::ArrayReference<const unsigned char>>>& data, Float size);
@ -123,9 +123,9 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @param size Font size
*
* Closes previous file, if it was opened, and tries to open given
* file. Available only if @ref Feature "Feature::OpenData" is
* supported and the plugin doesn't have @ref Feature "Feature::MultiFile".
* Returns `true` on success, `false` otherwise.
* file. Available only if @ref Feature::OpenData is supported and the
* plugin doesn't have @ref Feature::MultiFile. Returns `true` on
* success, `false` otherwise.
*/
bool openSingleData(Containers::ArrayReference<const unsigned char> data, Float size);
@ -135,10 +135,10 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @param size Font size
*
* Closes previous file, if it was opened, and tries to open given
* file. If the plugin has @ref Feature "Feature::MultiFile", the
* function will use additional files in given path, all sharing common
* basename derived from @p filename. Returns `true` on success,
* `false` otherwise.
* file. If the plugin has @ref Feature::MultiFile, the function will
* use additional files in given path, all sharing common basename
* derived from @p filename. Returns `true` on success, `false`
* otherwise.
*/
bool openFile(const std::string& filename, Float size);
@ -172,8 +172,8 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @param characters UTF-8 characters to render
*
* Fills the cache with given characters. Fonts having
* @ref Feature "Feature::PreparedGlyphCache" do not support partial
* glyph cache filling, use createGlyphCache() instead.
* @ref Feature::PreparedGlyphCache do not support partial glyph cache
* filling, use @ref createGlyphCache() instead.
*/
void fillGlyphCache(GlyphCache& cache, const std::string& characters);
@ -181,9 +181,9 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
* @brief Create glyph cache
*
* Configures and fills glyph cache with the contents of whole font.
* Available only if @ref Feature "Feature::PreparedGlyphCache" is
* supported. Other fonts support only partial glyph cache filling,
* see fillGlyphCache().
* Available only if @ref Feature::PreparedGlyphCache is supported.
* Other fonts support only partial glyph cache filling, see
* @ref fillGlyphCache().
*/
GlyphCache* createGlyphCache();
@ -218,8 +218,8 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
/**
* @brief Implementation for openData()
*
* If the plugin doesn't have @ref Feature "Feature::MultiFile",
* default implementation calls doOpenSingleData().
* If the plugin doesn't have @ref Feature::MultiFile, default
* implementation calls @ref doOpenSingleData().
*/
virtual void doOpenData(const std::vector<std::pair<std::string, Containers::ArrayReference<const unsigned char>>>& data, Float size);
@ -229,10 +229,9 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
/**
* @brief Implementation for openFile()
*
* If @ref Feature "Feature::OpenData" is supported and the plugin
* doesn't have @ref Feature "Feature::MultiFile", default
* implementation opens the file and calls doOpenSingleData() with its
* contents.
* If @ref Feature::OpenData is supported and the plugin doesn't have
* @ref Feature::MultiFile, default implementation opens the file and
* calls @ref doOpenSingleData() with its contents.
*/
virtual void doOpenFile(const std::string& filename, Float size);

204
src/Text/AbstractFontConverter.h

@ -50,13 +50,13 @@ exporting functions are converted to list of unique UTF-32 characters.
You don't need to do most of the redundant sanity checks, these things are
checked by the implementation:
- Functions `doExportFontTo*()` are called only if @ref Feature "Feature::ExportFont"
- Functions `doExportFontTo*()` are called only if @ref Feature::ExportFont
is supported, functions `doExportGlyphCacheTo*()` are called only if
@ref Feature "Feature::ExportGlyphCache" is supported.
@ref Feature::ExportGlyphCache is supported.
- Functions `doImportGlyphCacheFrom*()` are called only if
@ref Feature "Feature::ImportGlyphCache" is supported.
@ref Feature::ImportGlyphCache is supported.
- Functions `doExport*To*Data()` and `doImport*From*Data()` are called only
if @ref Feature "Feature::ConvertData" is supported.
if @ref Feature::ConvertData is supported.
- Function `doImport*FromData()` is called only if there is at least one data
array passed.
*/
@ -67,33 +67,42 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
/**
* @brief Features supported by this converter
*
* @see Features, features()
* @see @ref Features, @ref features()
*/
enum class Feature: UnsignedByte {
/**
* Exporting font using exportToFile() or exportToData()
* @see @ref Feature "Feature::ConvertData"
* Exporting font using @ref exportFontToFile(), @ref exportFontToData()
* or @ref exportFontToSingleData()
* @see @ref Feature::ConvertData
*/
ExportFont = 1 << 0,
/**
* Export glyph cache using exportToFile() or exportToData()
* @see @ref Feature "Feature::ConvertData"
* Export glyph cache using @ref exportGlyphCacheToFile(),
* @ref exportGlyphCacheToData() or @ref exportGlyphCacheToSingleData()
* @see @ref Feature::ConvertData
*/
ExportGlyphCache = 1 << 1,
/**
* Import glyph cache using importFromFile() or importFromData()
* @see @ref Feature "Feature::ConvertData"
* Import glyph cache using @ref importGlyphCacheFromFile(),
* @ref importGlyphCacheFromData() or @ref importGlyphCacheFromSingleData()
* @see @ref Feature::ConvertData
*/
ImportGlyphCache = 1 << 2,
/** Convert from/to data using exportToData() or importFromData() */
/**
* Convert from/to data using @ref exportFontToData(),
* @ref exportFontToSingleData(), @ref exportGlyphCacheToData(),
* @ref exportGlyphCacheToSingleData(), @ref importGlyphCacheFromData()
* or @ref importGlyphCacheFromSingleData()
*/
ConvertData = 1 << 4,
/**
* The format is multi-file, thus exportToSingleData() and
* importFromSingleData() convenience functions cannot be used.
* The format is multi-file, thus @ref exportFontToSingleData(),
* @ref exportGlyphCacheToSingleData() and @ref importGlyphCacheFromSingleData()
* convenience functions cannot be used.
*/
MultiFile = 1 << 5
};
@ -121,38 +130,39 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
* @param filename Output filename
* @param characters Characters to export
*
* Available only if @ref Feature "Feature::ConvertData" and
* @ref Feature "Feature::ExportFont" is supported. Returns pairs of
* filename and data on success, empty vector otherwise. All data will
* be sharing common basename derived from @p filename. If the plugin
* doesn't have @ref Feature "Feature::MultiFile", only one pair is
* returned, thus using exportFontToSingleData() might be more convenient
* in that case.
* @see features(), exportFontToFile(), exportGlyphCacheToData()
* Available only if @ref Feature::ConvertData and @ref Feature::ExportFont
* is supported. Returns pairs of filename and data on success, empty
* vector otherwise. All data will be sharing common basename derived
* from @p filename. If the plugin doesn't have @ref Feature::MultiFile,
* only one pair is returned, thus using @ref exportFontToSingleData()
* might be more convenient in that case.
* @see @ref features(), @ref exportFontToFile(),
* @ref exportGlyphCacheToData()
*/
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> exportFontToData(AbstractFont& font, GlyphCache& cache, const std::string& filename, const std::string& characters) const;
/**
* @brief Export font to single raw data
*
* Available only if @ref Feature "Feature::ConvertData" and
* @ref Feature "Feature::ExportFont" is supported and the plugin
* doesn't have @ref Feature "Feature::MultiFile". Returns data on
* success, zero-sized array otherwise. See exportFontToData() for
* more information.
* @see features(), exportFontToFile(), importFromSingleData()
* Available only if @ref Feature::ConvertData and @ref Feature::ExportFont
* is supported and the plugin doesn't have @ref Feature::MultiFile.
* Returns data on success, zero-sized array otherwise. See
* @ref exportFontToData() for more information.
* @see @ref features(), @ref exportFontToFile(),
* @ref exportGlyphCacheToSingleData()
*/
Containers::Array<unsigned char> exportFontToSingleData(AbstractFont& font, GlyphCache& cache, const std::string& characters) const;
/**
* @brief Export font to file
*
* Available only if @ref Feature "Feature::ExportFont" is supported.
* If the plugin has @ref Feature "Feature::MultiFile", the function
* will create more than one file in given path, all sharing common
* basename derived from @p filename. Returns `true` on success,
* `false` otherwise. See exportFontToData() for more information.
* @see features(), exportFontToData(), exportGlyphCacheToFile()
* Available only if @ref Feature::ExportFont is supported. If the
* plugin has @ref Feature::MultiFile, the function will create more
* than one file in given path, all sharing common basename derived
* from @p filename. Returns `true` on success, `false` otherwise. See
* @ref exportFontToData() for more information.
* @see @ref features(), @ref exportFontToData(),
* @ref exportGlyphCacheToFile()
*/
bool exportFontToFile(AbstractFont& font, GlyphCache& cache, const std::string& filename, const std::string& characters) const;
@ -161,41 +171,42 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
* @param cache Populated glyph cache
* @param filename Output filename
*
* Available only if @ref Feature "Feature::ConvertData" and
* @ref Feature "Feature::ExportGlyphCache" is supported. Returns pairs
* of filename and data on success, empty vector otherwise. All data
* will be sharing common basename derived from @p filename. If the
* plugin doesn't have @ref Feature "Feature::MultiFile", only one pair
* is returned, thus using exportGlyphCacheToSingleData() might be more
* convenient in that case.
* Available only if @ref Feature::ConvertData and @ref Feature::ExportGlyphCache
* is supported. Returns pairs of filename and data on success, empty
* vector otherwise. All data will be sharing common basename derived
* from @p filename. If the plugin doesn't have @ref Feature::MultiFile,
* only one pair is returned, thus using @ref exportGlyphCacheToSingleData()
* might be more convenient in that case.
*
* All glyphs from given cache will be exported. If you want to export
* smaller subset, fill the cache with less characters.
* @see features(), exportGlyphCacheToFile(), exportFontToData()
* @see @ref features(), @ref exportGlyphCacheToFile(),
* @ref exportFontToData()
*/
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> exportGlyphCacheToData(GlyphCache& cache, const std::string& filename) const;
/**
* @brief Export glyph cache to single raw data
*
* Available only if @ref Feature "Feature::ConvertData" and
* @ref Feature "Feature::ExportGlyphCache" is supported and the plugin
* doesn't have @ref Feature "Feature::MultiFile". Returns data on
* success, zero-sized array otherwise. See exportGlyphCacheToData()
* for more information.
* @see features(), exportGlyphCacheToFile(), importGlyphCacheFromSingleData()
* Available only if @ref Feature::ConvertData and @ref Feature::ExportGlyphCache
* is supported and the plugin doesn't have @ref Feature::MultiFile.
* Returns data on success, zero-sized array otherwise. See
* @ref exportGlyphCacheToData() for more information.
* @see @ref features(), @ref exportGlyphCacheToFile(),
* @ref importGlyphCacheFromSingleData()
*/
Containers::Array<unsigned char> exportGlyphCacheToSingleData(GlyphCache& cache) const;
/**
* @brief Export glyph cache to file
*
* Available only if @ref Feature "Feature::ExportGlyphCache" is
* supported. If the plugin has @ref Feature "Feature::MultiFile", the
* function will create more than one file in given path, all sharing
* common basename derived from @p filename. Returns `true` on success,
* `false` otherwise.
* @see features(), exportGlyphCacheToData(), exportFontToFile()
* Available only if @ref Feature::ExportGlyphCache is supported. If
* the plugin has @ref Feature::MultiFile, the function will create
* more than one file in given path, all sharing common basename
* derived from @p filename. Returns `true` on success, `false`
* otherwise.
* @see @ref features(), @ref exportGlyphCacheToData(),
* @ref exportFontToFile()
*/
bool exportGlyphCacheToFile(GlyphCache& cache, const std::string& filename) const;
@ -203,37 +214,38 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
* @brief Import glyph cache from raw data
* @param data Pairs of filename and file data
*
* Available only if @ref Feature "Feature::ConvertData" and
* @ref Feature "Feature::ImportGlyphCache" is supported. Returns
* imported cache on success, `nullptr` otherwise. If the plugin
* doesn't have @ref Feature "Feature::MultiFile", only one file is
* needed, thus using convertToSingleData() might be more convenient in
* that case.
* @see features(), importFromFile(), exportToData()
* Available only if @ref Feature::ConvertData and @ref Feature::ImportGlyphCache
* is supported. Returns imported cache on success, `nullptr`
* otherwise. If the plugin doesn't have @ref Feature::MultiFile, only
* one file is needed, thus using @ref importGlyphCacheFromSingleData()
* might be more convenient in that case.
* @see @ref features(), @ref importGlyphCacheFromFile(),
* @ref exportGlyphCacheToData()
*/
GlyphCache* importGlyphCacheFromData(const std::vector<std::pair<std::string, Containers::ArrayReference<const unsigned char>>>& data) const;
/**
* @brief Import glyph cache from single raw data
*
* Available only if @ref Feature "Feature::ConvertData" and
* @ref Feature "Feature::ImportGlyphCache" is supported and the plugin
* doesn't have @ref Feature "Feature::MultiFile". Returns imported
* cache on success, `nullptr` otherwise. See importFromData() for
* multi-file conversion.
* @see features(), importFromFile(), exportToSingleData()
* Available only if @ref Feature::ConvertData and @ref Feature::ImportGlyphCache
* is supported and the plugin doesn't have @ref Feature::MultiFile.
* Returns imported cache on success, `nullptr` otherwise. See
* @ref importGlyphCacheFromData() for multi-file conversion.
* @see @ref features(), @ref importGlyphCacheFromFile(),
* @ref exportFontToSingleData()
*/
GlyphCache* importGlyphCacheFromSingleData(Containers::ArrayReference<const unsigned char> data) const;
/**
* @brief Import glyph cache from file
*
* Available only if @ref Feature "Feature::ImportGlyphCache" is
* supported. If the plugin has @ref Feature "Feature::MultiFile", the
* function will use additional files in given path, all sharing common
* basename derived from @p filename. Returns imported cache on
* success, `nullptr` otherwise.
* @see features(), importFromData(), exportToFile()
* Available only if @ref Feature::ImportGlyphCache is supported. If
* the plugin has @ref Feature::MultiFile, the function will use
* additional files in given path, all sharing common basename derived
* from @p filename. Returns imported cache on success, `nullptr`
* otherwise.
* @see @ref features(), @ref importGlyphCacheFromData(),
* @ref exportGlyphCacheToFile()
*/
GlyphCache* importGlyphCacheFromFile(const std::string& filename) const;
@ -242,14 +254,14 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
#else
protected:
#endif
/** @brief Implementation for features() */
/** @brief Implementation for @ref features() */
virtual Features doFeatures() const = 0;
/**
* @brief Implementation for exportFontToData()
* @brief Implementation for @ref exportFontToData()
*
* If the plugin doesn't have @ref Feature "Feature::MultiFile",
* default implementation calls doExportFontToSingleData().
* If the plugin doesn't have @ref Feature::MultiFile, default
* implementation calls @ref doExportFontToSingleData().
* @note On Windows uses `std::vector<char32_t>` instead of
* `std::u32string`. See @ref Corrade::Utility::Unicode::utf32()
* for more information.
@ -261,7 +273,7 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
#endif
/**
* @brief Implementation for exportFontToSingleData()
* @brief Implementation for @ref exportFontToSingleData()
*
* @note On Windows uses `std::vector<char32_t>` instead of
* `std::u32string`. See @ref Corrade::Utility::Unicode::utf32()
@ -274,11 +286,10 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
#endif
/**
* @brief Implementation for exportFontToFile()
* @brief Implementation for @ref exportFontToFile()
*
* If @ref Feature "Feature::ConvertData" is supported, default
* implementation calls doExportFontToData() and saves the result to
* given file(s).
* If @ref Feature::ConvertData is supported, default implementation
* calls doExportFontToData() and saves the result to given file(s).
* @note On Windows uses `std::vector<char32_t>` instead of
* `std::u32string`. See @ref Corrade::Utility::Unicode::utf32()
* for more information.
@ -290,10 +301,10 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
#endif
/**
* @brief Implementation for exportGlyphCacheToData()
* @brief Implementation for @ref exportGlyphCacheToData()
*
* If the plugin doesn't have @ref Feature "Feature::MultiFile",
* default implementation calls doExportGlyphCacheToSingleData().
* If the plugin doesn't have @ref Feature::MultiFile, default
* implementation calls @ref doExportGlyphCacheToSingleData().
*/
virtual std::vector<std::pair<std::string, Containers::Array<unsigned char>>> doExportGlyphCacheToData(GlyphCache& cache, const std::string& filename) const;
@ -301,19 +312,19 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
virtual Containers::Array<unsigned char> doExportGlyphCacheToSingleData(GlyphCache& cache) const;
/**
* @brief Implementation for exportGlyphCacheToFile()
* @brief Implementation for @ref exportGlyphCacheToFile()
*
* If @ref Feature "Feature::ConvertData" is supported, default
* implementation calls doExportGlyphCacheToData() and saves the result
* to given file(s).
* If @ref Feature::ConvertData is supported, default implementation
* calls @ref doExportGlyphCacheToData() and saves the result to given
* file(s).
*/
virtual bool doExportGlyphCacheToFile(GlyphCache& cache, const std::string& filename) const;
/**
* @brief Implementation for importGlyphCacheFromData()
* @brief Implementation for @ref importGlyphCacheFromData()
*
* If the plugin doesn't have @ref Feature "Feature::MultiFile",
* default implementation calls doImportGlyphCacheFromSingleData().
* If the plugin doesn't have @ref Feature::MultiFile, default
* implementation calls @ref doImportGlyphCacheFromSingleData().
*/
virtual GlyphCache* doImportGlyphCacheFromData(const std::vector<std::pair<std::string, Containers::ArrayReference<const unsigned char>>>& data) const;
@ -321,12 +332,11 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
virtual GlyphCache* doImportGlyphCacheFromSingleData(Containers::ArrayReference<const unsigned char> data) const;
/**
* @brief Implementation for importGlyphCacheFromFile()
* @brief Implementation for @ref importGlyphCacheFromFile()
*
* If @ref Feature "Feature::ConvertData" is supported and the plugin
* doesn't have @ref Feature "Feature::MultiFile", default
* implementation opens the file and calls doImportGlyphCacheFromSingleData()
* with its contents.
* If @ref Feature::ConvertData is supported and the plugin doesn't
* have @ref Feature::MultiFile, default implementation opens the file
* and calls @ref doImportGlyphCacheFromSingleData() with its contents.
*/
virtual GlyphCache* doImportGlyphCacheFromFile(const std::string& filename) const;

2
src/Text/DistanceFieldGlyphCache.h

@ -65,7 +65,7 @@ class MAGNUM_TEXT_EXPORT DistanceFieldGlyphCache: public GlyphCache {
* parameters. Sets internal texture format to red channel only. On
* desktop OpenGL requires @extension{ARB,texture_rg} (also part of
* OpenGL ES 3.0), in ES2 uses @es_extension{EXT,texture_rg} if
* available or @ref TextureFormat "TextureFormat::RGB" as fallback.
* available or @ref TextureFormat::RGB as fallback.
* @todo Is Luminance format renderable anywhere? Also would it be
* possible to convert the RGB texture to Luminance after it has
* been rendered when blitting is not supported to save memory?

2
src/Text/GlyphCache.h

@ -87,7 +87,7 @@ class MAGNUM_TEXT_EXPORT GlyphCache {
* Sets internal texture format to red channel only. On desktop OpenGL
* requires @extension{ARB,texture_rg} (also part of OpenGL ES 3.0), in
* ES2 uses @es_extension{EXT,texture_rg}, if available, or
* @ref TextureFormat "TextureFormat::Luminance" as fallback.
* @ref TextureFormat::Luminance as fallback.
*/
explicit GlyphCache(const Vector2i& originalSize, const Vector2i& size, const Vector2i& padding = Vector2i());

24
src/Texture.h

@ -73,8 +73,9 @@ information about usage in shaders.
@section Texture-array Texture arrays
You can create texture arrays by passing @ref Target "Texture2D::Target::Texture1DArray"
or @ref Target "Texture3D::Target::Texture2DArray" to constructor.
You can create texture arrays by passing
@ref Target::Texture1DArray "Texture2D::Target::Texture1DArray" or
@ref Target::Texture2DArray "Texture3D::Target::Texture2DArray" to constructor.
It is possible to specify each layer separately using setSubImage(), but you
have to allocate the memory for all layers first either by calling setStorage()
@ -104,8 +105,10 @@ etc.).
@section Texture-multisample Multisample textures
You can create multisample textures by passing @ref Target "Texture2D::Target::Texture2DMultisample"
or @ref Target "Texture3D::Target::Texture2DMultisampleArray" to constructor.
You can create multisample textures by passing
@ref Target::Texture2DMultisample "Texture2D::Target::Texture2DMultisample" or
@ref Target::Texture2DMultisampleArray "Texture3D::Target::Texture2DMultisampleArray"
to constructor.
@todoc finish this when fully implemented
@ -115,13 +118,13 @@ or @ref Target "Texture3D::Target::Texture2DMultisampleArray" to constructor.
@section Texture-rectangle Rectangle textures
Rectangle texture is created by passing @ref Target "Target::Rectangle" to
constructor. In shader, the texture is used via `sampler2DRect` and friends.
Rectangle texture is created by passing @ref Target::Rectangle "Texture2D::Target::Rectangle"
to constructor. In shader, the texture is used via `sampler2DRect` and friends.
Unlike `sampler2D`, which accepts coordinates between 0 and 1, `sampler2DRect`
accepts coordinates between 0 and `textureSizeInGivenDirection-1`. Note that
rectangle textures don't support mipmapping and repeating wrapping modes, see
@ref Sampler::Filter "Sampler::Filter", @ref Sampler::Mipmap "Sampler::Mipmap"
and generateMipmap() documentation for more information.
@ref Sampler::Filter, @ref Sampler::Mipmap and @ref generateMipmap()
documentation for more information.
@requires_gl31 %Extension @extension{ARB,texture_rectangle} for rectangle
textures.
@ -255,10 +258,9 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
* textures and (0, textureSizeInGivenDirection-1) for rectangle
* textures. If @extension{EXT,direct_state_access} is not available,
* the texture is bound to some layer before the operation. Initial
* value is @ref Sampler::Wrapping "Sampler::Wrapping::Repeat".
* value is @ref Sampler::Wrapping::Repeat.
* @attention For rectangle textures only some modes are supported,
* see @ref Sampler::Wrapping "Sampler::Wrapping" documentation
* for more information.
* see @ref Sampler::Wrapping documentation for more information.
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter}
* or @fn_gl_extension{TextureParameter,EXT,direct_state_access}
* with @def_gl{TEXTURE_WRAP_S}, @def_gl{TEXTURE_WRAP_T},

11
src/TextureTools/DistanceField.h

@ -75,12 +75,11 @@ http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnifica
@note If internal format of @p output texture is not renderable, this function
prints message to error output and does nothing. In desktop OpenGL and
OpenGL ES 3.0 it's common to render to @ref TextureFormat "TextureFormat::R8".
In OpenGL ES 2.0 you can use @ref TextureFormat "TextureFormat::Red" if
@es_extension{EXT,texture_rg} is available, if not, the smallest but still
inefficient supported format is in most cases @ref TextureFormat "TextureFormat::RGB",
rendering to @ref TextureFormat "TextureFormat::Luminance" is not supported
in most cases.
OpenGL ES 3.0 it's common to render to @ref TextureFormat::R8. In OpenGL ES
2.0 you can use @ref TextureFormat::Red if @es_extension{EXT,texture_rg} is
available, if not, the smallest but still inefficient supported format is
in most cases @ref TextureFormat::RGB, rendering to @ref TextureFormat::Luminance
is not supported in most cases.
@bug ES (and maybe GL < 3.20) implementation behaves slightly different
(jaggies, visible e.g. when rendering outlined fonts)

22
src/Trade/AbstractImageConverter.h

@ -51,9 +51,8 @@ supported.
You don't need to do most of the redundant sanity checks, these things are
checked by the implementation:
- Functions doExportToImage() or doExportToData() are called only if
@ref Feature "Feature::ConvertImage" or @ref Feature "Feature::ConvertData"
is supported.
- Functions @ref doExportToImage() or @ref doExportToData() are called only
if @ref Feature::ConvertImage or @ref Feature::ConvertData is supported.
*/
class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin {
CORRADE_PLUGIN_INTERFACE("cz.mosra.magnum.Trade.AbstractImageConverter/0.2.1")
@ -91,18 +90,18 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin
/**
* @brief Convert image to different format
*
* Available only if @ref Feature "Feature::ConvertImage" is supported.
* Returns converted image on success, `nullptr` otherwise.
* @see features(), exportToData(), exportToFile()
* Available only if @ref Feature::ConvertImage is supported. Returns
* converted image on success, `nullptr` otherwise.
* @see @ref features(), @ref exportToData(), @ref exportToFile()
*/
Image2D* exportToImage(const ImageReference2D& image) const;
/**
* @brief Export image to raw data
*
* Available only if @ref Feature "Feature::ConvertData" is supported.
* Returns data on success, zero-sized array otherwise.
* @see features(), exportToImage(), exportToFile()
* Available only if @ref Feature::ConvertData is supported. Returns
* data on success, zero-sized array otherwise.
* @see @ref features(), @ref exportToImage(), @ref exportToFile()
*/
Containers::Array<unsigned char> exportToData(const ImageReference2D& image) const;
@ -131,9 +130,8 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin
/**
* @brief Implementation of exportToFile()
*
* If @ref Feature "Feature::ConvertData" is supported, default
* implementation calls doExportToData() and saves the result to given
* file.
* If @ref Feature::ConvertData is supported, default implementation
* calls @ref doExportToData() and saves the result to given file.
*/
virtual bool doExportToFile(const ImageReference2D& image, const std::string& filename) const;
};

22
src/Trade/AbstractImporter.h

@ -58,12 +58,13 @@ as the file contains all data user wants to import.
You don't need to do most of the redundant sanity checks, these things are
checked by the implementation:
- Functions doOpenData() and doOpenFile() are called after the previous file
was closed, function doClose() is called only if there is any file opened.
- Function doOpenData() is called only if @ref Feature "Feature::OpenData"
is supported.
- All `do*()` implementations working on opened file are called only if
there is any file opened.
- Functions @ref doOpenData() and @ref doOpenFile() are called after the
previous file was closed, function @ref doClose() is called only if there
is any file opened.
- Function @ref doOpenData() is called only if @ref Feature::OpenData is
supported.
- All `do*()` implementations working on opened file are called only if there
is any file opened.
- All `do*()` implementations taking data ID as parameter are called only if
the ID is from valid range.
*/
@ -100,8 +101,8 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
* @brief Open raw data
*
* Closes previous file, if it was opened, and tries to open given
* file. Available only if @ref Feature "Feature::OpenData" is
* supported. Returns `true` on success, `false` otherwise.
* file. Available only if @ref Feature::OpenData is supported. Returns
* `true` on success, `false` otherwise.
* @see features(), openFile()
*/
bool openData(Containers::ArrayReference<const unsigned char> data);
@ -488,9 +489,8 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
/**
* @brief Implementation for openFile()
*
* If @ref Feature "Feature::OpenData" is supported, default
* implementation opens the file and calls doOpenData() with its
* contents.
* If @ref Feature::OpenData is supported, default implementation opens
* the file and calls @ref doOpenData() with its contents.
*/
virtual void doOpenFile(const std::string& filename);

12
src/Trade/PhongMaterialData.h

@ -79,7 +79,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
/**
* @brief Ambient color
*
* Available only if the material doesn't have @ref Flag "Flag::AmbientTexture".
* Available only if the material doesn't have @ref Flag::AmbientTexture.
* @see @ref flags()
*/
Vector3& ambientColor();
@ -88,7 +88,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
/**
* @brief Ambient texture ID
*
* Available only if the material has @ref Flag "Flag::AmbientTexture".
* Available only if the material has @ref Flag::AmbientTexture.
* @see @ref flags(), @ref AbstractImporter::texture()
*/
UnsignedInt& ambientTexture();
@ -97,7 +97,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
/**
* @brief Diffuse color
*
* Available only if the material doesn't have @ref Flag "Flag::DiffuseTexture".
* Available only if the material doesn't have @ref Flag::DiffuseTexture.
* @see @ref flags()
*/
Vector3& diffuseColor();
@ -106,7 +106,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
/**
* @brief Diffuse texture ID
*
* Available only if the material has @ref Flag "Flag::DiffuseTexture".
* Available only if the material has @ref Flag::DiffuseTexture.
* @see @ref flags(), @ref AbstractImporter::texture()
*/
UnsignedInt& diffuseTexture();
@ -115,7 +115,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
/**
* @brief Specular color
*
* Available only if the material doesn't have @ref Flag "Flag::SpecularTexture".
* Available only if the material doesn't have @ref Flag::SpecularTexture.
* @see @ref flags()
*/
Vector3& specularColor();
@ -124,7 +124,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
/**
* @brief Specular texture ID
*
* Available only if the material has @ref Flag "Flag::SpecularTexture".
* Available only if the material has @ref Flag::SpecularTexture.
* @see @ref flags(), @ref AbstractImporter::texture()
*/
UnsignedInt& specularTexture();

2
src/Trade/TextureData.h

@ -93,7 +93,7 @@ class TextureData {
* @brief Image ID
*
* ID of 1D, 2D or 3D image based on texture type. If type is
* @ref Type "Type::Cube" the function returns first of six consecutive
* @ref Type::Cube the function returns first of six consecutive
* IDs of cube map sides, ordered +X, -X, +Y, -Y, +Z, -Z.
* @see @ref type(), @ref AbstractImporter::image1D(),
* @ref AbstractImporter::image2D(), @ref AbstractImporter::image3D()

Loading…
Cancel
Save