Browse Source

Completed documentation review in root namespace.

pull/54/merge
Vladimír Vondruš 12 years ago
parent
commit
bfbd4d2036
  1. 17
      src/Magnum/AbstractImage.h
  2. 2
      src/Magnum/AbstractResourceLoader.h
  3. 18
      src/Magnum/AbstractShaderProgram.h
  4. 10
      src/Magnum/Array.h
  5. 4
      src/Magnum/Buffer.h
  6. 4
      src/Magnum/ColorFormat.h
  7. 31
      src/Magnum/Context.h
  8. 6
      src/Magnum/DebugMessage.h
  9. 8
      src/Magnum/DefaultFramebuffer.h
  10. 9
      src/Magnum/DimensionTraits.h
  11. 19
      src/Magnum/Extensions.h
  12. 10
      src/Magnum/Framebuffer.h
  13. 2
      src/Magnum/Magnum.h
  14. 10
      src/Magnum/Mesh.h
  15. 122
      src/Magnum/Renderer.h
  16. 17
      src/Magnum/Resource.h
  17. 30
      src/Magnum/ResourceManager.h
  18. 12
      src/Magnum/Sampler.h
  19. 14
      src/Magnum/Shader.h
  20. 2
      src/Magnum/Texture.h
  21. 23
      src/Magnum/Timeline.h

17
src/Magnum/AbstractImage.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::AbstractImage
* @brief Class @ref Magnum::AbstractImage
*/
#include <cstddef>
@ -39,12 +39,12 @@ namespace Magnum {
/**
@brief Non-templated base for one-, two- or three-dimensional images
See Image, ImageReference, BufferImage, Trade::ImageData documentation for
more information.
See @ref Image, @ref ImageReference, @ref BufferImage, @ref Trade::ImageData
documentation for more information.
@todo Where to put glClampColor() and glPixelStore() encapsulation? It is
needed in AbstractFramebuffer::read(), Texture::setImage() etc (i.e. all
functions operating with images). It also possibly needs to be "stackable" to
easily revert the state back.
needed in AbstractFramebuffer::read(), Texture::setImage() etc (i.e. all
functions operating with images). It also possibly needs to be "stackable"
to easily revert the state back.
*/
class MAGNUM_EXPORT AbstractImage {
public:
@ -53,7 +53,7 @@ class MAGNUM_EXPORT AbstractImage {
* @param format Format of the pixel
* @param type Data type of the pixel
*
* @see pixelSize() const
* @see @ref pixelSize()
*/
static std::size_t pixelSize(ColorFormat format, ColorType type);
@ -66,7 +66,8 @@ class MAGNUM_EXPORT AbstractImage {
/**
* @brief Pixel size (in bytes)
*
* Convenience member alternative for pixelSize(Format, Type).
* Convenience member alternative for
* @ref pixelSize(ColorFormat, ColorType).
*/
std::size_t pixelSize() const { return pixelSize(_format, _type); }

2
src/Magnum/AbstractResourceLoader.h

@ -60,7 +60,7 @@ In your @ref doLoad() implementation, after your resources are loaded, call
@ref set() to pass them to @ref ResourceManager or call @ref setNotFound() to
indicate that the resource was not found.
You can also implement @ref name() to provide meaningful names for resource
You can also implement @ref doName() to provide meaningful names for resource
keys.
Example implementation for synchronous mesh loader:

18
src/Magnum/AbstractShaderProgram.h

@ -385,7 +385,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_image_load_store}
* is not available, returns `0`.
* @requires_gl Image load/store is not available in OpenGL ES.
* @requires_gl %Image load/store is not available in OpenGL ES.
* @see @fn_gl{Get} with @def_gl{MAX_IMAGE_UNITS}
*/
static Int maxImageUnits();
@ -396,7 +396,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_image_load_store}
* is not available, returns `0`.
* @requires_gl Image load/store is not available in OpenGL ES.
* @requires_gl %Image load/store is not available in OpenGL ES.
* @see @fn_gl{Get} with @def_gl{MAX_IMAGE_SAMPLES}
*/
static Int maxImageSamples();
@ -408,7 +408,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
* OpenGL calls. If neither @extension{ARB,shader_image_load_store}
* nor @extension{ARB,shader_storage_buffer_object} extension is
* available, returns `0`.
* @requires_gl Image load/store is not available in OpenGL ES.
* @requires_gl %Image load/store is not available in OpenGL ES.
* @see @fn_gl{Get} with @def_gl{MAX_COMBINED_SHADER_OUTPUT_RESOURCES}
*/
static Int maxCombinedShaderOutputResources();
@ -419,7 +419,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object}
* is not available, returns `0`.
* @requires_gl Shader storage is not available in OpenGL ES.
* @requires_gl %Shader storage is not available in OpenGL ES.
* @see @fn_gl{Get} with @def_gl{MAX_SHADER_STORAGE_BLOCK_SIZE}
*/
static Long maxShaderStorageBlockSize();
@ -458,7 +458,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{EXT,gpu_shader4} is not
* available, returns `0`.
* @requires_gles30 Texture lookup with offset is not available in
* @requires_gles30 %Texture lookup with offset is not available in
* OpenGL ES 2.0.
* @see @fn_gl{Get} with @def_gl{MIN_PROGRAM_TEXEL_OFFSET}
*/
@ -470,7 +470,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{EXT,gpu_shader4} is not
* available, returns `0`.
* @requires_gles30 Texture lookup with offset is not available in
* @requires_gles30 %Texture lookup with offset is not available in
* OpenGL ES 2.0.
* @see @fn_gl{Get} with @def_gl{MAX_PROGRAM_TEXEL_OFFSET}
*/
@ -609,7 +609,7 @@ class MAGNUM_EXPORT AbstractShaderProgram: public AbstractObject {
/**
* @brief Bind attribute to given location
* @param location Location
* @param name Attribute name
* @param name %Attribute name
*
* Binds attribute to location which is used later for binding vertex
* buffers.
@ -1163,10 +1163,10 @@ template<UnsignedInt location, class T> class AbstractShaderProgram::Attribute {
};
#ifdef DOXYGEN_GENERATING_OUTPUT
/** @debugoperator{Magnum::AbstractShaderProgram::Attribute} */
/** @debugoperatorclassenum{Magnum::AbstractShaderProgram::Attribute,Magnum::AbstractShaderProgram::Attribute::Components} */
template<class T> Debug operator<<(Debug debug, AbstractShaderProgram::Attribute<T>::Components);
/** @debugoperator{Magnum::AbstractShaderProgram::Attribute} */
/** @debugoperatorclassenum{Magnum::AbstractShaderProgram::Attribute,Magnum::AbstractShaderProgram::Attribute::DataType} */
template<class T> Debug operator<<(Debug debug, AbstractShaderProgram::Attribute<T>::DataType);
#endif

10
src/Magnum/Array.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Array, Magnum::Array1D, Magnum::Array2D, Magnum::Array3D
* @brief Class @ref Magnum::Array, @ref Magnum::Array1D, @ref Magnum::Array2D, @ref Magnum::Array3D
*/
#include <type_traits>
@ -41,10 +41,10 @@ namespace Magnum {
@tparam dimensions Dimension count
@tparam T Data type
Similar to Math::Vector, but more suitable for storing enum values which don't
need any math operations and fuzzy comparison (e.g. enum values). Unlike
Math::Vector this class has non-explicit constructor from one value.
@see Array1D, Array2D, Array3D
Similar to @ref Math::Vector, but more suitable for storing enum values which
don't need any math operations and fuzzy comparison (e.g. enum values). Unlike
@ref Math::Vector this class has implicit constructor from one value.
@see @ref Array1D, @ref Array2D, @ref Array3D
*/
template<UnsignedInt dimensions, class T> class Array {
public:

4
src/Magnum/Buffer.h

@ -291,7 +291,7 @@ class MAGNUM_EXPORT Buffer: public AbstractObject {
ShaderStorage = GL_SHADER_STORAGE_BUFFER,
/**
* Source for texel fetches. See BufferTexture.
* Source for texel fetches. See @ref BufferTexture.
* @requires_gl31 %Extension @extension{ARB,texture_buffer_object}
* @requires_gl Texture buffers are not available in OpenGL ES.
*/
@ -926,7 +926,7 @@ class MAGNUM_EXPORT Buffer: public AbstractObject {
CORRADE_ENUMSET_OPERATORS(Buffer::MapFlags)
/** @debugoperator{Magnum::Buffer} */
/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::Target} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Buffer::Target value);
inline Buffer::Buffer(Buffer&& other) noexcept: _id(other._id), _targetHint(other._targetHint) {

4
src/Magnum/ColorFormat.h

@ -491,10 +491,10 @@ enum class ColorType: GLenum {
#endif
};
/** @debugoperator{ColorFormat} */
/** @debugoperatorenum{Magnum::ColorFormat} */
Debug MAGNUM_EXPORT operator<<(Debug debug, ColorFormat value);
/** @debugoperator{ColorFormat} */
/** @debugoperatorenum{Magnum::ColorType} */
Debug MAGNUM_EXPORT operator<<(Debug debug, ColorType value);
}

31
src/Magnum/Context.h

@ -41,8 +41,6 @@
namespace Magnum {
/** @todoc Resolve conflict with Audio/Context.h (Doxygen doesn't list this file) */
namespace Implementation {
struct State;
}
@ -85,7 +83,7 @@ class MAGNUM_EXPORT Extension {
};
/**
@brief Magnum context
@brief %Magnum context
Provides access to version and extension information. Instance available
through @ref Context::current() is automatically created during construction of
@ -94,14 +92,9 @@ instance is available during whole lifetime of *Application object. See
@ref platform documentation for more information about engine setup.
*/
class MAGNUM_EXPORT Context {
Context(const Context&) = delete;
Context(Context&&) = delete;
Context& operator=(const Context&) = delete;
Context& operator=(Context&&) = delete;
public:
/**
* @brief Context flag
* @brief %Context flag
*
* @see @ref Flags, @ref flags(), @ref Platform::Sdl2Application::Configuration::setFlags() "Platform::*Application::Configuration::setFlags()"
*/
@ -170,7 +163,7 @@ class MAGNUM_EXPORT Context {
typedef Containers::EnumSet<State, UnsignedInt> States;
/**
* @brief Context flags
* @brief %Context flags
*
* @see @ref flags()
*/
@ -187,8 +180,20 @@ class MAGNUM_EXPORT Context {
*/
explicit Context();
/** @brief Copying is not allowed */
Context(const Context&) = delete;
/** @brief Moving is not allowed */
Context(Context&&) = delete;
~Context();
/** @brief Copying is not allowed */
Context& operator=(const Context&) = delete;
/** @brief Moving is not allowed */
Context& operator=(Context&&) = delete;
/** @brief Current context */
static Context* current() { return _current; }
@ -274,7 +279,7 @@ class MAGNUM_EXPORT Context {
std::vector<std::string> shadingLanguageVersionStrings() const;
/**
* @brief Extension strings
* @brief %Extension strings
*
* The result is *not* cached, repeated queries will result in repeated
* OpenGL calls. Note that this function returns list of all extensions
@ -286,7 +291,7 @@ class MAGNUM_EXPORT Context {
*/
std::vector<std::string> extensionStrings() const;
/** @brief Context flags */
/** @brief %Context flags */
Flags flags() const { return _flags; }
/**
@ -446,7 +451,7 @@ class MAGNUM_EXPORT Context {
Implementation::State* _state;
};
/** @debugoperator{Magnum::Context} */
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */
MAGNUM_EXPORT Debug operator<<(Debug debug, Context::Flag value);
/** @hideinitializer

6
src/Magnum/DebugMessage.h

@ -317,13 +317,13 @@ class MAGNUM_EXPORT DebugMessage {
static MAGNUM_LOCAL void callbackImplementationKhr(Callback callback, const void* userParam);
};
/** @debugoperator{Magnum::DebugMessage} */
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Source value);
/** @debugoperator{Magnum::DebugMessage} */
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Type} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Type value);
/** @debugoperator{Magnum::DebugMessage} */
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Severity} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Severity value);
}

8
src/Magnum/DefaultFramebuffer.h

@ -145,7 +145,8 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
/**
* Write output to back buffer.
*
* On desktop OpenGL, this is equal to @ref DrawAttachment::BackLeft.
* On desktop OpenGL, this is equal to
* @ref DrawAttachment::BackLeft.
*/
#ifdef MAGNUM_TARGET_GLES
Back = GL_BACK,
@ -156,7 +157,8 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
/**
* Write output to front buffer.
*
* On desktop OpenGL, this is equal to @ref DrawAttachment::FrontLeft.
* On desktop OpenGL, this is equal to
* @ref DrawAttachment::FrontLeft.
*/
#ifdef MAGNUM_TARGET_GLES
Front = GL_FRONT
@ -433,7 +435,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
/** @brief Default framebuffer instance */
extern DefaultFramebuffer MAGNUM_EXPORT defaultFramebuffer;
/** @debugoperator{DefaultFramebuffer} */
/** @debugoperatorclassenum{Magnum::DefaultFramebuffer,Magnum::DefaultFramebuffer::Status} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DefaultFramebuffer::Status value);
}

9
src/Magnum/DimensionTraits.h

@ -29,7 +29,7 @@
#include "Magnum/Types.h"
/** @file
* @brief Class Magnum::DimensionTraits
* @brief Class @ref Magnum::DimensionTraits
*/
namespace Magnum {
@ -42,15 +42,16 @@ template<UnsignedInt dimensions, class T> struct DimensionTraits {
/**
* @brief Vector type
*
* Math::Vector, Math::Vector2 or Math::Vector3 based on dimension count.
* @ref Math::Vector, @ref Math::Vector2 or @ref Math::Vector3 based on
* dimension count.
*/
typedef U VectorType;
/**
* @brief Matrix type
*
* Floating-point Math::Matrix3 or Math::Matrix4 for 2D or 3D. No matrix
* type defined for one dimension and integral types.
* Floating-point @ref Math::Matrix3 or @ref Math::Matrix4 for 2D or 3D. No
* matrix type defined for one dimension and integral types.
*/
typedef U MatrixType;
#endif

19
src/Magnum/Extensions.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Namespace Magnum::Extensions
* @brief Namespace @ref Magnum::Extensions
*/
#include "Magnum/Version.h"
@ -37,16 +37,21 @@ namespace Magnum {
@brief Compile-time information about OpenGL extensions
Each extension is `struct` named hierarchically by prefix, vendor and
extension name, for example `GL::APPLE::vertex_array_object`. Each struct has
the same public methods as Extension class (requiredVersion(), coreVersion()
and string(), but these structs are better suited for compile-time decisions
rather than %Extension instances. See Context::isExtensionSupported() for
example usage.
extension name taken from list at @ref opengl-support, for example
`GL::ARB::texture_storage`. Note that desktop extensions are available only on
desktop build, OpenGL ES 2.0 extensions which are part of ES 3.0 are available
only on @ref MAGNUM_TARGET_GLES2 "OpenGL ES 2.0 build" and vendor OpenGL ES
extensions are available only on @ref MAGNUM_TARGET_GLES "OpenGL ES builds".
Each struct has the same public methods as Extension class (requiredVersion(),
coreVersion() and string(), but these structs are better suited for
compile-time decisions rather than %Extension instances. See
@ref Context::isExtensionSupported() for example usage.
This namespace is built by default. To use it, you need to add `${MAGNUM_INCLUDE_DIRS}`
to include path and link to `${MAGNUM_LIBRARIES}`. See @ref building and
@ref cmake for more information.
@see MAGNUM_ASSERT_EXTENSION_SUPPORTED()
@see @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED()
@todo Manual indices for extensions, this has gaps
*/
namespace Extensions {

10
src/Magnum/Framebuffer.h

@ -480,7 +480,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
/**
* @brief Attach texture to given buffer
* @param attachment %Buffer attachment
* @param texture Texture
* @param texture %Texture
* @param level Mip level
* @return Reference to self (for method chaining)
*
@ -498,7 +498,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
/**
* @brief Attach texture to given buffer
* @param attachment %Buffer attachment
* @param texture Texture
* @param texture %Texture
* @param level Mip level
* @return Reference to self (for method chaining)
*
@ -528,7 +528,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
/**
* @brief Attach cube map texture to given buffer
* @param attachment %Buffer attachment
* @param texture Cube map texture
* @param texture %Texture
* @param coordinate Cube map coordinate
* @param level Mip level
* @return Reference to self (for method chaining)
@ -545,7 +545,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
/**
* @brief Attach texture layer to given buffer
* @param attachment %Buffer attachment
* @param texture Texture
* @param texture %Texture
* @param level Mip level
* @param layer Layer
* @return Reference to self (for method chaining)
@ -647,7 +647,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
#endif
};
/** @debugoperator{DefaultFramebuffer} */
/** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Framebuffer::Status value);
inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept {

2
src/Magnum/Magnum.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Forward declarations for Magnum namespace
* @brief Forward declarations for @ref Magnum namespace
*/
#include <Corrade/Utility/Utility.h>

10
src/Magnum/Mesh.h

@ -743,7 +743,7 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
/**
* @brief Draw the mesh
* @param shader Shader to use for drawing
* @param shader %Shader to use for drawing
*
* Expects that the shader is compatible with this mesh and is fully
* set up. If vertex/index count or instance count is `0`, no draw
@ -985,17 +985,17 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
#endif
};
/** @debugoperator{Magnum::Mesh} */
/** @debugoperatorenum{Magnum::MeshPrimitive} */
Debug MAGNUM_EXPORT operator<<(Debug debug, MeshPrimitive value);
/** @debugoperator{Magnum::Mesh} */
/** @debugoperatorclassenum{Magnum::Mesh,Magnum::Mesh::IndexType} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Mesh::IndexType value);
}
namespace Corrade { namespace Utility {
/** @configurationvalue{Magnum::Mesh} */
/** @configurationvalue{Magnum::MeshPrimitive} */
template<> struct MAGNUM_EXPORT ConfigurationValue<Magnum::MeshPrimitive> {
ConfigurationValue() = delete;
@ -1014,7 +1014,7 @@ template<> struct MAGNUM_EXPORT ConfigurationValue<Magnum::MeshPrimitive> {
static Magnum::MeshPrimitive fromString(const std::string& stringValue, ConfigurationValueFlags);
};
/** @configurationvalue{Magnum::Mesh} */
/** @configurationvalue{Magnum::Mesh::IndexType} */
template<> struct MAGNUM_EXPORT ConfigurationValue<Magnum::Mesh::IndexType> {
ConfigurationValue() = delete;

122
src/Magnum/Renderer.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Renderer
* @brief Class @ref Magnum::Renderer
*/
#include <Corrade/Containers/EnumSet.h>
@ -57,10 +57,10 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Affected polygon facing for culling, stencil operations and masks
*
* @see setFaceCullingMode(),
* setStencilFunction(PolygonFacing, StencilFunction, Int, UnsignedInt),
* setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation),
* setStencilMask(PolygonFacing, UnsignedInt)
* @see @ref setFaceCullingMode(),
* @ref setStencilFunction(PolygonFacing, StencilFunction, Int, UnsignedInt),
* @ref setStencilOperation(PolygonFacing, StencilOperation, StencilOperation, StencilOperation),
* @ref setStencilMask(PolygonFacing, UnsignedInt)
*/
enum class PolygonFacing: GLenum {
Front = GL_FRONT, /**< Front-facing polygons */
@ -74,12 +74,13 @@ class MAGNUM_EXPORT Renderer {
* @brief Features
*
* All features are disabled by default unless specified otherwise.
* @see setFeature()
* @see @ref setFeature()
*/
enum class Feature: GLenum {
/**
* Blending
* @see setBlendEquation(), setBlendFunction(), setBlendColor()
* @see @ref setBlendEquation(), @ref setBlendFunction(),
* @ref setBlendColor()
*/
Blending = GL_BLEND,
@ -119,7 +120,8 @@ class MAGNUM_EXPORT Renderer {
/**
* Depth test
* @see setClearDepth(), setDepthFunction(), setDepthMask()
* @see @ref setClearDepth(), @ref setDepthFunction(),
* @ref setDepthMask()
*/
DepthTest = GL_DEPTH_TEST,
@ -127,14 +129,14 @@ class MAGNUM_EXPORT Renderer {
/**
* Back face culling
* @see setFrontFace()
* @see @ref setFrontFace()
*/
FaceCulling = GL_CULL_FACE,
#ifndef MAGNUM_TARGET_GLES
/**
* Logical operation
* @see setLogicOperation()
* @see @ref setLogicOperation()
* @requires_gl Logical operations on framebuffer are not
* available in OpenGL ES.
*/
@ -155,7 +157,7 @@ class MAGNUM_EXPORT Renderer {
* Offset filled polygons
* @see @ref Magnum::Renderer::Feature "Feature::PolygonOffsetLine",
* @ref Magnum::Renderer::Feature "Feature::PolygonOffsetPoint",
* setPolygonOffset()
* @ref setPolygonOffset()
*/
PolygonOffsetFill = GL_POLYGON_OFFSET_FILL,
@ -164,7 +166,7 @@ class MAGNUM_EXPORT Renderer {
* Offset lines
* @see @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill",
* @ref Magnum::Renderer::Feature "Feature::PolygonOffsetPoint",
* setPolygonOffset()
* @ref setPolygonOffset()
* @requires_gl Only @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill"
* is available in OpenGL ES.
*/
@ -174,7 +176,7 @@ class MAGNUM_EXPORT Renderer {
* Offset points
* @see @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill",
* @ref Magnum::Renderer::Feature "Feature::PolygonOffsetLine",
* setPolygonOffset()
* @ref setPolygonOffset()
* @requires_gl Only @ref Magnum::Renderer::Feature "Feature::PolygonOffsetFill"
* is available in OpenGL ES.
*/
@ -185,7 +187,7 @@ class MAGNUM_EXPORT Renderer {
/**
* Programmable point size. If enabled, the point size is taken
* from vertex/geometry shader builtin `gl_PointSize`.
* @see setPointSize()
* @see @ref setPointSize()
* @requires_gl Always enabled on OpenGL ES.
*/
ProgramPointSize = GL_PROGRAM_POINT_SIZE,
@ -193,14 +195,14 @@ class MAGNUM_EXPORT Renderer {
/**
* Scissor test
* @see setScissor()
* @see @ref setScissor()
*/
ScissorTest = GL_SCISSOR_TEST,
#ifndef MAGNUM_TARGET_GLES
/**
* Seamless cube map texture.
* @see CubeMapTexture, CubeMapTextureArray
* @see @ref CubeMapTexture, @ref CubeMapTextureArray
* @requires_gl32 %Extension @extension{ARB,seamless_cube_map}
* @requires_gl Not available in OpenGL ES 2.0, always enabled in
* OpenGL ES 3.0.
@ -210,8 +212,8 @@ class MAGNUM_EXPORT Renderer {
/**
* Stencil test
* @see setClearStencil(), setStencilFunction(),
* setStencilOperation(), setStencilMask()
* @see @ref setClearStencil(), @ref setStencilFunction(),
* @ref setStencilOperation(), @ref setStencilMask()
*/
StencilTest = GL_STENCIL_TEST
};
@ -226,7 +228,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Hint
*
* @see setHint()
* @see @ref setHint()
* @todo other hints
*/
enum class Hint: GLenum {
@ -245,7 +247,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Hint mode
*
* @see setHint()
* @see @ref setHint()
*/
enum class HintMode: GLenum {
Fastest = GL_FASTEST, /**< Most efficient option. */
@ -279,7 +281,8 @@ class MAGNUM_EXPORT Renderer {
*
* Initial value is `1.0`.
* @see @ref Feature::DepthTest, @fn_gl{ClearDepth}
* @requires_gl See setClearDepth(Float), which is available in OpenGL ES.
* @requires_gl See @ref Magnum::Renderer::setClearDepth(Float) "setClearDepth(Float)",
* which is available in OpenGL ES.
*/
static void setClearDepth(Double depth);
#endif
@ -287,9 +290,10 @@ class MAGNUM_EXPORT Renderer {
/**
* @overload
*
* @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).
* is not available, this function behaves exactly as
* @ref setClearDepth(Double).
* @see @ref Feature::DepthTest, @fn_gl{ClearDepth}
*/
static void setClearDepth(Float depth);
@ -308,7 +312,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Front facing polygon winding
*
* @see setFrontFace()
* @see @ref setFrontFace()
*/
enum class FrontFace: GLenum {
/** @brief Counterclockwise polygons are front facing (default). */
@ -322,7 +326,7 @@ class MAGNUM_EXPORT Renderer {
* @brief Set front-facing polygon winding
*
* Initial value is `FrontFace::%CounterClockWise`.
* @see setFaceCullingMode(), @fn_gl{FrontFace}
* @see @ref setFaceCullingMode(), @fn_gl{FrontFace}
*/
static void setFrontFace(FrontFace mode);
@ -331,7 +335,7 @@ class MAGNUM_EXPORT Renderer {
*
* Initial value is @ref PolygonFacing::Back. If set to both front and
* back, only points and lines are drawn.
* @see @ref Feature::FaceCulling, setFrontFace(),
* @see @ref Feature::FaceCulling, @ref setFrontFace(),
* @fn_gl{CullFace}
*/
static void setFaceCullingMode(PolygonFacing mode);
@ -340,7 +344,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Provoking vertex
*
* @see setProvokingVertex()
* @see @ref setProvokingVertex()
* @requires_gl32 %Extension @extension{ARB,provoking_vertex}. Older
* versions behave always like
* @ref Magnum::Renderer::ProvokingVertex "ProvokingVertex::LastVertexConvention".
@ -369,7 +373,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Polygon mode
*
* @see setPolygonMode()
* @see @ref setPolygonMode()
* @requires_gl OpenGL ES behaves always like @ref Magnum::Renderer::PolygonMode "PolygonMode::Fill".
* See @ref Magnum::Mesh::setPrimitive() "Mesh::setPrimitive()"
* for possible workaround.
@ -381,13 +385,13 @@ class MAGNUM_EXPORT Renderer {
Fill = GL_FILL,
/**
* Boundary edges are filled. See also setLineWidth().
* Boundary edges are filled. See also @ref setLineWidth().
*/
Line = GL_LINE,
/**
* Starts of boundary edges are drawn as points. See also
* setPointSize().
* @ref setPointSize().
*/
Point = GL_POINT
};
@ -452,7 +456,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Stencil function
*
* @see setStencilFunction(), @ref DepthFunction
* @see @ref setStencilFunction(), @ref DepthFunction
*/
enum class StencilFunction: GLenum {
Never = GL_NEVER, /**< Never pass the test. */
@ -468,7 +472,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Stencil operation
*
* @see setStencilOperation()
* @see @ref setStencilOperation()
*/
enum class StencilOperation: GLenum {
Keep = GL_KEEP, /**< Keep the current value. */
@ -476,7 +480,7 @@ class MAGNUM_EXPORT Renderer {
/**
* Set the stencil value to reference value specified by
* setStencilFunction().
* @ref setStencilFunction().
*/
Replace = GL_REPLACE,
@ -569,7 +573,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Depth function
*
* @see setDepthFunction()
* @see @ref setDepthFunction()
*/
typedef StencilFunction DepthFunction;
@ -600,7 +604,7 @@ class MAGNUM_EXPORT Renderer {
*
* Set to `false` to disallow writing to depth buffer. Initial value
* is `true`.
* @see setColorMask(), setStencilMask(), @fn_gl{DepthMask}
* @see @ref setColorMask(), @ref setStencilMask(), @fn_gl{DepthMask}
*/
static void setDepthMask(GLboolean allow);
@ -612,8 +616,8 @@ class MAGNUM_EXPORT Renderer {
*
* @attention In @ref MAGNUM_TARGET_WEBGL "WebGL" the mask must be the
* same for both front and back polygon facing.
* @see setStencilMask(UnsignedInt), setColorMask(), setDepthMask(),
* @fn_gl{StencilMaskSeparate}
* @see @ref setStencilMask(UnsignedInt), @ref setColorMask(),
* @ref setDepthMask(), @fn_gl{StencilMaskSeparate}
*/
static void setStencilMask(PolygonFacing facing, UnsignedInt allowBits);
@ -638,7 +642,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Blend equation
*
* @see setBlendEquation()
* @see @ref setBlendEquation()
*/
enum class BlendEquation: GLenum {
Add = GL_FUNC_ADD, /**< `source + destination` */
@ -666,7 +670,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Blend function
*
* @see setBlendFunction()
* @see @ref setBlendFunction()
*/
enum class BlendFunction: GLenum {
/** Zero (@f$ RGB = (0.0, 0.0, 0.0); A = 0.0 @f$) */
@ -678,28 +682,28 @@ class MAGNUM_EXPORT Renderer {
/**
* Constant color (@f$ RGB = (R_c, G_c, B_c); A = A_c @f$)
*
* @see setBlendColor()
* @see @ref setBlendColor()
*/
ConstantColor = GL_CONSTANT_COLOR,
/**
* One minus constant color (@f$ RGB = (1.0 - R_c, 1.0 - G_c, 1.0 - B_c); A = 1.0 - A_c @f$)
*
* @see setBlendColor()
* @see @ref setBlendColor()
*/
OneMinusConstantColor = GL_ONE_MINUS_CONSTANT_COLOR,
/**
* Constant alpha (@f$ RGB = (A_c, A_c, A_c); A = A_c @f$)
*
* @see setBlendColor()
* @see @ref setBlendColor()
*/
ConstantAlpha = GL_CONSTANT_ALPHA,
/**
* One minus constant alpha (@f$ RGB = (1.0 - A_c, 1.0 - A_c, 1.0 - A_c); A = 1.0 - A_c @f$)
*
* @see setBlendColor()
* @see @ref setBlendColor()
*/
OneMinusConstantAlpha = GL_ONE_MINUS_CONSTANT_ALPHA,
@ -710,7 +714,7 @@ class MAGNUM_EXPORT Renderer {
/**
* Second source color (@f$ RGB = (R_{s1}, G_{s1}, B_{s1}); A = A_{s1} @f$)
*
* @see AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @requires_gl33 %Extension @extension{ARB,blend_func_extended}
* @requires_gl Multiple blending inputs are not available in
* OpenGL ES.
@ -727,7 +731,7 @@ class MAGNUM_EXPORT Renderer {
/**
* One minus second source color (@f$ RGB = (1.0 - R_{s1}, 1.0 - G_{s1}, 1.0 - B_{s1}); A = 1.0 - A_{s1} @f$)
*
* @see AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @requires_gl33 %Extension @extension{ARB,blend_func_extended}
* @requires_gl Multiple blending inputs are not available in
* OpenGL ES.
@ -741,7 +745,7 @@ class MAGNUM_EXPORT Renderer {
/**
* Saturate source alpha (@f$ RGB = (f, f, f); A = 1.0; f = min(A_s, 1.0 - A_d) @f$)
*
* Can be used only in source parameter of setBlendFunction().
* Can be used only in source parameter of @ref setBlendFunction().
*/
SourceAlphaSaturate = GL_SRC_ALPHA_SATURATE,
@ -749,7 +753,7 @@ class MAGNUM_EXPORT Renderer {
/**
* Second source alpha (@f$ RGB = (A_{s1}, A_{s1}, A_{s1}); A = A_{s1} @f$)
*
* @see AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @requires_gl33 %Extension @extension{ARB,blend_func_extended}
* @requires_gl Multiple blending inputs are not available in
* OpenGL ES.
@ -766,7 +770,7 @@ class MAGNUM_EXPORT Renderer {
/**
* One minus second source alpha (@f$ RGB = (1.0 - A_{s1}, 1.0 - A_{s1}, 1.0 - A_{s1}); A = 1.0 - A_{s1} @f$)
*
* @see AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @see @ref AbstractShaderProgram::bindFragmentDataLocationIndexed()
* @requires_gl33 %Extension @extension{ARB,blend_func_extended}
* @requires_gl Multiple blending inputs are not available in
* OpenGL ES.
@ -830,7 +834,8 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Set blend function separately for RGB and alpha components
*
* See @ref setBlendFunction(BlendFunction, BlendFunction) for more information.
* See @ref setBlendFunction(BlendFunction, BlendFunction) for more
* information.
* @see @ref Feature::Blending, @ref setBlendEquation(),
* @ref setBlendColor(), @fn_gl{BlendFuncSeparate}
*/
@ -895,7 +900,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Flush the pipeline
*
* @see finish(), @fn_gl{Flush}
* @see @ref finish(), @fn_gl{Flush}
*/
static void flush() { glFlush(); }
@ -903,14 +908,14 @@ class MAGNUM_EXPORT Renderer {
* @brief Finish the pipeline
*
* Blocks until all commands in the pipeline are finished.
* @see flush(), @fn_gl{Finish}
* @see @ref flush(), @fn_gl{Finish}
*/
static void finish() { glFinish(); }
/**
* @brief Error status
*
* @see error()
* @see @ref error()
*/
enum class Error: GLenum {
/** No error has been recorded */
@ -971,7 +976,7 @@ class MAGNUM_EXPORT Renderer {
/**
* @brief Graphics reset notification strategy
*
* @see resetNotificationStrategy()
* @see @ref resetNotificationStrategy()
* @requires_extension %Extension @extension{ARB,robustness}
* @requires_es_extension %Extension @es_extension{EXT,robustness}
*/
@ -1005,14 +1010,15 @@ class MAGNUM_EXPORT Renderer {
* OpenGL calls. If OpenGL extension @extension{ARB,robustness} or ES
* extension @es_extension{EXT,robustness} is not available, this
* function always returns @ref ResetNotificationStrategy::NoResetNotification.
* @see graphicsResetStatus(), @fn_gl{Get} with @def_gl{RESET_NOTIFICATION_STRATEGY_ARB}
* @see @ref graphicsResetStatus(), @fn_gl{Get} with
* @def_gl{RESET_NOTIFICATION_STRATEGY_ARB}
*/
static ResetNotificationStrategy resetNotificationStrategy();
/**
* @brief Graphics reset status
*
* @see resetNotificationStrategy(), graphicsResetStatus()
* @see @ref resetNotificationStrategy(), @ref graphicsResetStatus()
* @requires_extension %Extension @extension{ARB,robustness}
* @requires_es_extension %Extension @es_extension{EXT,robustness}
*/
@ -1066,13 +1072,13 @@ class MAGNUM_EXPORT Renderer {
static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationRobustness();
};
/** @debugoperator{Renderer} */
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::Error value);
/** @debugoperator{Renderer} */
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::ResetNotificationStrategy value);
/** @debugoperator{Renderer} */
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::GraphicsResetStatus} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::GraphicsResetStatus value);
}

17
src/Magnum/Resource.h

@ -68,7 +68,7 @@ enum class ResourceState: UnsignedByte {
Final
};
/** @debugoperator{Magnum::Resource} */
/** @debugoperatorenum{Magnum::ResourceState} */
Debug MAGNUM_EXPORT operator<<(Debug debug, ResourceState value);
/**
@ -149,13 +149,14 @@ class Resource {
/** @brief Move assignment */
Resource<T, U>& operator=(Resource<T, U>&& other);
/** @brief Resource key */
/** @brief %Resource key */
ResourceKey key() const { return _key; }
/**
* @brief %Resource state
*
* @see @ref operator bool(), @ref ResourceManager::state()
* @see operator bool(), @ref ResourceManager::state()
* @todoc Make explicit reference when Doxygen can handle operators
*/
ResourceState state() {
acquire();
@ -166,9 +167,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::NotLoaded,
* @ref ResourceState::Loading or @ref ResourceState::NotFound), `true`
* otherwise.
* available (i.e. @ref state() is either
* @ref ResourceState::NotLoaded, @ref ResourceState::Loading or
* @ref ResourceState::NotFound), `true` otherwise.
*/
operator bool() {
acquire();
@ -201,10 +202,10 @@ class Resource {
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @overload
* @deprecated Use the explicit @ref Magnum::Resource::operator*() "operator*()" or
* @ref Magnum::Resource::operator->() "operator->()" instead.
* @deprecated Use the explicit operator*() or operator->() instead.
* Implicit conversion is no longer allowed if it might throw an
* assertion.
* @todoc Explicit reference when Doxygen can handle operators
*/
CORRADE_DEPRECATED("use operator*() or operator->() instead") operator U&() { return **this; }
#endif

30
src/Magnum/ResourceManager.h

@ -98,14 +98,15 @@ template<class T> class ResourceManagerData {
template<class, class> friend class Magnum::Resource;
friend class AbstractResourceLoader<T>;
ResourceManagerData(const ResourceManagerData<T>&) = delete;
ResourceManagerData(ResourceManagerData<T>&&) = delete;
ResourceManagerData<T>& operator=(const ResourceManagerData<T>&) = delete;
ResourceManagerData<T>& operator=(ResourceManagerData<T>&&) = delete;
public:
ResourceManagerData(const ResourceManagerData<T>&) = delete;
ResourceManagerData(ResourceManagerData<T>&&) = delete;
virtual ~ResourceManagerData();
ResourceManagerData<T>& operator=(const ResourceManagerData<T>&) = delete;
ResourceManagerData<T>& operator=(ResourceManagerData<T>&&) = delete;
std::size_t lastChange() const { return _lastChange; }
std::size_t count() const { return _data.size(); }
@ -198,10 +199,10 @@ MyResourceManager manager;
contains the data for it, as long as the resource data are not accessed (or
fallback is provided).
@code
MyResourceManager* manager = MyResourceManager::instance();
Resource<Texture2D> texture(manager->get<Texture2D>("texture"));
Resource<AbstractShaderProgram, MyShader> shader(manager->get<AbstractShaderProgram, MyShader>("shader"));
Resource<Mesh> cube(manager->get<Mesh>("cube"));
MyResourceManager& manager = MyResourceManager::instance();
Resource<Texture2D> texture{manager.get<Texture2D>("texture")};
Resource<AbstractShaderProgram, MyShader> shader{manager.get<AbstractShaderProgram, MyShader>("shader")};
Resource<Mesh> cube{manager.get<Mesh>("cube")};
// The manager doesn't have data for the cube yet, add them
if(!cube) {
@ -218,7 +219,7 @@ cube->draw(*shader);
- Destroying resource references and deleting manager instance when nothing
references the resources anymore.
@see AbstractResourceLoader
@see @ref AbstractResourceLoader
*/
/* Due to too much work involved with explicit template instantiation (all
Resource combinations, all ResourceManagerData...), this class doesn't have
@ -580,12 +581,10 @@ template<class T> void ResourceManagerData<T>::decrementReferenceCount(ResourceK
}
template<class T> struct ResourceManagerData<T>::Data {
Data(const Data&) = delete;
Data& operator=(const Data&) = delete;
Data& operator=(Data&&) = delete;
Data(): data(nullptr), state(ResourceDataState::Mutable), policy(ResourcePolicy::Manual), referenceCount(0) {}
Data(const Data&) = delete;
Data(Data&& other): data(other.data), state(other.state), policy(other.policy), referenceCount(other.referenceCount) {
other.data = nullptr;
other.referenceCount = 0;
@ -593,6 +592,9 @@ template<class T> struct ResourceManagerData<T>::Data {
~Data();
Data& operator=(const Data&) = delete;
Data& operator=(Data&&) = delete;
T* data;
ResourceDataState state;
ResourcePolicy policy;

12
src/Magnum/Sampler.h

@ -243,23 +243,23 @@ class MAGNUM_EXPORT Sampler {
#endif
};
/** @debugoperator{Magnum::Sampler} */
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Filter} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Filter value);
/** @debugoperator{Magnum::Sampler} */
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Mipmap} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Mipmap value);
/** @debugoperator{Magnum::Sampler} */
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Wrapping} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Wrapping value);
/** @debugoperator{Magnum::Sampler} */
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareMode} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::CompareMode value);
/** @debugoperator{Magnum::Sampler} */
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareFunction} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::CompareFunction value);
#ifndef MAGNUM_TARGET_GLES
/** @debugoperator{Magnum::Sampler} */
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::DepthStencilMode} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::DepthStencilMode value);
#endif

14
src/Magnum/Shader.h

@ -301,7 +301,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_image_load_store}
* or particular shader stage is not available, returns `0`.
* @requires_gl Image load/store is not available in OpenGL ES.
* @requires_gl %Image load/store is not available in OpenGL ES.
* @see @ref maxCombinedImageUniforms(),
* @fn_gl{Get} with @def_gl{MAX_VERTEX_IMAGE_UNIFORMS},
* @def_gl{MAX_TESS_CONTROL_IMAGE_UNIFORMS},
@ -318,7 +318,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_image_load_store}
* is not available, returns `0`.
* @requires_gl Image load/store is not available in OpenGL ES.
* @requires_gl %Image load/store is not available in OpenGL ES.
* @see @ref maxImageUniforms(),
* @fn_gl{Get} with @def_gl{MAX_COMBINED_IMAGE_UNIFORMS}
*/
@ -330,7 +330,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object}
* or particular shader stage is not available, returns `0`.
* @requires_gl Shader storage is not available in OpenGL ES.
* @requires_gl %Shader storage is not available in OpenGL ES.
* @see @ref maxCombinedShaderStorageBlocks(),
* @fn_gl{Get} with @def_gl{MAX_VERTEX_SHADER_STORAGE_BLOCKS},
* @def_gl{MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS},
@ -347,7 +347,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
* The result is cached, repeated queries don't result in repeated
* OpenGL calls. If extension @extension{ARB,shader_storage_buffer_object}
* is not available, returns `0`.
* @requires_gl Shader storage is not available in OpenGL ES.
* @requires_gl %Shader storage is not available in OpenGL ES.
* @see @ref maxShaderStorageBlocks(),
* @fn_gl{Get} with @def_gl{MAX_COMBINED_SHADER_STORAGE_BLOCKS}
*/
@ -508,10 +508,10 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
*/
Shader& setLabel(const std::string& label);
/** @brief Shader type */
/** @brief %Shader type */
Type type() const { return _type; }
/** @brief Shader sources */
/** @brief %Shader sources */
std::vector<std::string> sources() const;
/**
@ -553,7 +553,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
std::vector<std::string> _sources;
};
/** @debugoperator{Magnum::Shader} */
/** @debugoperatorclassenum{Magnum::Shader,Magnum::Shader::Type} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Shader::Type value);
inline Shader::Shader(Shader&& other) noexcept: _type(other._type), _id(other._id), _sources(std::move(other._sources)) {

2
src/Magnum/Texture.h

@ -699,7 +699,7 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
*
* If @extension{EXT,direct_state_access} is not available, the texture
* is bound to some texture unit before the operation.
* @see setMinificationFilter(), @fn_gl{ActiveTexture},
* @see @ref setMinificationFilter(), @fn_gl{ActiveTexture},
* @fn_gl{BindTexture} and @fn_gl{GenerateMipmap} or
* @fn_gl_extension{GenerateTextureMipmap,EXT,direct_state_access}
* @requires_gl30 %Extension @extension{ARB,framebuffer_object}

23
src/Magnum/Timeline.h

@ -26,7 +26,7 @@
*/
/** @file
* @brief Class Magnum::Timeline
* @brief Class @ref Magnum::Timeline
*/
#include <chrono>
@ -45,17 +45,18 @@ as source for animation speed computations.
@section Timeline-usage Basic usage
Construct the timeline on initialization so the instance is available for
whole lifetime of the application. Call start() before first draw event is
whole lifetime of the application. Call @ref start() before first draw event is
performed, after everything is properly initialized.
@note When timeline is started, it immediately starts measuring frame time.
Be prepared that time of first frame will be much longer than time of
following frames. It mainly depends on where you called start() in your
initialization routine, but can be also affected by driver- and
following frames. It mainly depends on where you called @ref start() in
your initialization routine, but can be also affected by driver- and
GPU-specific lazy texture binding, shader recompilations etc.
In your draw event implementation don't forget to call nextFrame() after
buffer swap. You can use previousFrameDuration() to compute animation speed.
In your draw event implementation don't forget to call @ref nextFrame() after
buffer swap. You can use @ref previousFrameDuration() to compute animation
speed.
Example usage:
@code
@ -87,7 +88,7 @@ class MAGNUM_EXPORT Timeline {
* @brief Constructor
*
* Creates stopped timeline.
* @see start()
* @see @ref start()
*/
explicit Timeline(): _minimalFrameTime(0), _previousFrameDuration(0), running(false) {}
@ -99,7 +100,7 @@ class MAGNUM_EXPORT Timeline {
* @return Reference to self (for method chaining)
*
* Default value is 0.
* @see nextFrame()
* @see @ref nextFrame()
*/
Timeline& setMinimalFrameTime(Float seconds) {
_minimalFrameTime = seconds;
@ -110,14 +111,14 @@ class MAGNUM_EXPORT Timeline {
* @brief Start timeline
*
* Sets previous frame time and duration to `0`.
* @see stop(), previousFrameDuration()
* @see @ref stop(), @ref previousFrameDuration()
*/
void start();
/**
* @brief Stop timeline
*
* @see start(), nextFrame()
* @see @ref start(), @ref nextFrame()
*/
void stop();
@ -127,7 +128,7 @@ class MAGNUM_EXPORT Timeline {
* If current frame time is smaller than minimal frame time, pauses
* the execution for remaining time.
* @note This function does nothing if the timeline is stopped.
* @see setMinimalFrameTime(), stop()
* @see @ref setMinimalFrameTime(), @ref stop()
*/
void nextFrame();

Loading…
Cancel
Save