From 2619dc33f112232a51e63d2f81584d1664d4890f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 5 Mar 2024 12:44:08 +0100 Subject: [PATCH] doc: drop the redundant Magnum prefix from snippet files. I accidentally did that at first, and then "for consistency" continued with that for a decade. --- doc/debug-tools.dox | 2 +- doc/matrix-vector.dox | 62 +++--- doc/method-chaining.dox | 4 +- doc/namespaces.dox | 2 +- doc/opengl-wrapping.dox | 10 +- doc/platform.dox | 18 +- doc/platforms-html5.dox | 4 +- doc/portability.dox | 12 +- doc/scenegraph.dox | 28 +-- doc/shaders.dox | 28 +-- ...mation-custom.cpp => Animation-custom.cpp} | 0 .../{MagnumAnimation.cpp => Animation.cpp} | 0 ...io-scenegraph.cpp => Audio-scenegraph.cpp} | 0 doc/snippets/{MagnumAudio.cpp => Audio.cpp} | 0 doc/snippets/CMakeLists.txt | 186 +++++++++--------- ...numDebugTools-gl.cpp => DebugTools-gl.cpp} | 0 .../{MagnumDebugTools.cpp => DebugTools.cpp} | 0 ...mGL-application.cpp => GL-application.cpp} | 2 +- doc/snippets/{MagnumGL.cpp => GL.cpp} | 0 ...numMaterialTools.cpp => MaterialTools.cpp} | 0 .../{MagnumMath-cpp14.cpp => Math-cpp14.cpp} | 0 .../{MagnumMath-stl.cpp => Math-stl.cpp} | 0 doc/snippets/{MagnumMath.cpp => Math.cpp} | 0 ...mMathAlgorithms.cpp => MathAlgorithms.cpp} | 0 ...agnumMeshTools-gl.cpp => MeshTools-gl.cpp} | 0 ...numMeshTools-stl.cpp => MeshTools-stl.cpp} | 0 .../{MagnumMeshTools.cpp => MeshTools.cpp} | 0 ...latform-custom.cpp => Platform-custom.cpp} | 0 ...rtability.cpp => Platform-portability.cpp} | 0 ...tom.cpp => Platform-windowless-custom.cpp} | 0 ...ead.cpp => Platform-windowless-thread.cpp} | 0 ...windowless.cpp => Platform-windowless.cpp} | 0 .../{MagnumPlatform.cpp => Platform.cpp} | 0 .../{MagnumPrimitives.cpp => Primitives.cpp} | 0 ...numSceneGraph-gl.cpp => SceneGraph-gl.cpp} | 0 .../{MagnumSceneGraph.cpp => SceneGraph.cpp} | 0 .../{MagnumSceneTools.cpp => SceneTools.cpp} | 0 ...{MagnumShaderTools.cpp => ShaderTools.cpp} | 0 .../{MagnumShaders-gl.cpp => Shaders-gl.cpp} | 0 .../{MagnumText-gl.cpp => Text-gl.cpp} | 0 doc/snippets/{MagnumText.cpp => Text.cpp} | 0 ...agnumTextureTools.cpp => TextureTools.cpp} | 0 doc/snippets/{MagnumTrade.cpp => Trade.cpp} | 0 doc/snippets/{MagnumTrade.glsl => Trade.glsl} | 0 doc/snippets/{MagnumVk.cpp => Vk.cpp} | 0 doc/transformations.dox | 34 ++-- doc/types.dox | 14 +- doc/vulkan-wrapping.dox | 16 +- src/Magnum/Animation/Easing.h | 10 +- src/Magnum/Animation/Interpolation.h | 6 +- src/Magnum/Animation/Player.h | 16 +- src/Magnum/Animation/Track.h | 8 +- src/Magnum/Audio/AbstractImporter.h | 2 +- src/Magnum/Audio/Context.h | 4 +- src/Magnum/Audio/Listener.h | 2 +- src/Magnum/Audio/Playable.h | 2 +- src/Magnum/DebugTools/ColorMap.h | 2 +- src/Magnum/DebugTools/CompareImage.h | 14 +- src/Magnum/DebugTools/ForceRenderer.h | 2 +- src/Magnum/DebugTools/FrameProfiler.h | 10 +- src/Magnum/DebugTools/ObjectRenderer.h | 2 +- src/Magnum/DebugTools/TextureImage.h | 8 +- src/Magnum/GL/AbstractFramebuffer.h | 4 +- src/Magnum/GL/AbstractShaderProgram.h | 30 +-- src/Magnum/GL/Buffer.h | 16 +- src/Magnum/GL/BufferImage.h | 12 +- src/Magnum/GL/BufferTexture.h | 2 +- src/Magnum/GL/Context.h | 14 +- src/Magnum/GL/CubeMapTexture.h | 26 +-- src/Magnum/GL/CubeMapTextureArray.h | 18 +- src/Magnum/GL/DebugOutput.h | 10 +- src/Magnum/GL/DefaultFramebuffer.h | 6 +- src/Magnum/GL/Framebuffer.h | 10 +- src/Magnum/GL/Mesh.h | 30 +-- src/Magnum/GL/MultisampleTexture.h | 2 +- src/Magnum/GL/OpenGLTester.h | 2 +- src/Magnum/GL/PrimitiveQuery.h | 2 +- src/Magnum/GL/RectangleTexture.h | 18 +- src/Magnum/GL/Renderer.h | 4 +- src/Magnum/GL/SampleQuery.h | 4 +- src/Magnum/GL/Texture.h | 20 +- src/Magnum/GL/TextureArray.h | 20 +- src/Magnum/GL/TimeQuery.h | 4 +- src/Magnum/MaterialTools/RemoveDuplicates.h | 2 +- src/Magnum/Math/Algorithms/KahanSum.h | 4 +- src/Magnum/Math/Algorithms/Svd.h | 2 +- src/Magnum/Math/Angle.h | 16 +- src/Magnum/Math/BitVector.h | 6 +- src/Magnum/Math/Color.h | 46 ++--- src/Magnum/Math/CubicHermite.h | 2 +- src/Magnum/Math/Dual.h | 2 +- src/Magnum/Math/Frustum.h | 2 +- src/Magnum/Math/Functions.h | 8 +- src/Magnum/Math/Half.h | 4 +- src/Magnum/Math/Intersection.h | 12 +- src/Magnum/Math/Matrix.h | 2 +- src/Magnum/Math/Matrix3.h | 4 +- src/Magnum/Math/Matrix4.h | 4 +- src/Magnum/Math/Packing.h | 6 +- src/Magnum/Math/Quaternion.h | 4 +- src/Magnum/Math/Range.h | 12 +- src/Magnum/Math/RectangularMatrix.h | 4 +- src/Magnum/Math/StrictWeakOrdering.h | 2 +- src/Magnum/Math/Swizzle.h | 4 +- src/Magnum/Math/Time.h | 20 +- src/Magnum/Math/TypeTraits.h | 2 +- src/Magnum/Math/Vector.h | 8 +- src/Magnum/Math/Vector2.h | 4 +- src/Magnum/Math/Vector3.h | 4 +- src/Magnum/MeshTools/CombineIndexedArrays.h | 2 +- src/Magnum/MeshTools/Compile.h | 4 +- src/Magnum/MeshTools/CompressIndices.h | 8 +- src/Magnum/MeshTools/GenerateNormals.h | 6 +- src/Magnum/MeshTools/Interleave.h | 8 +- src/Magnum/MeshTools/RemoveDuplicates.h | 4 +- src/Magnum/MeshTools/Transform.h | 4 +- src/Magnum/Platform/AbstractXApplication.h | 2 +- src/Magnum/Platform/EmscriptenApplication.h | 2 +- src/Magnum/Platform/GlfwApplication.h | 2 +- src/Magnum/Platform/ScreenedApplication.h | 6 +- src/Magnum/Platform/Sdl2Application.h | 4 +- src/Magnum/Primitives/Gradient.h | 8 +- src/Magnum/Primitives/Line.h | 4 +- src/Magnum/SceneGraph/AbstractFeature.h | 4 +- .../SceneGraph/AbstractGroupedFeature.h | 2 +- src/Magnum/SceneGraph/AbstractObject.h | 4 +- src/Magnum/SceneGraph/Animable.h | 6 +- src/Magnum/SceneGraph/Camera.h | 8 +- src/Magnum/SceneGraph/Drawable.h | 18 +- src/Magnum/SceneGraph/Object.h | 6 +- src/Magnum/SceneGraph/Scene.h | 2 +- src/Magnum/SceneTools/Filter.h | 2 +- src/Magnum/SceneTools/Hierarchy.h | 8 +- src/Magnum/ShaderTools/AbstractConverter.h | 12 +- src/Magnum/Shaders/DistanceFieldVectorGL.h | 6 +- src/Magnum/Shaders/FlatGL.h | 14 +- src/Magnum/Shaders/GenericGL.h | 6 +- src/Magnum/Shaders/LineGL.h | 8 +- src/Magnum/Shaders/MeshVisualizerGL.h | 22 +-- src/Magnum/Shaders/PhongGL.h | 18 +- src/Magnum/Shaders/VectorGL.h | 6 +- src/Magnum/Shaders/VertexColorGL.h | 6 +- src/Magnum/Text/AbstractFont.h | 12 +- src/Magnum/Text/AbstractFontConverter.h | 2 +- src/Magnum/Text/AbstractGlyphCache.h | 14 +- src/Magnum/Text/AbstractShaper.h | 6 +- src/Magnum/Text/DistanceFieldGlyphCache.h | 2 +- src/Magnum/Text/GlyphCache.h | 2 +- src/Magnum/Text/Renderer.h | 8 +- src/Magnum/TextureTools/Atlas.h | 14 +- src/Magnum/Trade/AbstractImageConverter.h | 8 +- src/Magnum/Trade/AbstractImporter.h | 14 +- src/Magnum/Trade/AbstractSceneConverter.h | 12 +- src/Magnum/Trade/AnimationData.h | 4 +- src/Magnum/Trade/ImageData.h | 12 +- src/Magnum/Trade/LightData.h | 6 +- src/Magnum/Trade/MaterialData.h | 26 +-- src/Magnum/Trade/MeshData.h | 34 ++-- src/Magnum/Trade/MeshData2D.h | 2 +- src/Magnum/Trade/MeshData3D.h | 2 +- src/Magnum/Trade/ObjectData2D.h | 2 +- src/Magnum/Trade/ObjectData3D.h | 2 +- src/Magnum/Trade/SceneData.h | 38 ++-- src/Magnum/Vk/Assert.h | 2 +- src/Magnum/Vk/Buffer.h | 8 +- src/Magnum/Vk/CommandBuffer.h | 6 +- src/Magnum/Vk/CommandPool.h | 2 +- src/Magnum/Vk/DescriptorPool.h | 2 +- src/Magnum/Vk/DescriptorSet.h | 8 +- src/Magnum/Vk/DescriptorSetLayout.h | 6 +- src/Magnum/Vk/Device.h | 18 +- src/Magnum/Vk/Fence.h | 2 +- src/Magnum/Vk/Framebuffer.h | 2 +- src/Magnum/Vk/Image.h | 12 +- src/Magnum/Vk/ImageView.h | 2 +- src/Magnum/Vk/Instance.h | 16 +- src/Magnum/Vk/Integration.h | 2 +- src/Magnum/Vk/Memory.h | 4 +- src/Magnum/Vk/Mesh.h | 10 +- src/Magnum/Vk/MeshLayout.h | 2 +- src/Magnum/Vk/Pipeline.h | 6 +- src/Magnum/Vk/PipelineLayout.h | 2 +- src/Magnum/Vk/RenderPass.h | 8 +- src/Magnum/Vk/Sampler.h | 4 +- src/Magnum/Vk/Shader.h | 2 +- src/Magnum/Vk/ShaderSet.h | 6 +- 186 files changed, 763 insertions(+), 763 deletions(-) rename doc/snippets/{MagnumAnimation-custom.cpp => Animation-custom.cpp} (100%) rename doc/snippets/{MagnumAnimation.cpp => Animation.cpp} (100%) rename doc/snippets/{MagnumAudio-scenegraph.cpp => Audio-scenegraph.cpp} (100%) rename doc/snippets/{MagnumAudio.cpp => Audio.cpp} (100%) rename doc/snippets/{MagnumDebugTools-gl.cpp => DebugTools-gl.cpp} (100%) rename doc/snippets/{MagnumDebugTools.cpp => DebugTools.cpp} (100%) rename doc/snippets/{MagnumGL-application.cpp => GL-application.cpp} (98%) rename doc/snippets/{MagnumGL.cpp => GL.cpp} (100%) rename doc/snippets/{MagnumMaterialTools.cpp => MaterialTools.cpp} (100%) rename doc/snippets/{MagnumMath-cpp14.cpp => Math-cpp14.cpp} (100%) rename doc/snippets/{MagnumMath-stl.cpp => Math-stl.cpp} (100%) rename doc/snippets/{MagnumMath.cpp => Math.cpp} (100%) rename doc/snippets/{MagnumMathAlgorithms.cpp => MathAlgorithms.cpp} (100%) rename doc/snippets/{MagnumMeshTools-gl.cpp => MeshTools-gl.cpp} (100%) rename doc/snippets/{MagnumMeshTools-stl.cpp => MeshTools-stl.cpp} (100%) rename doc/snippets/{MagnumMeshTools.cpp => MeshTools.cpp} (100%) rename doc/snippets/{MagnumPlatform-custom.cpp => Platform-custom.cpp} (100%) rename doc/snippets/{MagnumPlatform-portability.cpp => Platform-portability.cpp} (100%) rename doc/snippets/{MagnumPlatform-windowless-custom.cpp => Platform-windowless-custom.cpp} (100%) rename doc/snippets/{MagnumPlatform-windowless-thread.cpp => Platform-windowless-thread.cpp} (100%) rename doc/snippets/{MagnumPlatform-windowless.cpp => Platform-windowless.cpp} (100%) rename doc/snippets/{MagnumPlatform.cpp => Platform.cpp} (100%) rename doc/snippets/{MagnumPrimitives.cpp => Primitives.cpp} (100%) rename doc/snippets/{MagnumSceneGraph-gl.cpp => SceneGraph-gl.cpp} (100%) rename doc/snippets/{MagnumSceneGraph.cpp => SceneGraph.cpp} (100%) rename doc/snippets/{MagnumSceneTools.cpp => SceneTools.cpp} (100%) rename doc/snippets/{MagnumShaderTools.cpp => ShaderTools.cpp} (100%) rename doc/snippets/{MagnumShaders-gl.cpp => Shaders-gl.cpp} (100%) rename doc/snippets/{MagnumText-gl.cpp => Text-gl.cpp} (100%) rename doc/snippets/{MagnumText.cpp => Text.cpp} (100%) rename doc/snippets/{MagnumTextureTools.cpp => TextureTools.cpp} (100%) rename doc/snippets/{MagnumTrade.cpp => Trade.cpp} (100%) rename doc/snippets/{MagnumTrade.glsl => Trade.glsl} (100%) rename doc/snippets/{MagnumVk.cpp => Vk.cpp} (100%) diff --git a/doc/debug-tools.dox b/doc/debug-tools.dox index 1725a1a57..4e38b5ec7 100644 --- a/doc/debug-tools.dox +++ b/doc/debug-tools.dox @@ -59,7 +59,7 @@ given key doesn't exist, default fallback is used. Example usage: visualizing object position, rotation and scaling using @ref DebugTools::ObjectRenderer : -@snippet MagnumDebugTools-gl.cpp debug-tools-renderers +@snippet DebugTools-gl.cpp debug-tools-renderers See @ref DebugTools::ObjectRenderer and @ref DebugTools::ForceRenderer for more information. diff --git a/doc/matrix-vector.dox b/doc/matrix-vector.dox index bf96a2f93..b19b7bfad 100644 --- a/doc/matrix-vector.dox +++ b/doc/matrix-vector.dox @@ -72,30 +72,30 @@ to using the @ref Math::ZeroInit tag. @ref Math::Matrix (and @ref Math::Matrix3, @ref Math::Matrix4) is by default constructed as an identity matrix, equivalent to using the @ref Math::IdentityInit tag. -@snippet MagnumMath.cpp matrix-vector-construct +@snippet Math.cpp matrix-vector-construct The most common and most efficient way to create a vector is to pass all values to the constructor. A matrix is created by passing all *column* vectors to the constructor. The constructors check correct number of passed arguments at compile time. -@snippet MagnumMath.cpp matrix-vector-construct-value +@snippet Math.cpp matrix-vector-construct-value You can specify all components of a vector or a matrix with a single value, or specify just values on the matrix diagonal: -@snippet MagnumMath.cpp matrix-vector-construct-diagonal +@snippet Math.cpp matrix-vector-construct-diagonal There are also shortcuts to create a vector with all but one component set to zero or one which are useful for transformations: -@snippet MagnumMath.cpp matrix-vector-construct-axis +@snippet Math.cpp matrix-vector-construct-axis It is also possible to create matrices and vectors from a C-style array. The function performs a simple type cast without copying anything, so it's possible to conveniently operate on the array itself: -@snippet MagnumMath.cpp matrix-vector-construct-from +@snippet Math.cpp matrix-vector-construct-from @attention Note that, unlike a constructor, this function has no way to check whether the array is long enough to contain all the elements, so use it @@ -106,17 +106,17 @@ richer feature set. Implicit construction of @ref Math::Color4 from just the RGB components will set the alpha to the max value (thus @cpp 1.0f @ce for @ref Color4 and @cpp 255 @ce for @ref Color4ub): -@snippet MagnumMath.cpp matrix-vector-construct-color +@snippet Math.cpp matrix-vector-construct-color Similar to axes and scales in vectors, you can create single color shades too: -@snippet MagnumMath.cpp matrix-vector-construct-color-axis +@snippet Math.cpp matrix-vector-construct-color-axis There are also builtin colorspace conversion functions --- it's possible to create a RGB color from a HSV value, a linear color value from a sRGB representation, or convert from CIE XYZ / xyY. And the other way as well: -@snippet MagnumMath.cpp matrix-vector-construct-color-colorspace +@snippet Math.cpp matrix-vector-construct-color-colorspace Finally, the namespace @ref Math::Literals provides convenient @link Literals::operator""_rgb() operator""_rgb() @endlink / @@ -131,29 +131,29 @@ and don't do any gamma correction. For sRGB input, there is @link Literals::operator""_srgbaf() operator""_srgbaf() @endlink, see their documentation for more information. -@snippet MagnumMath.cpp matrix-vector-construct-color-literal +@snippet Math.cpp matrix-vector-construct-color-literal @section matrix-vector-component-access Accessing matrix and vector components Column vectors of matrices and components of vectors can be accessed using square brackets: -@snippet MagnumMath.cpp matrix-vector-access +@snippet Math.cpp matrix-vector-access Row vectors can be accessed too, but only for reading, and access is slower due to the matrix being stored @ref matrix-vector-column-major "in column-major order": -@snippet MagnumMath.cpp matrix-vector-access-row +@snippet Math.cpp matrix-vector-access-row Fixed-size vector subclasses have functions for accessing named components and subparts using either `xyzw` or `rgba`: -@snippet MagnumMath.cpp matrix-vector-access-named +@snippet Math.cpp matrix-vector-access-named For more involved operations with components there are the @ref Math::gather() and @ref Math::scatter() functions: -@snippet MagnumMath.cpp matrix-vector-access-swizzle +@snippet Math.cpp matrix-vector-access-swizzle @section matrix-vector-conversion Converting between different underlying types @@ -169,12 +169,12 @@ To further emphasise the intent of conversion (so it doesn't look like an accident or a typo), you are encouraged to use @cpp auto b = Type{a} @ce instead of @cpp Type b{a} @ce. -@snippet MagnumMath.cpp matrix-vector-convert +@snippet Math.cpp matrix-vector-convert For packing floats into integers and unpacking them back use the @ref Math::pack() and @ref Math::unpack() functions: -@snippet MagnumMath.cpp matrix-vector-convert-pack +@snippet Math.cpp matrix-vector-convert-pack See below for more information about other available @ref matrix-vector-componentwise "component-wise operations". @@ -185,11 +185,11 @@ Vectors can be added, subtracted, negated and multiplied or divided with scalars, as is common in mathematics. Magnum also adds the ability to divide a scalar with vector: -@snippet MagnumMath.cpp matrix-vector-operations-vector +@snippet Math.cpp matrix-vector-operations-vector As in GLSL, vectors can be also multiplied or divided component-wise: -@snippet MagnumMath.cpp matrix-vector-operations-multiply +@snippet Math.cpp matrix-vector-operations-multiply When working with integral vectors (i.e. 24bit RGB values), it is often desirable to multiply them with floating-point values but retain an integral @@ -197,20 +197,20 @@ result. In Magnum, all multiplication/division operations involving integral vectors will return an integer result, you need to convert both arguments to the same floating-point type to have a floating-point result. -@snippet MagnumMath.cpp matrix-vector-operations-integer +@snippet Math.cpp matrix-vector-operations-integer You can also use all bitwise operations on integral vectors: -@snippet MagnumMath.cpp matrix-vector-operations-bitwise +@snippet Math.cpp matrix-vector-operations-bitwise Matrices can be added, subtracted and multiplied with matrix multiplication. -@snippet MagnumMath.cpp matrix-vector-operations-matrix +@snippet Math.cpp matrix-vector-operations-matrix You can also multiply (properly sized) vectors with matrices. These operations are equivalent to multiplying with single-column matrices: -@snippet MagnumMath.cpp matrix-vector-operations-multiply-matrix +@snippet Math.cpp matrix-vector-operations-multiply-matrix @section matrix-vector-componentwise Component-wise and inter-vector operations @@ -219,24 +219,24 @@ As shown above, vectors can be added and multiplied component-wise using the a vector you can use @ref Math::Vector::sum() "sum()" and @ref Math::Vector::product() "product()" instead: -@snippet MagnumMath.cpp matrix-vector-operations-componentwise +@snippet Math.cpp matrix-vector-operations-componentwise Component-wise minimum and maximum of two vectors can be done using @ref Math::min(), @ref Math::max() or @ref Math::minmax(), similarly with @ref Vector::min() "min()", @ref Vector::max() "max()" and @ref Vector2::minmax() "minmax()" for components in one vector. -@snippet MagnumMath.cpp matrix-vector-operations-minmax +@snippet Math.cpp matrix-vector-operations-minmax The vectors can be also compared component-wise, the result is returned in a @ref Math::BitVector class: -@snippet MagnumMath.cpp matrix-vector-operations-compare +@snippet Math.cpp matrix-vector-operations-compare There are also function for component-wise rounding, sign operations, square root and various interpolation and (de)normalization functionality: -@snippet MagnumMath.cpp matrix-vector-operations-functions +@snippet Math.cpp matrix-vector-operations-functions Component-wise functions are implemented only for vectors and not for matrices to keep the math library in a sane and maintainable size. Instead, you can @@ -244,12 +244,12 @@ reinterpret the matrix as a vector and do the operation on it (and vice versa) --- because you get a reference that way, the operation will affect the original data: -@snippet MagnumMath.cpp matrix-vector-operations-functions-componentwise +@snippet Math.cpp matrix-vector-operations-functions-componentwise Note that all component-wise functions in the @ref Math namespace also work for scalars --- and on the special @ref Deg / @ref Rad types too. -@snippet MagnumMath.cpp matrix-vector-operations-functions-scalar +@snippet Math.cpp matrix-vector-operations-functions-scalar For types with units the only exception are power functions such as @ref Math::pow() or @ref Math::log() --- the resulting unit of such an @@ -262,7 +262,7 @@ product, vector, reflection or angle calculation. These are mostly available as free functions in the @ref Math namespace, with more advanced functionality such as QR or SVD decomposition in @ref Math::Algorithms. -@snippet MagnumMath.cpp matrix-vector-linear-algebra +@snippet Math.cpp matrix-vector-linear-algebra @section matrix-vector-column-major Matrices are column-major and vectors are columns @@ -274,18 +274,18 @@ you're used to from linear algebra or other graphics toolkits: Order of template arguments in specification of @ref Math::RectangularMatrix is also column-major: - @snippet MagnumMath.cpp matrix-vector-column-major-template + @snippet Math.cpp matrix-vector-column-major-template
  • Order of components in matrix constructors is also column-major, further emphasized by the requirement that you must pass column vectors directly: - @snippet MagnumMath.cpp matrix-vector-column-major-construct + @snippet Math.cpp matrix-vector-column-major-construct
  • Element access order is also column-major, thus the bracket operator accesses columns. The returned vector also has its own bracket operator, which then indexes rows. - @snippet MagnumMath.cpp matrix-vector-column-major-access + @snippet Math.cpp matrix-vector-column-major-access
  • Various algorithms which commonly operate on matrix rows (such as @ref Algorithms::gaussJordanInPlace() "Gauss-Jordan elimination") have diff --git a/doc/method-chaining.dox b/doc/method-chaining.dox index f97a9db48..5799e3f5d 100644 --- a/doc/method-chaining.dox +++ b/doc/method-chaining.dox @@ -44,7 +44,7 @@ bound somewhere. Method chaining encourages you to configure whole object in one run, effectively reducing the number of needed bindings. Consider the following example: -@snippet MagnumGL.cpp method-chaining-texture +@snippet GL.cpp method-chaining-texture This code is written that similar configuration steps are grouped together, which might be good when somebody needs to change something for all three @@ -53,7 +53,7 @@ names and after each configuration step the texture must be rebound to another. With method chaining used the code looks much lighter and each object is configured in one run, reducing count of bind calls from 9 to 3. -@snippet MagnumGL.cpp method-chaining-texture-chained +@snippet GL.cpp method-chaining-texture-chained Method chaining is not used on non-configuring functions, such as @ref GL::Framebuffer::clear() or @ref GL::AbstractShaderProgram::draw(), as diff --git a/doc/namespaces.dox b/doc/namespaces.dox index 363a62ea9..f31fd8102 100644 --- a/doc/namespaces.dox +++ b/doc/namespaces.dox @@ -130,7 +130,7 @@ literals defined by other code, but the second namespace level is @cpp inline @ce so to get for example the color literals you can do either of these two: -@snippet MagnumMath.cpp Literals-using +@snippet Math.cpp Literals-using This library is built as part of Magnum by default. To use this library with CMake, find the `Magnum` package and link to the `Magnum::Magnum` target: diff --git a/doc/opengl-wrapping.dox b/doc/opengl-wrapping.dox index d083401e1..7b52d1b4a 100644 --- a/doc/opengl-wrapping.dox +++ b/doc/opengl-wrapping.dox @@ -58,7 +58,7 @@ ID of the underlying without releasing it using @cpp id() @ce). It is also possible to do the opposite --- wrapping an existing OpenGL object ID into a Magnum object instance using @cpp wrap() @ce: -@snippet MagnumGL.cpp opengl-wrapping-transfer +@snippet GL.cpp opengl-wrapping-transfer The @cpp wrap() @ce and @cpp release() @ce functions are available for all OpenGL classes except for @ref GL::AbstractShaderProgram, where the desired @@ -89,7 +89,7 @@ circumvented by constructing the OpenGL objects using the @ref NoCreate tag first and populating them with live instances once the context is ready. For example: -@snippet MagnumGL-application.cpp opengl-wrapping-nocreate +@snippet GL-application.cpp opengl-wrapping-nocreate Please note that objects constructed using the @ref NoCreate tag are equivalent to the moved-from state, and thus again calling anything on these may result in @@ -112,7 +112,7 @@ tracks OpenGL state such as currently bound objects, activated renderer features etc. When combining Magnum with third-party code, the internal state tracker may get confused and you need to reset it using @ref GL::Context::resetState(): -@snippet MagnumGL.cpp opengl-wrapping-state +@snippet GL.cpp opengl-wrapping-state Note that by design it's not possible to reset all state touched by Magnum to previous values --- it would involve impractically large amount of queries and @@ -138,7 +138,7 @@ GL version/extension is required. The information is also aggregated on @ref opengl-required-extensions documentation page. Use @ref GL::Context::isVersionSupported() or @ref GL::Context::isExtensionSupported(): -@snippet MagnumGL.cpp opengl-wrapping-extensions +@snippet GL.cpp opengl-wrapping-extensions @attention Using API that requires OpenGL version or extension that is not provided by the driver results in undefined behavior --- the best you can @@ -160,7 +160,7 @@ is simply no-op when required extensions are not available, etc. The goal is to abstract away the (mostly unimportant) differences for easier porting. -@snippet MagnumGL.cpp opengl-wrapping-dsa +@snippet GL.cpp opengl-wrapping-dsa */ } diff --git a/doc/platform.dox b/doc/platform.dox index 27636dd1a..08fe06ebd 100644 --- a/doc/platform.dox +++ b/doc/platform.dox @@ -64,7 +64,7 @@ blue color is shown in the following code listing. `base` branch of [Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository. -@snippet MagnumPlatform.cpp windowed +@snippet Platform.cpp windowed @subsection platform-windowed-viewport Responding to viewport size changes @@ -74,7 +74,7 @@ example by resizing the default framebuffer, you need to reimplement @ref Platform::Sdl2Application::viewportEvent() "viewportEvent()" function and pass the new size to the framebuffer: -@snippet MagnumPlatform.cpp size +@snippet Platform.cpp size @section platform-windowless Windowless applications @@ -109,7 +109,7 @@ renderer string and exits is in the following code listing. is available in `windowless` branch of [Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository. -@snippet MagnumPlatform-windowless.cpp windowless +@snippet Platform-windowless.cpp windowless @section platform-compilation Compilation with CMake @@ -141,7 +141,7 @@ window size 800x600 pixels). If you want something else, you can pass application constructor. Using method chaining it can be done conveniently like this: -@snippet MagnumPlatform.cpp configuration +@snippet Platform.cpp configuration @subsection platform-configuration-delayed Delayed context creation @@ -151,7 +151,7 @@ initializer. You can specify @ref NoCreate in the constructor instead and pass the @relativeref{Platform::Sdl2Application,Configuration} later to a @relativeref{Platform::Sdl2Application,create()} function: -@snippet MagnumPlatform.cpp createcontext +@snippet Platform.cpp createcontext If context creation in the constructor or in @relativeref{Platform::Sdl2Application,create()} fails, the application prints @@ -163,7 +163,7 @@ you abort the launch or retry with different configuration. You can for example try enabling MSAA first, and if the context creation fails, fall back to no-AA rendering: -@snippet MagnumPlatform.cpp trycreatecontext +@snippet Platform.cpp trycreatecontext @@ -206,7 +206,7 @@ following code listing. @note There's also an example showing @ref examples-triangle-plain-glfw "usage of plain GLFW to render a basic triangle". -@snippet MagnumPlatform-custom.cpp custom +@snippet Platform-custom.cpp custom @attention The @ref Platform::GLContext instance is bound to a single OpenGL context, which must be always set as current when calling any Magnum APIs @@ -260,7 +260,7 @@ windowless application header is included. contexts, but make sure that Magnum is used only with its own OpenGL context. -@snippet MagnumPlatform-windowless-custom.cpp custom +@snippet Platform-windowless-custom.cpp custom The main purpose of windowless contexts is threaded OpenGL, used for example for background data processing. The workflow is to create the windowless @@ -273,6 +273,6 @@ information. @note Context creation is not thread safe on all platforms, that's why it still has to be done on the main thread. -@snippet MagnumPlatform-windowless-thread.cpp thread +@snippet Platform-windowless-thread.cpp thread */ } diff --git a/doc/platforms-html5.dox b/doc/platforms-html5.dox index ae39abf2d..5ca7788eb 100644 --- a/doc/platforms-html5.dox +++ b/doc/platforms-html5.dox @@ -551,12 +551,12 @@ requirement for unique buffer target binding, aligned buffer offset and stride and some other restrictions. The most prominent difference is that while the following was enough on desktop: -@snippet MagnumGL.cpp Buffer-webgl-nope +@snippet GL.cpp Buffer-webgl-nope On WebGL (even 2.0) you always have to initialize the buffers like this (and other target hints for UBOs etc.): -@snippet MagnumGL.cpp Buffer-webgl +@snippet GL.cpp Buffer-webgl See @ref GL-Buffer-webgl-restrictions "GL::Buffer", @ref GL-Mesh-webgl-restrictions "GL::Mesh", diff --git a/doc/portability.dox b/doc/portability.dox index eab5bb8ee..dc06a1ae1 100644 --- a/doc/portability.dox +++ b/doc/portability.dox @@ -48,7 +48,7 @@ If you include @ref Magnum.h, you get these predefined macros: Example usage: -@snippet MagnumGL.cpp portability-targets +@snippet GL.cpp portability-targets Each feature is marked accordingly if it is not available in some targets. See also @ref requires-gl, @ref requires-gles30, @ref requires-gles-only, @@ -79,7 +79,7 @@ thus the decision cannot be made at compile time. Header @ref GL/Extensions.h contains list of extensions, which you can pass to @ref GL::Context::isExtensionSupported() and decide based on that: -@snippet MagnumGL.cpp portability-extensions +@snippet GL.cpp portability-extensions You can also decide on particular OpenGL version using @ref GL::Context::isVersionSupported(), but remember that some features from @@ -91,7 +91,7 @@ extensions, you can use macros @ref MAGNUM_ASSERT_GL_EXTENSION_SUPPORTED() or @ref MAGNUM_ASSERT_GL_VERSION_SUPPORTED() to add mandatory requirement of given extension or version: -@snippet MagnumGL.cpp portability-extension-assert +@snippet GL.cpp portability-extension-assert Each class, function or enum value is marked accordingly if it needs specific extension or specific OpenGL version. Various classes in Magnum are taking @@ -115,7 +115,7 @@ you can decide on the syntax in your shader code. You can also use version from a list:

    -@snippet MagnumGL.cpp portability-shaders +@snippet GL.cpp portability-shaders

    @code{.vert} @@ -141,7 +141,7 @@ be available in given GLSL version (e.g. causing compilation errors). You can use @ref GL::Context::isExtensionSupported(Version) const to check that the extension is present in given version: -@snippet MagnumGL.cpp portability-shaders-bind +@snippet GL.cpp portability-shaders-bind See also @ref GL::AbstractShaderProgram class documentation for information about specifying attribute location, uniform location and texture binding unit @@ -173,7 +173,7 @@ and desktop (using SDL2 toolkit). Thanks to static polymorphism most of the functions will work on both without changes, the main difference might (or might not, depending what you use) be in particular event handlers: -@snippet MagnumPlatform-portability.cpp application +@snippet Platform-portability.cpp application And corresponding CMake code. Note that we need to call @cmake find_package() @ce twice, first to get the @ref MAGNUM_TARGET_GLES variable and then again to find diff --git a/doc/scenegraph.dox b/doc/scenegraph.dox index 0ad17f1dc..dde987b16 100644 --- a/doc/scenegraph.dox +++ b/doc/scenegraph.dox @@ -155,7 +155,7 @@ Common usage of transformation classes is to typedef @ref SceneGraph::Scene and @ref SceneGraph::Object with desired transformation type to save unnecessary typing later: -@snippet MagnumSceneGraph.cpp typedef +@snippet SceneGraph.cpp typedef @attention Note that you have to include both @ref Magnum/SceneGraph/Object.h and desired transformation class (e.g. @ref Magnum/SceneGraph/MatrixTransformation3D.h) @@ -166,7 +166,7 @@ The object type is subclassed from the transformation type and so the and @ref SceneGraph::MatrixTransformation3D. For convenience you can use method chaining: -@snippet MagnumSceneGraph.cpp method-chaining +@snippet SceneGraph.cpp method-chaining @section scenegraph-hierarchy Scene hierarchy @@ -182,7 +182,7 @@ The scene is always a root object, so it naturally cannot have any parent or transformation. Parent and children relationships can be observed through @ref SceneGraph::Object::parent() and @ref SceneGraph::Object::children(). -@snippet MagnumSceneGraph.cpp hierarchy +@snippet SceneGraph.cpp hierarchy This hierarchy also takes care of memory management --- when an object is destroyed, all its children are destroyed too. See detailed explanation of @@ -191,7 +191,7 @@ below for information about possible issues. To reflect the implicit memory management in the code better, you can use @ref SceneGraph::Object::addChild() instead of the naked @cpp new @ce call from the code above: -@snippet MagnumSceneGraph.cpp hierarchy-addChild +@snippet SceneGraph.cpp hierarchy-addChild @section scenegraph-features Object features @@ -221,7 +221,7 @@ a feature to an object might look just like the following, as in some cases you don't even need to keep the pointer to it. List of object features is accessible through @ref SceneGraph::Object::features(). -@snippet MagnumSceneGraph.cpp feature +@snippet SceneGraph.cpp feature Some features are passive, others active. Passive features can just be added to an object, with no additional work except for possible configuration (for @@ -233,7 +233,7 @@ want and implement functions you need in your own @ref SceneGraph::Object subclass without having to subclass each feature individually (and making the code overly verbose). A simplified example: -@snippet MagnumSceneGraph.cpp feature-inherit +@snippet SceneGraph.cpp feature-inherit From the outside there is no difference between features added "at runtime" and features added using multiple inheritance, they can be both accessed from the @@ -246,7 +246,7 @@ for information about possible issues. Also, there is the @ref SceneGraph::AbstractObject::addFeature() "addFeature()" counterpart to @ref SceneGraph::Object::addChild() "addChild()": -@snippet MagnumSceneGraph.cpp feature-addFeature +@snippet SceneGraph.cpp feature-addFeature @subsection scenegraph-features-caching Transformation caching in features @@ -275,7 +275,7 @@ to have caching, you must enable it first, because by default caching is disabled. You can enable it using @ref SceneGraph::AbstractFeature::setCachedTransformations() and then implement the corresponding cleaning function(s): -@snippet MagnumSceneGraph.cpp caching +@snippet SceneGraph.cpp caching When you need to use the cached value, you can explicitly request the cleanup by calling @ref SceneGraph::Object::setClean(). @ref SceneGraph::Camera, for @@ -319,7 +319,7 @@ In the following example we are able to get pointer to both the @ref SceneGraph::AbstractObject and the needed transformation from a single constructor parameter using a trick: -@snippet MagnumSceneGraph.cpp transformation +@snippet SceneGraph.cpp transformation If we take for example @ref SceneGraph::Object "SceneGraph::Object", it is derived from @ref SceneGraph::AbstractObject "SceneGraph::AbstractObject3D" @@ -341,13 +341,13 @@ parent is destroyed. When creating them on the stack, however, they will be destroyed when they go out of scope. Normally, the natural order of creation is not a problem: -@snippet MagnumSceneGraph.cpp construction-order +@snippet SceneGraph.cpp construction-order The `object` is created last, so it will be destroyed first, removing itself from `scene`'s children list, causing no problems when destroying the `scene` object later. However, if their order is swapped, it will cause problems: -@snippet MagnumSceneGraph.cpp construction-order-crash +@snippet SceneGraph.cpp construction-order-crash The `scene` will be destroyed first, deleting all its children, which is wrong, because `object` is created on stack. If this doesn't already crash, the @@ -359,7 +359,7 @@ When destroying the object, all its features are destroyed. For features added as a member it's not an issue, however features added using multiple inheritance must be inherited after the Object class: -@snippet MagnumSceneGraph.cpp feature-construction-order +@snippet SceneGraph.cpp feature-construction-order When constructing `MyObject`, `Object3D` constructor is called first and then `MyFeature` constructor adds itself to `Object3D`'s list of features. When @@ -369,7 +369,7 @@ from `Object3D`'s list, then `Object3D` destructor. However, if we would inherit `MyFeature` first, it will cause problems: -@snippet MagnumSceneGraph.cpp feature-construction-order-crash +@snippet SceneGraph.cpp feature-construction-order-crash `MyFeature` tries to add itself to feature list in not-yet-constructed `Object3D`, causing undefined behavior. Then, if this doesn't already crash, @@ -379,7 +379,7 @@ invisible. If we would construct them in swapped order (if it is even possible), it wouldn't help either: -@snippet MagnumSceneGraph.cpp feature-construction-order-crash-destruction +@snippet SceneGraph.cpp feature-construction-order-crash-destruction On destruction, `Object3D` destructor is called first, deleting `MyFeature`, which is wrong, because `MyFeature` is in the same object. After that (if the diff --git a/doc/shaders.dox b/doc/shaders.dox index 3d1d78a30..405072607 100644 --- a/doc/shaders.dox +++ b/doc/shaders.dox @@ -65,7 +65,7 @@ position in the buffer. See @ref GL::Mesh::addVertexBuffer() for details and usage examples. Example mesh configuration for the @ref Shaders::PhongGL shader: -@snippet MagnumShaders-gl.cpp shaders-setup +@snippet Shaders-gl.cpp shaders-setup Each shader then has its own set of configuration functions. Some configuration is static, specified commonly as flags in constructor, directly affecting @@ -87,7 +87,7 @@ Example configuration and rendering using @link Shaders::PhongGL @endlink --- by default it's just colored and uses a single light, and we set a color of both in addition to transformation, projection and normal matrices: -@snippet MagnumShaders-gl.cpp shaders-classic +@snippet Shaders-gl.cpp shaders-classic @subsection shaders-usage-ubo Using uniform buffers @@ -117,7 +117,7 @@ then via @ref Shaders::PhongDrawUniform, @ref Shaders::PhongMaterialUniform and fields directly, the data layout may be non-trivial and it's thus recommended to use the setters unless they prove to be a performance bottleneck: -@snippet MagnumShaders-gl.cpp shaders-ubo +@snippet Shaders-gl.cpp shaders-ubo Altogether, this results in the same output as in the classic uniform case shown above. Similarly to the classic uniforms, default-constructed structures @@ -169,7 +169,7 @@ The following snippet shows drawing three different meshes, where two of them share the same material definition. The projection and light buffer is the same as above: -@snippet MagnumShaders-gl.cpp shaders-multi +@snippet Shaders-gl.cpp shaders-multi While this minimizes the state changes to just a single immediate uniform being changed between draws, it's possible to go even further by using @@ -185,7 +185,7 @@ which will make it use the @glsl gl_DrawID @ce builtin to pick the per-draw parameters on its own. The above snippet modified for multidraw would then look like this, uniform upload and binding is the same as before: -@snippet MagnumShaders-gl.cpp shaders-multidraw +@snippet Shaders-gl.cpp shaders-multidraw @@ -233,7 +233,7 @@ it's just the same sphere drawn three times in different locations and with a different material applied. Note that the per-instance color is achieved by using the usual vertex color attribute, only instanced: -@snippet MagnumShaders-gl.cpp shaders-instancing +@snippet Shaders-gl.cpp shaders-instancing @subsection shaders-usage-skinning Skinning @@ -246,7 +246,7 @@ hierarchy and associated animations. The following snippet shows compiling a set up shader parameters and finally uploading calculated joint matrices to perform the skinning animation: -@snippet MagnumShaders-gl.cpp shaders-skinning +@snippet Shaders-gl.cpp shaders-skinning The above hardcodes the joint counts in the shader, which makes it the most optimal for rendering given mesh. However, with multiple skinned meshes it'd @@ -257,7 +257,7 @@ for a particular draw upload just a subset of joint matrices the mesh would reference and set the count of actually used per-vertex joints via @ref Shaders::PhongGL::setPerVertexJointCount(). Thus, compared to above: -@snippet MagnumShaders-gl.cpp shaders-skinning-dynamic +@snippet Shaders-gl.cpp shaders-skinning-dynamic @subsection shaders-usage-textures Using textures @@ -268,7 +268,7 @@ shaders are just colored. Enabling a texture is done via a flag (such as an appropriate `bind*Texture()` call. In most cases the texture value is multiplied with the corresponding color uniform. -@snippet MagnumShaders-gl.cpp shaders-textures +@snippet Shaders-gl.cpp shaders-textures All shaders that support textures are also able to apply arbitrary transformation to the texture coordinate attribute by enabling @@ -312,7 +312,7 @@ and light buffers are the same as before, there's a new per-draw @ref Shaders::TextureTransformationUniform buffer supplying the layer information: -@snippet MagnumShaders-gl.cpp shaders-texture-arrays +@snippet Shaders-gl.cpp shaders-texture-arrays While the primary use case of texture arrays is with uniform buffers and multidraw, they work in the classic uniform workflow as well --- use @@ -336,7 +336,7 @@ forming temporary @ref Shaders::FlatGL::CompileState "Shaders::*GL::CompileState instances, then possibly doing other work until it's completed, and finally constructing final shader instances out of the temporary state: -@snippet MagnumShaders-gl.cpp shaders-async +@snippet Shaders-gl.cpp shaders-async The above code will work correctly also on drivers that implement async compilation partially or not at all --- there @@ -355,7 +355,7 @@ Definition of all generic attributes is available in the @ref Shaders::GenericGL class. Setup of the mesh @ref shaders-usage "shown above" using generic attributes could then look like this: -@snippet MagnumShaders-gl.cpp shaders-generic +@snippet Shaders-gl.cpp shaders-generic Note that in this particular case both setups are equivalent, because @ref Shaders::PhongGL attribute definitions are just aliases to the generic @@ -364,7 +364,7 @@ above, or use for example @ref Shaders::FlatGL3D or even @ref Shaders::MeshVisualizerGL3D with the same mesh reconfiguration. The unused attributes will be simply ignored. -@snippet MagnumShaders-gl.cpp shaders-meshvisualizer +@snippet Shaders-gl.cpp shaders-meshvisualizer The @ref MeshTools::compile() utility configures meshes using generic vertex attribute definitions to make them usable with any builtin shader. @@ -376,6 +376,6 @@ offer an object ID output as well. A setup equivalent to what's done in Flat shader's @ref Shaders-FlatGL-object-id but using the generic definitions would look like this: -@snippet MagnumShaders-gl.cpp shaders-generic-object-id +@snippet Shaders-gl.cpp shaders-generic-object-id */ } diff --git a/doc/snippets/MagnumAnimation-custom.cpp b/doc/snippets/Animation-custom.cpp similarity index 100% rename from doc/snippets/MagnumAnimation-custom.cpp rename to doc/snippets/Animation-custom.cpp diff --git a/doc/snippets/MagnumAnimation.cpp b/doc/snippets/Animation.cpp similarity index 100% rename from doc/snippets/MagnumAnimation.cpp rename to doc/snippets/Animation.cpp diff --git a/doc/snippets/MagnumAudio-scenegraph.cpp b/doc/snippets/Audio-scenegraph.cpp similarity index 100% rename from doc/snippets/MagnumAudio-scenegraph.cpp rename to doc/snippets/Audio-scenegraph.cpp diff --git a/doc/snippets/MagnumAudio.cpp b/doc/snippets/Audio.cpp similarity index 100% rename from doc/snippets/MagnumAudio.cpp rename to doc/snippets/Audio.cpp diff --git a/doc/snippets/CMakeLists.txt b/doc/snippets/CMakeLists.txt index fa777cd8c..34041fc3e 100644 --- a/doc/snippets/CMakeLists.txt +++ b/doc/snippets/CMakeLists.txt @@ -38,11 +38,11 @@ set_directory_properties(PROPERTIES set(snippets_Magnum_SRCS Magnum.cpp - MagnumAnimation.cpp - MagnumAnimation-custom.cpp - MagnumMath.cpp - MagnumMath-stl.cpp - MagnumMathAlgorithms.cpp) + Animation.cpp + Animation-custom.cpp + Math.cpp + Math-stl.cpp + MathAlgorithms.cpp) if(CORRADE_TARGET_EMSCRIPTEN) list(APPEND snippets_Magnum_SRCS platforms-html5.cpp) endif() @@ -61,7 +61,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERS (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.9") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0") OR (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")) - add_library(snippets-Magnum-cpp14 STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumMath-cpp14.cpp) + add_library(snippets-Magnum-cpp14 STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Math-cpp14.cpp) target_link_libraries(snippets-Magnum-cpp14 PRIVATE Magnum) set_target_properties(snippets-Magnum-cpp14 PROPERTIES CORRADE_CXX_STANDARD 14) if(CORRADE_TESTSUITE_TEST_TARGET) @@ -70,102 +70,102 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERS endif() if(MAGNUM_WITH_AUDIO) - add_library(snippets-MagnumAudio STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumAudio.cpp) - target_link_libraries(snippets-MagnumAudio PRIVATE MagnumAudio) + add_library(snippets-Audio STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Audio.cpp) + target_link_libraries(snippets-Audio PRIVATE MagnumAudio) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumAudio) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Audio) endif() if(MAGNUM_WITH_SCENEGRAPH) - add_library(snippets-MagnumAudio-scenegraph STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumAudio-scenegraph.cpp) - target_link_libraries(snippets-MagnumAudio-scenegraph PRIVATE + add_library(snippets-Audio-scenegraph STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + Audio-scenegraph.cpp) + target_link_libraries(snippets-Audio-scenegraph PRIVATE MagnumAudio MagnumSceneGraph) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumAudio-scenegraph) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Audio-scenegraph) endif() endif() endif() if(MAGNUM_WITH_GL) - add_library(snippets-MagnumGL STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumGL.cpp - MagnumMeshTools-gl.cpp - MagnumShaders-gl.cpp - MagnumText-gl.cpp) - target_link_libraries(snippets-MagnumGL PRIVATE MagnumGL) + add_library(snippets-GL STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + GL.cpp + MeshTools-gl.cpp + Shaders-gl.cpp + Text-gl.cpp) + target_link_libraries(snippets-GL PRIVATE MagnumGL) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumGL) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-GL) endif() endif() if(MAGNUM_WITH_MATERIALTOOLS) - add_library(snippets-MagnumMaterialTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumMaterialTools.cpp) - target_link_libraries(snippets-MagnumMaterialTools PRIVATE MagnumMaterialTools) + add_library(snippets-MaterialTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + MaterialTools.cpp) + target_link_libraries(snippets-MaterialTools PRIVATE MagnumMaterialTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumMaterialTools) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MaterialTools) endif() endif() if(MAGNUM_WITH_MESHTOOLS) - add_library(snippets-MagnumMeshTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumMeshTools.cpp) - target_link_libraries(snippets-MagnumMeshTools PRIVATE MagnumMeshTools) + add_library(snippets-MeshTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + MeshTools.cpp) + target_link_libraries(snippets-MeshTools PRIVATE MagnumMeshTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumMeshTools) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MeshTools) endif() endif() if(MAGNUM_WITH_SHADERTOOLS) - add_library(snippets-MagnumShaderTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumShaderTools.cpp) - target_link_libraries(snippets-MagnumShaderTools PRIVATE MagnumShaderTools) + add_library(snippets-ShaderTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + ShaderTools.cpp) + target_link_libraries(snippets-ShaderTools PRIVATE MagnumShaderTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumShaderTools) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-ShaderTools) endif() endif() if(MAGNUM_WITH_TEXT) - add_library(snippets-MagnumText STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumText.cpp) - target_link_libraries(snippets-MagnumText PRIVATE MagnumText) + add_library(snippets-Text STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + Text.cpp) + target_link_libraries(snippets-Text PRIVATE MagnumText) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumText) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Text) endif() endif() if(MAGNUM_WITH_TEXTURETOOLS) - add_library(snippets-MagnumTextureTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumTextureTools.cpp) - target_link_libraries(snippets-MagnumTextureTools PRIVATE MagnumTextureTools) + add_library(snippets-TextureTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + TextureTools.cpp) + target_link_libraries(snippets-TextureTools PRIVATE MagnumTextureTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumTextureTools) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-TextureTools) endif() endif() if(MAGNUM_WITH_TRADE) - add_library(snippets-MagnumTrade STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + add_library(snippets-Trade STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} plugins.cpp - MagnumTrade.cpp) - target_link_libraries(snippets-MagnumTrade PRIVATE MagnumTrade) + Trade.cpp) + target_link_libraries(snippets-Trade PRIVATE MagnumTrade) if(MAGNUM_TARGET_GL) - target_link_libraries(snippets-MagnumTrade PRIVATE MagnumGL) + target_link_libraries(snippets-Trade PRIVATE MagnumGL) endif() if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumTrade) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Trade) endif() endif() find_package(Corrade COMPONENTS TestSuite) if(MAGNUM_WITH_DEBUGTOOLS) - add_library(snippets-MagnumDebugTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumDebugTools.cpp) - target_link_libraries(snippets-MagnumDebugTools PRIVATE MagnumDebugTools) + add_library(snippets-DebugTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + DebugTools.cpp) + target_link_libraries(snippets-DebugTools PRIVATE MagnumDebugTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumDebugTools) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-DebugTools) endif() if(MAGNUM_BUILD_GL_TESTS AND NOT MAGNUM_TARGET_GLES) @@ -200,36 +200,36 @@ if(MAGNUM_WITH_DEBUGTOOLS) endif() if(MAGNUM_TARGET_GL) - add_library(snippets-MagnumDebugTools-gl STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumDebugTools-gl.cpp) - target_link_libraries(snippets-MagnumDebugTools-gl PRIVATE MagnumDebugTools) + add_library(snippets-DebugTools-gl STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + DebugTools-gl.cpp) + target_link_libraries(snippets-DebugTools-gl PRIVATE MagnumDebugTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumDebugTools-gl) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-DebugTools-gl) endif() endif() endif() if(MAGNUM_WITH_PRIMITIVES) - add_library(snippets-MagnumPrimitives STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumPrimitives.cpp) - target_link_libraries(snippets-MagnumPrimitives PRIVATE MagnumPrimitives) + add_library(snippets-Primitives STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + Primitives.cpp) + target_link_libraries(snippets-Primitives PRIVATE MagnumPrimitives) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumPrimitives) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Primitives) endif() endif() if(MAGNUM_WITH_SCENEGRAPH) - add_library(snippets-MagnumSceneGraph STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumSceneGraph.cpp) - target_link_libraries(snippets-MagnumSceneGraph PRIVATE MagnumSceneGraph) + add_library(snippets-SceneGraph STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + SceneGraph.cpp) + target_link_libraries(snippets-SceneGraph PRIVATE MagnumSceneGraph) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumSceneGraph) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-SceneGraph) endif() if(MAGNUM_WITH_SDL2APPLICATION AND MAGNUM_WITH_GL AND MAGNUM_WITH_PRIMITIVES AND MAGNUM_WITH_SHADERS AND MAGNUM_WITH_MESHTOOLS) - add_library(snippets-MagnumSceneGraph-gl STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumSceneGraph-gl.cpp) - target_link_libraries(snippets-MagnumSceneGraph-gl PRIVATE + add_library(snippets-SceneGraph-gl STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + SceneGraph-gl.cpp) + target_link_libraries(snippets-SceneGraph-gl PRIVATE MagnumGL MagnumMeshTools MagnumPrimitives @@ -237,25 +237,25 @@ if(MAGNUM_WITH_SCENEGRAPH) MagnumSdl2Application MagnumShaders) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumSceneGraph-gl) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-SceneGraph-gl) endif() endif() endif() if(MAGNUM_WITH_SCENETOOLS) - add_library(snippets-MagnumSceneTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} - MagnumSceneTools.cpp) - target_link_libraries(snippets-MagnumSceneTools PRIVATE MagnumSceneTools) + add_library(snippets-SceneTools STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + SceneTools.cpp) + target_link_libraries(snippets-SceneTools PRIVATE MagnumSceneTools) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumSceneTools) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-SceneTools) endif() endif() if(MAGNUM_WITH_VK) - add_library(snippets-MagnumVk STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumVk.cpp) - target_link_libraries(snippets-MagnumVk PRIVATE MagnumVk) + add_library(snippets-Vk STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Vk.cpp) + target_link_libraries(snippets-Vk PRIVATE MagnumVk) if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumVk) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Vk) endif() endif() @@ -265,48 +265,48 @@ if(MAGNUM_WITH_SDL2APPLICATION AND MAGNUM_TARGET_GL) target_link_libraries(getting-started PRIVATE MagnumSdl2Application) target_link_libraries(getting-started-blue PRIVATE MagnumSdl2Application) - add_library(snippets-MagnumPlatform STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} + add_library(snippets-Platform STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Magnum-application.cpp - MagnumPlatform.cpp - MagnumGL-application.cpp) - target_link_libraries(snippets-MagnumPlatform PRIVATE MagnumSdl2Application) + Platform.cpp + GL-application.cpp) + target_link_libraries(snippets-Platform PRIVATE MagnumSdl2Application) if(CORRADE_TESTSUITE_TEST_TARGET) add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} getting-started getting-started-blue - snippets-MagnumPlatform) + snippets-Platform) endif() endif() if((NOT MAGNUM_TARGET_GLES AND MAGNUM_WITH_SDL2APPLICATION) OR (MAGNUM_TARGET_GLES AND MAGNUM_WITH_XEGLAPPLICATION)) - add_library(snippets-MagnumPlatform-portability STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumPlatform-portability.cpp) + add_library(snippets-Platform-portability STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Platform-portability.cpp) if(MAGNUM_TARGET_GLES) - target_link_libraries(snippets-MagnumPlatform-portability PRIVATE MagnumXEglApplication) + target_link_libraries(snippets-Platform-portability PRIVATE MagnumXEglApplication) else() - target_link_libraries(snippets-MagnumPlatform-portability PRIVATE MagnumSdl2Application) + target_link_libraries(snippets-Platform-portability PRIVATE MagnumSdl2Application) endif() if(CORRADE_TESTSUITE_TEST_TARGET) - add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-MagnumPlatform-portability) + add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} snippets-Platform-portability) endif() endif() if(MAGNUM_WITH_WINDOWLESSEGLAPPLICATION) - add_library(snippets-MagnumPlatform-custom STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumPlatform-custom.cpp) - add_library(snippets-MagnumPlatform-windowless STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumPlatform-windowless.cpp) - add_library(snippets-MagnumPlatform-windowless-custom STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumPlatform-windowless-custom.cpp) - add_library(snippets-MagnumPlatform-windowless-thread STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} MagnumPlatform-windowless-thread.cpp) + add_library(snippets-Platform-custom STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Platform-custom.cpp) + add_library(snippets-Platform-windowless STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Platform-windowless.cpp) + add_library(snippets-Platform-windowless-custom STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Platform-windowless-custom.cpp) + add_library(snippets-Platform-windowless-thread STATIC ${EXCLUDE_FROM_ALL_IF_TEST_TARGET} Platform-windowless-thread.cpp) - target_link_libraries(snippets-MagnumPlatform-custom PRIVATE MagnumWindowlessEglApplication) - target_link_libraries(snippets-MagnumPlatform-windowless PRIVATE MagnumWindowlessEglApplication) - target_link_libraries(snippets-MagnumPlatform-windowless-custom PRIVATE MagnumWindowlessEglApplication) - target_link_libraries(snippets-MagnumPlatform-windowless-thread PRIVATE MagnumWindowlessEglApplication) + target_link_libraries(snippets-Platform-custom PRIVATE MagnumWindowlessEglApplication) + target_link_libraries(snippets-Platform-windowless PRIVATE MagnumWindowlessEglApplication) + target_link_libraries(snippets-Platform-windowless-custom PRIVATE MagnumWindowlessEglApplication) + target_link_libraries(snippets-Platform-windowless-thread PRIVATE MagnumWindowlessEglApplication) if(CORRADE_TESTSUITE_TEST_TARGET) add_dependencies(${CORRADE_TESTSUITE_TEST_TARGET} - snippets-MagnumPlatform-custom - snippets-MagnumPlatform-windowless - snippets-MagnumPlatform-windowless-custom - snippets-MagnumPlatform-windowless-thread) + snippets-Platform-custom + snippets-Platform-windowless + snippets-Platform-windowless-custom + snippets-Platform-windowless-thread) endif() endif() diff --git a/doc/snippets/MagnumDebugTools-gl.cpp b/doc/snippets/DebugTools-gl.cpp similarity index 100% rename from doc/snippets/MagnumDebugTools-gl.cpp rename to doc/snippets/DebugTools-gl.cpp diff --git a/doc/snippets/MagnumDebugTools.cpp b/doc/snippets/DebugTools.cpp similarity index 100% rename from doc/snippets/MagnumDebugTools.cpp rename to doc/snippets/DebugTools.cpp diff --git a/doc/snippets/MagnumGL-application.cpp b/doc/snippets/GL-application.cpp similarity index 98% rename from doc/snippets/MagnumGL-application.cpp rename to doc/snippets/GL-application.cpp index 03e87458c..f821f282a 100644 --- a/doc/snippets/MagnumGL-application.cpp +++ b/doc/snippets/GL-application.cpp @@ -36,7 +36,7 @@ using namespace Magnum; #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__ /* Namespace used to avoid a conflict with MyApplication defined in - MagnumPlatform.cpp where it *has to* be in the root namespace */ + Platform.cpp where it *has to* be in the root namespace */ namespace C { /* [opengl-wrapping-nocreate] */ class MyApplication: public Platform::Application { diff --git a/doc/snippets/MagnumGL.cpp b/doc/snippets/GL.cpp similarity index 100% rename from doc/snippets/MagnumGL.cpp rename to doc/snippets/GL.cpp diff --git a/doc/snippets/MagnumMaterialTools.cpp b/doc/snippets/MaterialTools.cpp similarity index 100% rename from doc/snippets/MagnumMaterialTools.cpp rename to doc/snippets/MaterialTools.cpp diff --git a/doc/snippets/MagnumMath-cpp14.cpp b/doc/snippets/Math-cpp14.cpp similarity index 100% rename from doc/snippets/MagnumMath-cpp14.cpp rename to doc/snippets/Math-cpp14.cpp diff --git a/doc/snippets/MagnumMath-stl.cpp b/doc/snippets/Math-stl.cpp similarity index 100% rename from doc/snippets/MagnumMath-stl.cpp rename to doc/snippets/Math-stl.cpp diff --git a/doc/snippets/MagnumMath.cpp b/doc/snippets/Math.cpp similarity index 100% rename from doc/snippets/MagnumMath.cpp rename to doc/snippets/Math.cpp diff --git a/doc/snippets/MagnumMathAlgorithms.cpp b/doc/snippets/MathAlgorithms.cpp similarity index 100% rename from doc/snippets/MagnumMathAlgorithms.cpp rename to doc/snippets/MathAlgorithms.cpp diff --git a/doc/snippets/MagnumMeshTools-gl.cpp b/doc/snippets/MeshTools-gl.cpp similarity index 100% rename from doc/snippets/MagnumMeshTools-gl.cpp rename to doc/snippets/MeshTools-gl.cpp diff --git a/doc/snippets/MagnumMeshTools-stl.cpp b/doc/snippets/MeshTools-stl.cpp similarity index 100% rename from doc/snippets/MagnumMeshTools-stl.cpp rename to doc/snippets/MeshTools-stl.cpp diff --git a/doc/snippets/MagnumMeshTools.cpp b/doc/snippets/MeshTools.cpp similarity index 100% rename from doc/snippets/MagnumMeshTools.cpp rename to doc/snippets/MeshTools.cpp diff --git a/doc/snippets/MagnumPlatform-custom.cpp b/doc/snippets/Platform-custom.cpp similarity index 100% rename from doc/snippets/MagnumPlatform-custom.cpp rename to doc/snippets/Platform-custom.cpp diff --git a/doc/snippets/MagnumPlatform-portability.cpp b/doc/snippets/Platform-portability.cpp similarity index 100% rename from doc/snippets/MagnumPlatform-portability.cpp rename to doc/snippets/Platform-portability.cpp diff --git a/doc/snippets/MagnumPlatform-windowless-custom.cpp b/doc/snippets/Platform-windowless-custom.cpp similarity index 100% rename from doc/snippets/MagnumPlatform-windowless-custom.cpp rename to doc/snippets/Platform-windowless-custom.cpp diff --git a/doc/snippets/MagnumPlatform-windowless-thread.cpp b/doc/snippets/Platform-windowless-thread.cpp similarity index 100% rename from doc/snippets/MagnumPlatform-windowless-thread.cpp rename to doc/snippets/Platform-windowless-thread.cpp diff --git a/doc/snippets/MagnumPlatform-windowless.cpp b/doc/snippets/Platform-windowless.cpp similarity index 100% rename from doc/snippets/MagnumPlatform-windowless.cpp rename to doc/snippets/Platform-windowless.cpp diff --git a/doc/snippets/MagnumPlatform.cpp b/doc/snippets/Platform.cpp similarity index 100% rename from doc/snippets/MagnumPlatform.cpp rename to doc/snippets/Platform.cpp diff --git a/doc/snippets/MagnumPrimitives.cpp b/doc/snippets/Primitives.cpp similarity index 100% rename from doc/snippets/MagnumPrimitives.cpp rename to doc/snippets/Primitives.cpp diff --git a/doc/snippets/MagnumSceneGraph-gl.cpp b/doc/snippets/SceneGraph-gl.cpp similarity index 100% rename from doc/snippets/MagnumSceneGraph-gl.cpp rename to doc/snippets/SceneGraph-gl.cpp diff --git a/doc/snippets/MagnumSceneGraph.cpp b/doc/snippets/SceneGraph.cpp similarity index 100% rename from doc/snippets/MagnumSceneGraph.cpp rename to doc/snippets/SceneGraph.cpp diff --git a/doc/snippets/MagnumSceneTools.cpp b/doc/snippets/SceneTools.cpp similarity index 100% rename from doc/snippets/MagnumSceneTools.cpp rename to doc/snippets/SceneTools.cpp diff --git a/doc/snippets/MagnumShaderTools.cpp b/doc/snippets/ShaderTools.cpp similarity index 100% rename from doc/snippets/MagnumShaderTools.cpp rename to doc/snippets/ShaderTools.cpp diff --git a/doc/snippets/MagnumShaders-gl.cpp b/doc/snippets/Shaders-gl.cpp similarity index 100% rename from doc/snippets/MagnumShaders-gl.cpp rename to doc/snippets/Shaders-gl.cpp diff --git a/doc/snippets/MagnumText-gl.cpp b/doc/snippets/Text-gl.cpp similarity index 100% rename from doc/snippets/MagnumText-gl.cpp rename to doc/snippets/Text-gl.cpp diff --git a/doc/snippets/MagnumText.cpp b/doc/snippets/Text.cpp similarity index 100% rename from doc/snippets/MagnumText.cpp rename to doc/snippets/Text.cpp diff --git a/doc/snippets/MagnumTextureTools.cpp b/doc/snippets/TextureTools.cpp similarity index 100% rename from doc/snippets/MagnumTextureTools.cpp rename to doc/snippets/TextureTools.cpp diff --git a/doc/snippets/MagnumTrade.cpp b/doc/snippets/Trade.cpp similarity index 100% rename from doc/snippets/MagnumTrade.cpp rename to doc/snippets/Trade.cpp diff --git a/doc/snippets/MagnumTrade.glsl b/doc/snippets/Trade.glsl similarity index 100% rename from doc/snippets/MagnumTrade.glsl rename to doc/snippets/Trade.glsl diff --git a/doc/snippets/MagnumVk.cpp b/doc/snippets/Vk.cpp similarity index 100% rename from doc/snippets/MagnumVk.cpp rename to doc/snippets/Vk.cpp diff --git a/doc/transformations.dox b/doc/transformations.dox index e80b93851..d12ab996f 100644 --- a/doc/transformations.dox +++ b/doc/transformations.dox @@ -88,7 +88,7 @@ you don't need to worry about them in initialization. and rotation transformation can be created by calling @ref Matrix3::rotation(), @ref Complex::rotation() or @ref DualComplex::rotation(), for example: -@snippet MagnumMath.cpp transformations-rotation2D +@snippet Math.cpp transformations-rotation2D 3D rotation is represented by angle and (three-dimensional) axis. The rotation can be created by calling @ref Matrix4::rotation(), @ref Quaternion::rotation() @@ -99,7 +99,7 @@ Matrix representation has also @ref Matrix4::rotationX(), @ref Matrix4::rotationY() and @ref Matrix4::rotationZ() which are faster than using the generic function for rotation around primary axes. Examples: -@snippet MagnumMath.cpp transformations-rotation3D +@snippet Math.cpp transformations-rotation3D Rotations are always around origin. Rotation about arbitrary point can be done by applying translation to have the point at origin, performing the rotation and @@ -113,13 +113,13 @@ then translating back. Read below for more information. @ref Vector2::xAxis() or @ref Vector2::yAxis() to translate only along given axis. Examples: -@snippet MagnumMath.cpp transformations-translation2D +@snippet Math.cpp transformations-translation2D 3D translation is defined by three-dimensional vector and can be created with @ref Matrix4::translation() or @ref DualQuaternion::translation(). You can use @ref Vector3::xAxis() and friends also here. Examples: -@snippet MagnumMath.cpp transformations-translation3D +@snippet Math.cpp transformations-translation3D @subsection transformations-scaling Scaling and reflection @@ -130,7 +130,7 @@ or their 2D counterparts to scale along one axis and leave the rest unchanged or call explicit one-parameter vector constructor to scale uniformly on all axes. Examples: -@snippet MagnumMath.cpp transformations-scaling +@snippet Math.cpp transformations-scaling Reflections are defined by normal along which to reflect (i.e., two- or three-dimensional vector of unit length) and they are also represented by @@ -138,7 +138,7 @@ matrices. Reflection is created with @ref Matrix3::reflection() or @ref Matrix4::reflection(). You can use @ref Vector3::xAxis() and friends also here. Examples: -@snippet MagnumMath.cpp transformations-reflection +@snippet Math.cpp transformations-reflection Scaling and reflection is also done relative to origin, you can use method mentioned above to scale or reflect around arbitrary point. @@ -159,7 +159,7 @@ unit cube, and perspective projection. Perspective projection is created with aspect ratio and distance to near and far plane of view frustum or by size of near plane, its distance and distance to far plane. Some examples: -@snippet MagnumMath.cpp transformations-projection +@snippet Math.cpp transformations-projection @section transformations-composing Composing and inverting transformations @@ -170,7 +170,7 @@ transformation on the right-hand side of multiplication is applied first, the transformation on the left-hand side is applied second. For example, rotation followed by translation is done like this: -@snippet MagnumMath.cpp transformations-composing +@snippet Math.cpp transformations-composing Inverse transformation can be computed using @ref Matrix3::inverted(), @ref Matrix4::inverted(), @ref Complex::inverted(), @ref Quaternion::inverted(), @@ -192,14 +192,14 @@ using @ref Matrix4::transformVector() and @ref Quaternion::transformVector(). For transformation with normalized quaternion you can use faster alternative @ref Quaternion::transformVectorNormalized(). Example: -@snippet MagnumMath.cpp transformations-transform2D +@snippet Math.cpp transformations-transform2D Point transformation involves also translation, in 2D is done with @ref Matrix3::transformPoint() and @ref DualComplex::transformPoint(), in 3D with @ref Matrix4::transformPoint() and @ref DualQuaternion::transformPoint(). Also here you can use faster alternative @ref DualQuaternion::transformPointNormalized(): -@snippet MagnumMath.cpp transformations-transform3D +@snippet Math.cpp transformations-transform3D @section transformations-properties Transformation properties and conversion @@ -207,7 +207,7 @@ It is possible to extract some transformation properties from transformation matrices, particularly translation vector, rotation/scaling part of the matrix (or pure rotation if the matrix has uniform scaling) and also base vectors: -@snippet MagnumMath.cpp transformations-properties +@snippet Math.cpp transformations-properties Extracting scaling and rotation from arbitrary transformation matrices is harder and can be done using @ref Math::Algorithms::svd(). Extracting rotation @@ -217,7 +217,7 @@ complex number or quaternion, see below. You can also recreate transformation matrix from rotation and translation parts: -@snippet MagnumMath.cpp transformations-recreate +@snippet Math.cpp transformations-recreate Complex numbers and quaternions are far better in this regard and they allow you to extract rotation angle using @ref Complex::angle() or @@ -226,21 +226,21 @@ Their dual versions allow to extract both rotation and translation part using @ref DualComplex::rotation() const, @ref DualQuaternion::rotation() const, @ref DualComplex::translation() const and @ref DualQuaternion::translation() const. -@snippet MagnumMath.cpp transformations-properties-complex-quat +@snippet Math.cpp transformations-properties-complex-quat You can convert Complex and Quaternion to rotation matrix using @ref Complex::toMatrix() and @ref Quaternion::toMatrix() or their dual version to rotation and translation matrix using @ref DualComplex::toMatrix() and @ref DualQuaternion::toMatrix(): -@snippet MagnumMath.cpp transformations-properties-complex-quat-to-matrix +@snippet Math.cpp transformations-properties-complex-quat-to-matrix Conversion the other way around is possible only from rotation matrices using @ref Complex::fromMatrix() or @ref Quaternion::fromMatrix() and from rotation and translation matrices using @ref DualComplex::fromMatrix() and @ref DualQuaternion::fromMatrix(): -@snippet MagnumMath.cpp transformations-properties-complex-quat-from-matrix +@snippet Math.cpp transformations-properties-complex-quat-from-matrix @section transformations-interpolation Transformation interpolation @@ -299,7 +299,7 @@ can be reorthogonalized using @ref Math::Algorithms::gramSchmidtOrthogonalize() scaling). You can also use @ref Math::Algorithms::svd() to more precisely (but way more slowly) account for the drift. Example: -@snippet MagnumMath.cpp transformations-normalization-matrix +@snippet Math.cpp transformations-normalization-matrix For quaternions and complex number this problem can be solved far more easily using @ref Complex::normalized(), @ref Quaternion::normalized(), @@ -307,7 +307,7 @@ using @ref Complex::normalized(), @ref Quaternion::normalized(), Transformation quaternions and complex numbers are always of unit length, thus normalizing them reduces the drift. -@snippet MagnumMath.cpp transformations-normalization-quat +@snippet Math.cpp transformations-normalization-quat @section transformations-modelview Model/view terminology and Magnum diff --git a/doc/types.dox b/doc/types.dox index 319612852..ca6fb1095 100644 --- a/doc/types.dox +++ b/doc/types.dox @@ -121,7 +121,7 @@ For easier entering of (s)RGB colors in hexadecimal format there are literals in the @ref Math::Literals namespace. See their documentation for more information about the differences. -@snippet MagnumMath.cpp types-literals-colors +@snippet Math.cpp types-literals-colors @section types-binary Binary representation @@ -149,7 +149,7 @@ from/to @ref Float and @ref UnsignedShort and you can also use the @link Math::Literals::HalfLiterals::operator""_h() _h @endlink literal that is provided in the @ref Math::Literals namespace: -@snippet MagnumMath.cpp types-literals-half +@snippet Math.cpp types-literals-half Half-precision vector and matrix types such as @ref Vector3h or @ref Matrix3x3h work similarly --- you can construct them and convert them from/to other types, @@ -175,20 +175,20 @@ or use custom @link Math::Literals::AngleLiterals::operator""_degf() _degf @endl @link Math::Literals::AngleLiterals::operator""_rad() _rad @endlink literals that are provided in the @ref Math::Literals namespace: -@snippet MagnumMath.cpp types-literals-angles +@snippet Math.cpp types-literals-angles They can be implicitly converted to each other, but conversion to different underlying type is *explicit* to avoid precision loss (or, on the other hand, unnecessarily high precision) during computations: -@snippet MagnumMath.cpp types-literals-angle-conversion +@snippet Math.cpp types-literals-angle-conversion These classes are used exclusively in all functions taking and returning angles --- trigonometry, angle computation, rotating transformation etc. Thanks to implicit conversion you can seamlessly use either radians or degrees without any need to care about what input the function expects: -@snippet MagnumMath.cpp types-literals-usage +@snippet Math.cpp types-literals-usage @section types-time Time types @@ -209,7 +209,7 @@ The time types are similar in spirit to @ref std::chrono type definitions, but without a dependency on STL. An opt-in conversion is available if you include @link Magnum/Math/TimeStl.h @endlink. -@snippet MagnumMath-stl.cpp types-time +@snippet Math-stl.cpp types-time @section types-other Other types @@ -253,7 +253,7 @@ explicit: Example: -@snippet MagnumMath.cpp types-literals-init +@snippet Math.cpp types-literals-init @section types-thirdparty-integration Integration with types from the STL and 3rd party APIs diff --git a/doc/vulkan-wrapping.dox b/doc/vulkan-wrapping.dox index 14201a40b..48e3dea7c 100644 --- a/doc/vulkan-wrapping.dox +++ b/doc/vulkan-wrapping.dox @@ -46,7 +46,7 @@ to know anything about the `CreateInfo`-related definitions anymore. Then, for convenience, each `ThingCreateInfo.h` header is guaranteed to include the `Thing.h` as well, so if you want both you can do for example just -@snippet MagnumVk.cpp wrapping-include-createinfo +@snippet Vk.cpp wrapping-include-createinfo @@ -54,7 +54,7 @@ convenience, each `ThingCreateInfo.h` header is guaranteed to include the instead of having to verbosely include both: -@snippet MagnumVk.cpp wrapping-include-both +@snippet Vk.cpp wrapping-include-both Unless said otherwise in the particular constructor docs, a `Vk::*CreateInfo` instance has all required fields set to valid values upon construction, with @@ -90,7 +90,7 @@ stores instance- and device-level function pointers locally in each @ref Vk::Instance and @ref Vk::Device to avoid this overhead --- these are then accessible through @ref Vk::Instance::operator->() "operator->()" on both: -@snippet MagnumVk.cpp Instance-function-pointers +@snippet Vk.cpp Instance-function-pointers For convenience and for easier interaction with 3rd party code, such pointers can be made global by calling @ref Vk::Instance::populateGlobalFunctionPointers() @@ -98,7 +98,7 @@ and @ref Vk::Device::populateGlobalFunctionPointers(), after which you can use the `vk*` functions as usual. However, all implications coming from these being tied to a particular instance/device still apply: -@snippet MagnumVk.cpp Instance-global-function-pointers +@snippet Vk.cpp Instance-global-function-pointers @section vulkan-wrapping-host-allocation Host memory allocation @@ -130,7 +130,7 @@ directly to Vulkan APIs. You can create them from an existing structure to supply additional parameters not exposed by Magnum. However take care to not clash with values and pointers already set: -@snippet MagnumVk.cpp wrapping-extending-create-info +@snippet Vk.cpp wrapping-extending-create-info Similarly to the @ref NoInit constructors, constructing a `Vk::*CreateInfo` from the underlying Vulkan structure is guaranteed to not allocate as well --- @@ -170,7 +170,7 @@ able to take pointers to existing @ref Vk::LayerProperties and availability of implicitly enabled layers and extensions. If they're not passed, the class may (but also might not) create its own instances internally: -@snippet MagnumVk.cpp wrapping-optimizing-properties-instance +@snippet Vk.cpp wrapping-optimizing-properties-instance For @ref Vk::Device creation, the @ref Vk::DeviceProperties should ideally be * *moved* all the way to the @ref Vk::Device constructor, at which point it's @@ -179,7 +179,7 @@ If you have @ref Vk::pickDevice(), @ref Vk::DeviceCreateInfo and @ref Vk::Device constructor all in a single expression, the optimal operation is done implicitly: -@snippet MagnumVk.cpp wrapping-optimizing-properties-device-single-expression +@snippet Vk.cpp wrapping-optimizing-properties-device-single-expression However, if you instantiate @ref Vk::DeviceProperties and/or @ref Vk::DeviceCreateInfo separately, you have to @@ -187,7 +187,7 @@ However, if you instantiate @ref Vk::DeviceProperties and/or them to achieve the desired effect. An existing @ref Vk::ExtensionProperties instance can be also passed to @ref Vk::DeviceCreateInfo to allow reuse: -@snippet MagnumVk.cpp wrapping-optimizing-properties-device-move +@snippet Vk.cpp wrapping-optimizing-properties-device-move @section vulkan-wrapping-naming-differences Important differences in naming diff --git a/src/Magnum/Animation/Easing.h b/src/Magnum/Animation/Easing.h index 4f72e5e1d..8b3853787 100644 --- a/src/Magnum/Animation/Easing.h +++ b/src/Magnum/Animation/Easing.h @@ -241,12 +241,12 @@ See @ref building, @ref cmake and @ref animation for more information. The easing function is meant to be used to modify the interpolation factor, such as: -@snippet MagnumAnimation.cpp Easing-factor +@snippet Animation.cpp Easing-factor The @ref Animation library also provides the @ref ease() utility that combines the interpolator together with the easing function: -@snippet MagnumAnimation.cpp Easing-ease +@snippet Animation.cpp Easing-ease @section Animation-Easing-equations Equations @@ -261,7 +261,7 @@ range and produces a NaN. You may want to ensure the factor stays in bounds, using either @ref Math::clamp() or the @ref easeClamped() function --- the following two expressions are equivalent: -@snippet MagnumAnimation.cpp Easing-clamp +@snippet Animation.cpp Easing-clamp Out-function @f$ f_\text{out} @f$ for a corresponding in-function @f$ f_\text{in} @f$ is defined as the following, the equations in the docs usually just show the @@ -289,7 +289,7 @@ plots it with a thin blue line. The curve is always normalized to go from @f$ (0, 0)^T @f$ to @f$ (1, 1)^T @f$, apply arbitrary transformation to each point as needed: -@snippet MagnumAnimation.cpp Easing-bezier-transform +@snippet Animation.cpp Easing-bezier-transform @section Animation-Easing-references References @@ -343,7 +343,7 @@ template struct BasicEasing { * Implementation matching the GLSL @glsl smoothstep() @ce function. * Combine with @ref Math::lerp() to get the equivalent result: * - * @snippet MagnumAnimation.cpp Easing-smoothstep + * @snippet Animation.cpp Easing-smoothstep * * @htmlinclude easings-smoothstep.svg * diff --git a/src/Magnum/Animation/Interpolation.h b/src/Magnum/Animation/Interpolation.h index f30d5ddc8..e2564819b 100644 --- a/src/Magnum/Animation/Interpolation.h +++ b/src/Magnum/Animation/Interpolation.h @@ -230,7 +230,7 @@ Useful to create a new function out of one of the interpolators from @ref transformations-interpolation and an easing function from @ref Easing. For example, the following two expressions give the same result: -@snippet MagnumAnimation.cpp ease +@snippet Animation.cpp ease @see @ref unpack(), @ref unpackEase() */ @@ -256,7 +256,7 @@ Similar to @ref ease(), but for adding an unpacker function to interpolator inputs instead of modifying the interpolator phase. The following two expressions give the same result: -@snippet MagnumAnimation.cpp unpack +@snippet Animation.cpp unpack @see @ref unpackEase() */ @@ -272,7 +272,7 @@ unpack the interpolator inputs, then modifies the interpolator phase and finally passes that to the interpolator function. The following two expressions give the same result: -@snippet MagnumAnimation.cpp unpackEase +@snippet Animation.cpp unpackEase */ template(*interpolator)(const V&, const V&, Float), V(*unpacker)(const T&), Float(*easer)(Float)> constexpr auto unpackEase() -> ResultOf(*)(const V&, const V&, Float) { return [](const V& a, const V& b, Float t) { return interpolator(unpacker(a), unpacker(b), easer(t)); }; diff --git a/src/Magnum/Animation/Player.h b/src/Magnum/Animation/Player.h index 1f90dc6d4..0b9ee79a5 100644 --- a/src/Magnum/Animation/Player.h +++ b/src/Magnum/Animation/Player.h @@ -96,7 +96,7 @@ be done with interpolation result values. The simplest option is specifying a destination location when adding the track using @ref add() --- that'll mean you get a fresh set of animated values at your disposal after every iteration: -@snippet MagnumAnimation.cpp Player-usage +@snippet Animation.cpp Player-usage The Player stores just @ref TrackView instances, for every @ref Track instance you have to ensure that it stays alive for the whole lifetime of the player @@ -110,7 +110,7 @@ instead of a reference to a concrete type. Below is an example of animating @ref SceneGraph::TranslationRotationScalingTransformation3D transformation implementation: -@snippet MagnumAnimation.cpp Player-usage-callback +@snippet Animation.cpp Player-usage-callback The @ref addWithCallbackOnChange() variant will fire the callback only if the interpolated value changes, which is useful for triggering other events. See @@ -181,7 +181,7 @@ the @ref Timeline in particular, it's recommended to never call See @ref Animation-Player-time-type "below" for more information about using different time types. -@snippet MagnumAnimation.cpp Player-usage-playback +@snippet Animation.cpp Player-usage-playback @section Animation-Player-time-type Using custom time/key types @@ -196,7 +196,7 @@ if the tracks *are* long, you can always use a different key type for them as well. A good choice is @ref std::chrono::nanoseconds as a time type and keeping track key values as @ref Magnum::Float "Float" seconds: -@snippet MagnumAnimation.cpp Player-usage-chrono +@snippet Animation.cpp Player-usage-chrono While there's a builtin support for the above, you are free to use any other type combination --- for that you need to provide a *scaler* function that will @@ -207,7 +207,7 @@ basic arithmetic and comparison operators. In order to reduce header size, the to include to get all needed template function definitions. See also @ref compilation-speedup-hpp for more information. -@snippet MagnumAnimation-custom.cpp Player-usage-custom +@snippet Animation-custom.cpp Player-usage-custom @section Animation-Player-higher-order Higher-order players, animating time @@ -216,7 +216,7 @@ animate player state. That's doable by creating specialized tracks that control given player via a state change callback. By adding more tracks you can control multiple players from a central location. -@snippet MagnumAnimation.cpp Player-higher-order +@snippet Animation.cpp Player-higher-order Besides state, you can also animate @ref setDuration() and @ref setPlayCount(), but be aware that setting those while the animation is playing might cause @@ -224,7 +224,7 @@ unwanted jumps and abrupt stops. Time is also completely in your control and you can employ another @ref Player instance to speed it up or slow it down for a particular animation: -@snippet MagnumAnimation.cpp Player-higher-order-animated-time +@snippet Animation.cpp Player-higher-order-animated-time @section Animation-Player-explicit-specializations Explicit template specializations @@ -602,7 +602,7 @@ template Player& addRawCallback(const TrackView& track, void(*callback)(const TrackViewStorage&, K, std::size_t&, void*, void(*)(), void*), void* destination, void(*userCallback)(), void* userData); diff --git a/src/Magnum/Animation/Track.h b/src/Magnum/Animation/Track.h index c4ec39750..21b3916d5 100644 --- a/src/Magnum/Animation/Track.h +++ b/src/Magnum/Animation/Track.h @@ -51,7 +51,7 @@ the @ref Player class, but it's possible to use it separately as well. Animation track is defined by a list of keyframes (time+value pairs), interpolator function and extrapolation behavior. -@snippet MagnumAnimation.cpp Track-usage +@snippet Animation.cpp Track-usage @section Animation-Track-interpolators Types and interpolators @@ -80,7 +80,7 @@ The @ref Track and @ref TrackView classes are fully stateless and the the beginning every time. You can use @ref at(K, std::size_t&) const to remember last used keyframe index and pass it in the next iteration as a hint: -@snippet MagnumAnimation.cpp Track-performance-hint +@snippet Animation.cpp Track-performance-hint @subsection Animation-Track-performance-strict Strict interpolation @@ -91,7 +91,7 @@ implicit @ref Extrapolation::Extrapolated behavior and assumes there are always at least two keyframes, resulting in more compact interpolation code. If your animation data satisfy the prerequisites, simply use it in place of @ref at(): -@snippet MagnumAnimation.cpp Track-performance-strict +@snippet Animation.cpp Track-performance-strict @subsection Animation-Track-performance-cache Cache-efficient data layout @@ -102,7 +102,7 @@ interleaving the data and passing them using instead of having data duplicated scattered across disjoint allocations of @ref Track instances: -@snippet MagnumAnimation.cpp Track-performance-cache +@snippet Animation.cpp Track-performance-cache @subsection Animation-Track-performance-interpolator Interpolator function choice diff --git a/src/Magnum/Audio/AbstractImporter.h b/src/Magnum/Audio/AbstractImporter.h index 905a7445d..1faa4c222 100644 --- a/src/Magnum/Audio/AbstractImporter.h +++ b/src/Magnum/Audio/AbstractImporter.h @@ -247,7 +247,7 @@ Same string as returned by used inside @ref CORRADE_PLUGIN_REGISTER() to avoid having to update the interface string by hand every time the version gets bumped: -@snippet MagnumAudio.cpp MAGNUM_AUDIO_ABSTRACTIMPORTER_PLUGIN_INTERFACE +@snippet Audio.cpp MAGNUM_AUDIO_ABSTRACTIMPORTER_PLUGIN_INTERFACE The interface string version gets increased on every ABI break to prevent silent crashes and memory corruption. Plugins built against the previous diff --git a/src/Magnum/Audio/Context.h b/src/Magnum/Audio/Context.h index 19ad97775..ec1a51570 100644 --- a/src/Magnum/Audio/Context.h +++ b/src/Magnum/Audio/Context.h @@ -391,7 +391,7 @@ class MAGNUM_AUDIO_EXPORT Context { * @ref Extensions namespace in the @ref Magnum/Audio/Extensions.h * header. Example usage: * - * @snippet MagnumAudio.cpp Context-isExtensionSupported + * @snippet Audio.cpp Context-isExtensionSupported * * @see @ref isExtensionSupported(const Extension&) const, * @ref MAGNUM_ASSERT_AUDIO_EXTENSION_SUPPORTED() @@ -590,7 +590,7 @@ By default, if assertion fails, an message is printed to error output and the application aborts. If `CORRADE_NO_ASSERT` is defined, this macro does nothing. Example usage: -@snippet MagnumAudio.cpp MAGNUM_ASSERT_AUDIO_EXTENSION_SUPPORTED +@snippet Audio.cpp MAGNUM_ASSERT_AUDIO_EXTENSION_SUPPORTED @see @ref Magnum::Audio::Context::isExtensionSupported() "Audio::Context::isExtensionSupported()", @ref CORRADE_ASSERT(), @ref CORRADE_INTERNAL_ASSERT() diff --git a/src/Magnum/Audio/Listener.h b/src/Magnum/Audio/Listener.h index 71f3c046c..f5e0ba622 100644 --- a/src/Magnum/Audio/Listener.h +++ b/src/Magnum/Audio/Listener.h @@ -50,7 +50,7 @@ features, managed in one or more @ref PlayableGroup instances. In order to reflect transformation changes affecting the scene, you need to call @ref update() after each change (or simply every frame): -@snippet MagnumAudio-scenegraph.cpp Listener-usage +@snippet Audio-scenegraph.cpp Listener-usage For two-dimensional scenes simply replace all `3D` with `2D`. See @ref Playable for more info about how to set up and group audio sources. diff --git a/src/Magnum/Audio/Playable.h b/src/Magnum/Audio/Playable.h index 06add724e..170d1cb03 100644 --- a/src/Magnum/Audio/Playable.h +++ b/src/Magnum/Audio/Playable.h @@ -49,7 +49,7 @@ order to reflect transformation changes from the scene in the spatial audio, the playable should be added to some @ref PlayableGroup, which is periodically updated from a currently active @ref Listener using @ref Listener::update(): -@snippet MagnumAudio-scenegraph.cpp Playable-usage +@snippet Audio-scenegraph.cpp Playable-usage Note that @ref Source::setPosition(), @ref Source::setDirection() and @ref Source::setGain() called on @ref source() will be overwritten on next call diff --git a/src/Magnum/DebugTools/ColorMap.h b/src/Magnum/DebugTools/ColorMap.h index b80462ed0..1cfbe56a6 100644 --- a/src/Magnum/DebugTools/ColorMap.h +++ b/src/Magnum/DebugTools/ColorMap.h @@ -145,7 +145,7 @@ either clamp or repeat wrapping. For a sRGB workflow don't forget to set the texture format to sRGB, to ensure the values are interpreted and interpolated done correctly. -@snippet MagnumDebugTools-gl.cpp ColorMap +@snippet DebugTools-gl.cpp ColorMap */ namespace ColorMap { diff --git a/src/Magnum/DebugTools/CompareImage.h b/src/Magnum/DebugTools/CompareImage.h index 621703e7f..b1d5a36ce 100644 --- a/src/Magnum/DebugTools/CompareImage.h +++ b/src/Magnum/DebugTools/CompareImage.h @@ -319,14 +319,14 @@ This type is commonly returned from @ref ImageView::pixels() and allows you to do arbitrary operations on the viewed data --- for example, comparing pixel data flipped upside down: -@snippet MagnumDebugTools.cpp CompareImage-pixels-flip +@snippet DebugTools.cpp CompareImage-pixels-flip For a different scenario, imagine you're comparing data read from a framebuffer to a ground truth image. On many systems, internal framebuffer storage has to be four-component; however your if your ground truth image is just three-component you can cast the pixel data to just a three-component type: -@snippet MagnumDebugTools-gl.cpp CompareImage-pixels-rgb +@snippet DebugTools-gl.cpp CompareImage-pixels-rgb The pixel views are expected to be cast to one of Magnum scalar or vector types. The format is then autodetected from the passed type. For types that map @@ -376,7 +376,7 @@ class CompareImage { Similar to @ref CompareImage, but comparing images loaded from files. Example usage: -@snippet MagnumDebugTools.cpp CompareImageFile +@snippet DebugTools.cpp CompareImageFile By default, the comparator uses a local instance of @ref Corrade::PluginManager::Manager to load image files. This might be @@ -384,7 +384,7 @@ problematic if the code being tested also uses a plugin manager instance or if you need to use a different plugin directory, for example. For such cases it's possible to supply an external instance: -@snippet MagnumDebugTools.cpp CompareImageFile-manager +@snippet DebugTools.cpp CompareImageFile-manager The comparator uses the @ref Trade::AnyImageImporter "AnyImageImporter" plugin, which in turn delegates the import to some importer plugin matching the image @@ -393,7 +393,7 @@ concrete importer plugin(s) need to be available, otherwise the comparison fails. An alternative way is manually skipping the test if the plugins are not available: -@snippet MagnumDebugTools.cpp CompareImageFile-skip +@snippet DebugTools.cpp CompareImageFile-skip See also @ref CompareImageToFile and @ref CompareFileToImage for comparing in-memory images to image files and vice versa. @@ -492,7 +492,7 @@ A combination of @ref CompareImage and @ref CompareImageFile, which allows to compare an in-memory image to a image file. See their documentation for more information. Example usage: -@snippet MagnumDebugTools.cpp CompareImageToFile +@snippet DebugTools.cpp CompareImageToFile @see @ref CompareFileToImage */ @@ -564,7 +564,7 @@ A combination of @ref CompareImage and @ref CompareImageFile, which allows to compare an image file to an in-memory image. See their documentation for more information. Example usage: -@snippet MagnumDebugTools.cpp CompareFileToImage +@snippet DebugTools.cpp CompareFileToImage @see @ref CompareImageToFile */ diff --git a/src/Magnum/DebugTools/ForceRenderer.h b/src/Magnum/DebugTools/ForceRenderer.h index 85a74701a..560cf5277 100644 --- a/src/Magnum/DebugTools/ForceRenderer.h +++ b/src/Magnum/DebugTools/ForceRenderer.h @@ -110,7 +110,7 @@ it must be available for the whole lifetime of the renderer. The renderer is automatically added to object's features so you don't need to keep a reference to it. -@snippet MagnumDebugTools-gl.cpp ForceRenderer +@snippet DebugTools-gl.cpp ForceRenderer @note This class is available only if Magnum is compiled with @ref MAGNUM_TARGET_GL "TARGET_GL" and `MAGNUM_WITH_SCENEGRAPH` enabled diff --git a/src/Magnum/DebugTools/FrameProfiler.h b/src/Magnum/DebugTools/FrameProfiler.h index f020f43cf..031849087 100644 --- a/src/Magnum/DebugTools/FrameProfiler.h +++ b/src/Magnum/DebugTools/FrameProfiler.h @@ -63,7 +63,7 @@ GPU time. Measurements are performed by calling @ref beginFrame() and @ref endFrame() at designated points in the frame: -@snippet MagnumDebugTools.cpp FrameProfiler-usage +@snippet DebugTools.cpp FrameProfiler-usage In order to have stable profiling results, the application needs to redraw constantly. However for applications that otherwise redraw only on change it @@ -82,7 +82,7 @@ the output will be colored and refreshing itself in place. Together with the on-demand profiling, it could look like this, refreshing the output every 10 frames: -@snippet MagnumDebugTools.cpp FrameProfiler-usage-console +@snippet DebugTools.cpp FrameProfiler-usage-console And here's a sample output on the terminal --- using a fully configured @link FrameProfilerGL @endlink: @@ -97,7 +97,7 @@ function or to the constructor, together with specifying count of frames for the moving average. A CPU duration measurements using the @ref std::chrono APIs over last 50 frames can be done like this: -@snippet MagnumDebugTools.cpp FrameProfiler-setup-immediate +@snippet DebugTools.cpp FrameProfiler-setup-immediate In the above case, the measurement result is available immediately on frame end. That's not always the case, and for example GPU queries need a few frames @@ -108,7 +108,7 @@ two frames later. The profiler automatically takes care of choosing one of the three instances for each measurement via additional `current` / `previous` parameters passed to each callback: -@snippet MagnumDebugTools-gl.cpp FrameProfiler-setup-delayed +@snippet DebugTools-gl.cpp FrameProfiler-setup-delayed @@ -519,7 +519,7 @@ A @ref FrameProfiler with OpenGL-specific measurements. Instantiate with a desired subset of measured values and then continue the same way as described in the @ref DebugTools-FrameProfiler-usage "FrameProfiler usage documentation": -@snippet MagnumDebugTools-gl.cpp FrameProfilerGL-usage +@snippet DebugTools-gl.cpp FrameProfilerGL-usage If none if @ref Value::GpuDuration, @ref Value::VertexFetchRatio and @ref Value::PrimitiveClipRatio is not enabled, the class can operate without an diff --git a/src/Magnum/DebugTools/ObjectRenderer.h b/src/Magnum/DebugTools/ObjectRenderer.h index fa2b62bf8..17e750396 100644 --- a/src/Magnum/DebugTools/ObjectRenderer.h +++ b/src/Magnum/DebugTools/ObjectRenderer.h @@ -82,7 +82,7 @@ Visualizes object position, rotation and scale using colored axes. See Example code: -@snippet MagnumDebugTools-gl.cpp ObjectRenderer +@snippet DebugTools-gl.cpp ObjectRenderer @note This class is available only if Magnum is compiled with @ref MAGNUM_TARGET_GL "TARGET_GL" and `MAGNUM_WITH_SCENEGRAPH` enabled diff --git a/src/Magnum/DebugTools/TextureImage.h b/src/Magnum/DebugTools/TextureImage.h index 9fc6e413f..831630d72 100644 --- a/src/Magnum/DebugTools/TextureImage.h +++ b/src/Magnum/DebugTools/TextureImage.h @@ -66,7 +66,7 @@ MAGNUM_DEBUGTOOLS_EXPORT void textureSubImage(GL::Texture2D& texture, Int level, Convenience alternative to the above, example usage: -@snippet MagnumDebugTools-gl.cpp textureSubImage-2D-rvalue +@snippet DebugTools-gl.cpp textureSubImage-2D-rvalue @note This function is available only if Magnum is compiled with @ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See @@ -97,7 +97,7 @@ MAGNUM_DEBUGTOOLS_EXPORT void textureSubImage(GL::CubeMapTexture& texture, GL::C Convenience alternative to the above, example usage: -@snippet MagnumDebugTools-gl.cpp textureSubImage-cubemap-rvalue +@snippet DebugTools-gl.cpp textureSubImage-cubemap-rvalue @note This function is available only if Magnum is compiled with @ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See @@ -133,7 +133,7 @@ MAGNUM_DEBUGTOOLS_EXPORT void textureSubImage(GL::Texture2D& texture, Int level, Convenience alternative to the above, example usage: -@snippet MagnumDebugTools-gl.cpp textureSubImage-2D-rvalue-buffer +@snippet DebugTools-gl.cpp textureSubImage-2D-rvalue-buffer @note This function is available only if Magnum is compiled with @ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See @@ -166,7 +166,7 @@ MAGNUM_DEBUGTOOLS_EXPORT void textureSubImage(GL::CubeMapTexture& texture, GL::C Convenience alternative to the above, example usage: -@snippet MagnumDebugTools-gl.cpp textureSubImage-cubemap-rvalue-buffer +@snippet DebugTools-gl.cpp textureSubImage-cubemap-rvalue-buffer @note This function is available only if Magnum is compiled with @ref MAGNUM_TARGET_GL "TARGET_GL" enabled (done by default). See diff --git a/src/Magnum/GL/AbstractFramebuffer.h b/src/Magnum/GL/AbstractFramebuffer.h index 7a93d9311..bb02aa8db 100644 --- a/src/Magnum/GL/AbstractFramebuffer.h +++ b/src/Magnum/GL/AbstractFramebuffer.h @@ -413,7 +413,7 @@ class MAGNUM_GL_EXPORT AbstractFramebuffer { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp AbstractFramebuffer-read1 + * @snippet GL.cpp AbstractFramebuffer-read1 */ Image2D read(const Range2Di& rectangle, Image2D&& image); @@ -453,7 +453,7 @@ class MAGNUM_GL_EXPORT AbstractFramebuffer { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp AbstractFramebuffer-read2 + * @snippet GL.cpp AbstractFramebuffer-read2 */ BufferImage2D read(const Range2Di& rectangle, BufferImage2D&& image, BufferUsage usage); #endif diff --git a/src/Magnum/GL/AbstractShaderProgram.h b/src/Magnum/GL/AbstractShaderProgram.h index 2f6ce457e..8cd146d0b 100644 --- a/src/Magnum/GL/AbstractShaderProgram.h +++ b/src/Magnum/GL/AbstractShaderProgram.h @@ -80,35 +80,35 @@ functions and properties:
  • **Attribute definitions** using @ref Attribute typedefs with location and type for configuring meshes, for example: - @snippet MagnumGL.cpp AbstractShaderProgram-input-attributes + @snippet GL.cpp AbstractShaderProgram-input-attributes
  • **Output attribute locations**, if desired, for example: - @snippet MagnumGL.cpp AbstractShaderProgram-output-attributes + @snippet GL.cpp AbstractShaderProgram-output-attributes
  • **Constructor**, which loads, compiles and attaches particular shaders and links the program together, for example: - @snippet MagnumGL.cpp AbstractShaderProgram-constructor + @snippet GL.cpp AbstractShaderProgram-constructor
  • **Uniform setting functions**, which will provide public interface for protected @ref setUniform() functions. For usability purposes you can implement also method chaining. Example: - @snippet MagnumGL.cpp AbstractShaderProgram-uniforms + @snippet GL.cpp AbstractShaderProgram-uniforms
  • **Texture and texture image binding functions** in which you bind the textures/images to particular texture/image units using @ref Texture::bind() "*Texture::bind()" / @ref Texture::bindImage() "*Texture::bindImage()" and similar, for example: - @snippet MagnumGL.cpp AbstractShaderProgram-textures + @snippet GL.cpp AbstractShaderProgram-textures
  • **Transform feedback setup function**, if needed, in which you bind buffers to particular indices using @ref TransformFeedback::attachBuffer() and similar, possibly with overloads based on desired use cases, e.g.: - @snippet MagnumGL.cpp AbstractShaderProgram-xfb + @snippet GL.cpp AbstractShaderProgram-xfb
  • And optionally, **return derived type from relevant draw/dispatch functions** to make it possible for users to easily chain draw calls; and on the other @@ -120,7 +120,7 @@ functions and properties: @ref MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DRAW_IMPLEMENTATION() or @ref MAGNUM_GL_ABSTRACTSHADERPROGRAM_SUBCLASS_DISPATCH_IMPLEMENTATION(): - @snippet MagnumGL.cpp AbstractShaderProgram-subclass-macro + @snippet GL.cpp AbstractShaderProgram-subclass-macro @subsection GL-AbstractShaderProgram-attribute-location Binding attribute and fragment data location @@ -163,7 +163,7 @@ out vec4 color; out vec3 normal; @endcode -@snippet MagnumGL.cpp AbstractShaderProgram-binding +@snippet GL.cpp AbstractShaderProgram-binding @see @ref maxVertexAttributes(), @ref AbstractFramebuffer::maxDrawBuffers() @requires_gl30 Extension @gl_extension{EXT,gpu_shader4} for using @@ -221,7 +221,7 @@ uniform mat4 transformationMatrix; uniform mat3 normalMatrix; @endcode -@snippet MagnumGL.cpp AbstractShaderProgram-uniform-location +@snippet GL.cpp AbstractShaderProgram-uniform-location @see @ref maxUniformLocations() @requires_gl43 Extension @gl_extension{ARB,explicit_uniform_location} for @@ -266,7 +266,7 @@ layout(std140) uniform material { }; @endcode -@snippet MagnumGL.cpp AbstractShaderProgram-uniform-block-binding +@snippet GL.cpp AbstractShaderProgram-uniform-block-binding @see @ref Buffer::maxUniformBindings() @requires_gl31 Extension @gl_extension{ARB,uniform_buffer_object} @@ -324,7 +324,7 @@ uniform sampler2D diffuseTexture; uniform sampler2D specularTexture; @endcode -@snippet MagnumGL.cpp AbstractShaderProgram-texture-uniforms +@snippet GL.cpp AbstractShaderProgram-texture-uniforms @see @ref Shader::maxTextureImageUnits(), @ref maxImageUnits() @requires_gl42 Extension @gl_extension{ARB,shading_language_420pack} for explicit @@ -361,7 +361,7 @@ out block { out vec3 velocity; @endcode -@snippet MagnumGL.cpp AbstractShaderProgram-xfb-outputs +@snippet GL.cpp AbstractShaderProgram-xfb-outputs @see @ref TransformFeedback::maxInterleavedComponents(), @ref TransformFeedback::maxSeparateAttributes(), @@ -387,7 +387,7 @@ needed (see @ref GL-Framebuffer-usage "Framebuffer documentation" for more information). In each draw event set all required shader parameters, bind specific framebuffer (if needed) and then call @ref draw(). Example: -@snippet MagnumGL.cpp AbstractShaderProgram-rendering +@snippet GL.cpp AbstractShaderProgram-rendering @section GL-AbstractShaderProgram-compute-workflow Compute workflow @@ -497,14 +497,14 @@ creation capability while keeping also the simple constructor is the following: 5. The original @cpp MyShader(…) @ce constructor now only passes the result of @cpp compile() @ce to @cpp MyShader(CompileState&&) @ce. -@snippet MagnumGL.cpp AbstractShaderProgram-async +@snippet GL.cpp AbstractShaderProgram-async Usage-wise, it can look for example like below, with the last line waiting for linking to finish and making the shader ready to use. On drivers that don't perform any async compilation this will behave the same as if the construction was done the usual way. -@snippet MagnumGL.cpp AbstractShaderProgram-async-usage +@snippet GL.cpp AbstractShaderProgram-async-usage @section GL-AbstractShaderProgram-performance-optimization Performance optimizations diff --git a/src/Magnum/GL/Buffer.h b/src/Magnum/GL/Buffer.h index 18152b569..303c4df8b 100644 --- a/src/Magnum/GL/Buffer.h +++ b/src/Magnum/GL/Buffer.h @@ -164,14 +164,14 @@ implicitly convertible from statically sized C arrays or can be constructed from a pair of a pointer and a size. You can optionally specify a usage hint in the second argument, which defaults to @ref BufferUsage::StaticDraw. -@snippet MagnumGL.cpp Buffer-setdata +@snippet GL.cpp Buffer-setdata Furthermore, if you @cpp #include @ce @ref Corrade/Containers/ArrayViewStl.h, you can also directly pass STL types such as a @ref std::vector or a @ref std::array; with @ref Corrade/Containers/ArrayViewStlSpan.h the @ref std::span is convertible to it as well: -@snippet MagnumGL.cpp Buffer-setdata-stl +@snippet GL.cpp Buffer-setdata-stl An alternative to @ref setData() that provides more flexibility and better performance guarantees is @ref setStorage(). It's similar in spirit to texture @@ -181,27 +181,27 @@ textures. The minimal variant of the call shown below creates an immutable buffer from given data in device memory, in the second argument you can specify @ref StorageFlags that make it CPU-accessible, (persistently) mappable etc. -@snippet MagnumGL.cpp Buffer-setstorage +@snippet GL.cpp Buffer-setstorage @section GL-Buffer-data-mapping Memory mapping Buffer data can be also updated asynchronously. First you need to allocate the buffer to desired size by passing @cpp nullptr @ce to @ref setData(), e.g.: -@snippet MagnumGL.cpp Buffer-setdata-allocate +@snippet GL.cpp Buffer-setdata-allocate Then you can map the buffer to client memory and operate with the memory directly. After you are done with the operation, call @ref unmap() to unmap the buffer again. The @ref map() functions return a view on a @cpp char @ce array and you may want to cast it to some useful type first using @ref Containers::arrayCast(): -@snippet MagnumGL.cpp Buffer-map +@snippet GL.cpp Buffer-map If you are updating only a few discrete portions of the buffer, you can use @ref MapFlag::FlushExplicit and @ref flushMappedRange() to reduce number of memory operations performed by OpenGL on unmapping. Example: -@snippet MagnumGL.cpp Buffer-flush +@snippet GL.cpp Buffer-flush @section GL-Buffer-webgl-restrictions WebGL restrictions @@ -212,13 +212,13 @@ default uses any sufficient target when binding the buffer internally (e.g. for setting data). Which means the following, while completely fine on desktop and OpenGL ES, is not sufficient on WebGL: -@snippet MagnumGL.cpp Buffer-webgl-nope +@snippet GL.cpp Buffer-webgl-nope To avoid GL errors, you have to set target hint to desired target, either in the constructor or using @ref setTargetHint(). A similar care needs to be taken for uniform buffers and other types of buffers. -@snippet MagnumGL.cpp Buffer-webgl +@snippet GL.cpp Buffer-webgl To simplify debugging, the @ref Mesh class checks proper target hint when adding vertex and index buffers under WebGL. diff --git a/src/Magnum/GL/BufferImage.h b/src/Magnum/GL/BufferImage.h index 6d350ae31..de531fc61 100644 --- a/src/Magnum/GL/BufferImage.h +++ b/src/Magnum/GL/BufferImage.h @@ -56,7 +56,7 @@ corresponding image size and pixel format properties. Because this is a GL-centric class, it's common to specify the format using @ref GL::PixelFormat and @link GL::PixelType @endlink: -@snippet MagnumGL.cpp BufferImage-usage +@snippet GL.cpp BufferImage-usage It's also possible to pass the generic @ref Magnum::PixelFormat to it, however the @ref format() and @ref type() queries will always return the GL-specific @@ -71,13 +71,13 @@ it, for example to use buffer storage and other advanced functionality. The image will take an ownership of the buffer, you can use @ref Buffer::wrap() to make a non-owning copy. -@snippet MagnumGL.cpp BufferImage-usage-wrap +@snippet GL.cpp BufferImage-usage-wrap It's also possible to create just an image placeholder, storing only the image properties without data or size. That is useful for example to specify desired format of image queries in graphics APIs: -@snippet MagnumGL.cpp BufferImage-usage-query +@snippet GL.cpp BufferImage-usage-query Similarly to @ref ImageView, this class supports extra storage parameters. See @ref ImageView-usage for more information. @@ -404,7 +404,7 @@ corresponding image size and compression format properties. Because this is a GL-centric class, it's common to specify the format using @link GL::CompressedPixelFormat @endlink: -@snippet MagnumGL.cpp CompressedBufferImage-usage +@snippet GL.cpp CompressedBufferImage-usage It's also possible to pass the generic @ref Magnum::CompressedPixelFormat to it, however the @ref format() query will always return the GL-specific value. @@ -414,13 +414,13 @@ it, for example to use buffer storage and other advanced functionality. The image will take an ownership of the buffer, you can use @ref Buffer::wrap() to make a non-owning copy. -@snippet MagnumGL.cpp CompressedBufferImage-usage-wrap +@snippet GL.cpp CompressedBufferImage-usage-wrap It's also possible to create just an image placeholder, storing only the image properties without data or size. That is useful for example to specify desired format of image queries in graphics APIs: -@snippet MagnumGL.cpp CompressedBufferImage-usage-query +@snippet GL.cpp CompressedBufferImage-usage-query Similarly to @ref CompressedImageView, this class supports extra storage parameters. See @ref CompressedImageView-usage for more information. diff --git a/src/Magnum/GL/BufferTexture.h b/src/Magnum/GL/BufferTexture.h index fcbb1ba19..c19db6869 100644 --- a/src/Magnum/GL/BufferTexture.h +++ b/src/Magnum/GL/BufferTexture.h @@ -55,7 +55,7 @@ for more textures or store more than one data in it. Example usage: -@snippet MagnumGL.cpp BufferTexture-usage +@snippet GL.cpp BufferTexture-usage In shader, the texture is used via @glsl samplerBuffer @ce, @glsl isamplerBuffer @ce or @glsl usamplerBuffer @ce. Unlike in classic diff --git a/src/Magnum/GL/Context.h b/src/Magnum/GL/Context.h index 562cefe08..bbe17f239 100644 --- a/src/Magnum/GL/Context.h +++ b/src/Magnum/GL/Context.h @@ -211,12 +211,12 @@ instances for other OpenGL contexts, *first* you need to "unset" the current one with @ref makeCurrent() and *then* create another instance, which will then become implicitly active: -@snippet MagnumGL-application.cpp Context-makeCurrent-nullptr +@snippet GL-application.cpp Context-makeCurrent-nullptr Once all needed instances are created, switch between them right after making the underlying GL context current: -@snippet MagnumGL-application.cpp Context-makeCurrent +@snippet GL-application.cpp Context-makeCurrent @section GL-Context-multithreading Thread safety @@ -734,7 +734,7 @@ class MAGNUM_GL_EXPORT Context { * equivalent to subsequent @ref isVersionSupported() calls --- the two * following examples produce the same result: * - * @snippet MagnumGL.cpp Context-supportedVersion + * @snippet GL.cpp Context-supportedVersion * * If no version from the list is supported, returns lowest available * OpenGL version (@ref Version::GL210 for desktop OpenGL, @@ -751,7 +751,7 @@ class MAGNUM_GL_EXPORT Context { * and in the @ref opengl-support "OpenGL support tables". Example * usage: * - * @snippet MagnumGL.cpp Context-isExtensionSupported + * @snippet GL.cpp Context-isExtensionSupported * * @see @ref isExtensionSupported(const Extension&) const, * @ref MAGNUM_ASSERT_GL_EXTENSION_SUPPORTED(), @@ -769,7 +769,7 @@ class MAGNUM_GL_EXPORT Context { * @p version. Useful mainly in shader compilation when the decisions * depend on selected GLSL version, for example: * - * @snippet MagnumGL.cpp Context-isExtensionSupported-version + * @snippet GL.cpp Context-isExtensionSupported-version */ template bool isExtensionSupported(Version version) const { static_assert(Implementation::IsExtension::value, "expected an OpenGL extension"); @@ -1184,7 +1184,7 @@ By default, if assertion fails, an message is printed to error output and the application aborts. If `CORRADE_NO_ASSERT` is defined, this macro does nothing. Example usage: -@snippet MagnumGL.cpp Context-MAGNUM_ASSERT_GL_VERSION_SUPPORTED +@snippet GL.cpp Context-MAGNUM_ASSERT_GL_VERSION_SUPPORTED @see @ref Magnum::GL::Context::isVersionSupported() "GL::Context::isVersionSupported()", @ref MAGNUM_ASSERT_GL_EXTENSION_SUPPORTED(), @ref CORRADE_ASSERT(), @@ -1213,7 +1213,7 @@ By default, if assertion fails, an message is printed to error output and the application aborts. If `CORRADE_NO_ASSERT` is defined, this macro does nothing. Example usage: -@snippet MagnumGL.cpp Context-MAGNUM_ASSERT_GL_EXTENSION_SUPPORTED +@snippet GL.cpp Context-MAGNUM_ASSERT_GL_EXTENSION_SUPPORTED @see @ref Magnum::GL::Context::isExtensionSupported() "Context::isExtensionSupported()", @ref MAGNUM_ASSERT_GL_VERSION_SUPPORTED(), @ref CORRADE_ASSERT(), diff --git a/src/Magnum/GL/CubeMapTexture.h b/src/Magnum/GL/CubeMapTexture.h index a8e980908..ed6cdd68c 100644 --- a/src/Magnum/GL/CubeMapTexture.h +++ b/src/Magnum/GL/CubeMapTexture.h @@ -78,7 +78,7 @@ See @ref Texture documentation for introduction. Common usage is to fully configure all texture parameters and then set the data from e.g. set of Image objects: -@snippet MagnumGL.cpp CubeMapTexture-usage +@snippet GL.cpp CubeMapTexture-usage In shader, the texture is used via @glsl samplerCube @ce, @glsl samplerCubeShadow @ce, @glsl isamplerCube @ce or @glsl usamplerCube @ce. Unlike in classic textures, @@ -623,7 +623,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-image1 + * @snippet GL.cpp CubeMapTexture-image1 */ Image3D image(Int level, Image3D&& image); @@ -655,7 +655,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-image2 + * @snippet GL.cpp CubeMapTexture-image2 */ BufferImage3D image(Int level, BufferImage3D&& image, BufferUsage usage); @@ -687,7 +687,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-compressedImage1 + * @snippet GL.cpp CubeMapTexture-compressedImage1 */ CompressedImage3D compressedImage(Int level, CompressedImage3D&& image); @@ -722,7 +722,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-compressedImage2 + * @snippet GL.cpp CubeMapTexture-compressedImage2 */ CompressedBufferImage3D compressedImage(Int level, CompressedBufferImage3D&& image, BufferUsage usage); @@ -761,7 +761,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-image3 + * @snippet GL.cpp CubeMapTexture-image3 */ Image2D image(CubeMapCoordinate coordinate, Int level, Image2D&& image); @@ -794,7 +794,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-image4 + * @snippet GL.cpp CubeMapTexture-image4 */ BufferImage2D image(CubeMapCoordinate coordinate, Int level, BufferImage2D&& image, BufferUsage usage); @@ -836,7 +836,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-compressedImage3 + * @snippet GL.cpp CubeMapTexture-compressedImage3 */ CompressedImage2D compressedImage(CubeMapCoordinate coordinate, Int level, CompressedImage2D&& image); @@ -873,7 +873,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-compressedImage4 + * @snippet GL.cpp CubeMapTexture-compressedImage4 */ CompressedBufferImage2D compressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D&& image, BufferUsage usage); @@ -902,7 +902,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-subImage1 + * @snippet GL.cpp CubeMapTexture-subImage1 */ Image3D subImage(Int level, const Range3Di& range, Image3D&& image); @@ -939,7 +939,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-subImage2 + * @snippet GL.cpp CubeMapTexture-subImage2 */ BufferImage3D subImage(Int level, const Range3Di& range, BufferImage3D&& image, BufferUsage usage); @@ -969,7 +969,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-compressedSubImage1 + * @snippet GL.cpp CubeMapTexture-compressedSubImage1 */ CompressedImage3D compressedSubImage(Int level, const Range3Di& range, CompressedImage3D&& image); @@ -1008,7 +1008,7 @@ class MAGNUM_GL_EXPORT CubeMapTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTexture-compressedSubImage2 + * @snippet GL.cpp CubeMapTexture-compressedSubImage2 */ CompressedBufferImage3D compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D&& image, BufferUsage usage); #endif diff --git a/src/Magnum/GL/CubeMapTextureArray.h b/src/Magnum/GL/CubeMapTextureArray.h index 8bcd58c7e..f8261c5cb 100644 --- a/src/Magnum/GL/CubeMapTextureArray.h +++ b/src/Magnum/GL/CubeMapTextureArray.h @@ -58,7 +58,7 @@ You have to allocate the memory for all layers and faces first by calling @ref setStorage(). Example: array with 4 layers of cube maps, each cube map consisting of six 64x64 images, i.e. 24 layers total: -@snippet MagnumGL.cpp CubeMapTextureArray-usage +@snippet GL.cpp CubeMapTextureArray-usage In shader, the texture is used via @glsl samplerCubeArray @ce, @glsl samplerCubeArrayShadow @ce, @glsl isamplerCubeArray @ce or @@ -531,7 +531,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-image1 + * @snippet GL.cpp CubeMapTextureArray-image1 */ Image3D image(Int level, Image3D&& image); @@ -567,7 +567,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-image2 + * @snippet GL.cpp CubeMapTextureArray-image2 */ BufferImage3D image(Int level, BufferImage3D&& image, BufferUsage usage); @@ -593,7 +593,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-compressedImage1 + * @snippet GL.cpp CubeMapTextureArray-compressedImage1 */ CompressedImage3D compressedImage(Int level, CompressedImage3D&& image); @@ -632,7 +632,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-compressedImage2 + * @snippet GL.cpp CubeMapTextureArray-compressedImage2 */ CompressedBufferImage3D compressedImage(Int level, CompressedBufferImage3D&& image, BufferUsage usage); @@ -661,7 +661,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-subImage1 + * @snippet GL.cpp CubeMapTextureArray-subImage1 */ Image3D subImage(Int level, const Range3Di& range, Image3D&& image); @@ -698,7 +698,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-subImage2 + * @snippet GL.cpp CubeMapTextureArray-subImage2 */ BufferImage3D subImage(Int level, const Range3Di& range, BufferImage3D&& image, BufferUsage usage); @@ -733,7 +733,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-compressedSubImage1 + * @snippet GL.cpp CubeMapTextureArray-compressedSubImage1 */ CompressedImage3D compressedSubImage(Int level, const Range3Di& range, CompressedImage3D&& image); @@ -776,7 +776,7 @@ class MAGNUM_GL_EXPORT CubeMapTextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp CubeMapTextureArray-compressedSubImage2 + * @snippet GL.cpp CubeMapTextureArray-compressedSubImage2 */ CompressedBufferImage3D compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D&& image, BufferUsage usage); #endif diff --git a/src/Magnum/GL/DebugOutput.h b/src/Magnum/GL/DebugOutput.h index 9d5434213..4104227cd 100644 --- a/src/Magnum/GL/DebugOutput.h +++ b/src/Magnum/GL/DebugOutput.h @@ -93,7 +93,7 @@ application itself by setting up message callback using @ref setCallback() or is passed for context creation, both with windowed and windowless application implementations. -@snippet MagnumGL.cpp DebugOutput-usage +@snippet GL.cpp DebugOutput-usage With default callback the group entering/leaving and the inserted message (and possibly also other messages) will be printed on standard output: @@ -424,7 +424,7 @@ class MAGNUM_GL_EXPORT DebugOutput { * to @ref Corrade::Utility::Debug "Debug" output in the following * format: * - * @snippet MagnumGL.cpp DebugOutput-setDefaultCallback + * @snippet GL.cpp DebugOutput-setDefaultCallback * * @code{.shell-session} * Debug output: application marker (1337): Hello from OpenGL command stream! @@ -480,7 +480,7 @@ available and default debug output callback is enabled for given kind of messages, the inserted message will be printed on standard output in the following form: -@snippet MagnumGL.cpp DebugMessage-usage +@snippet GL.cpp DebugMessage-usage

    @code{.shell-session} @@ -648,12 +648,12 @@ See @ref DebugOutput for introduction. Easiest way is to push debug group by creating instance and pop it automatically at the end of scope: -@snippet MagnumGL.cpp DebugGroup-usage1 +@snippet GL.cpp DebugGroup-usage1 If, for some reason, you need to pop in different scope, you can call @ref push() and @ref pop() manually: -@snippet MagnumGL.cpp DebugGroup-usage2 +@snippet GL.cpp DebugGroup-usage2 If OpenGL 4.3 / OpenGL ES 3.2 is supported or @gl_extension{KHR,debug} desktop or ES extension (covered also by @gl_extension{ANDROID,extension_pack_es31a}) is diff --git a/src/Magnum/GL/DefaultFramebuffer.h b/src/Magnum/GL/DefaultFramebuffer.h index 00ca35376..a8762ba22 100644 --- a/src/Magnum/GL/DefaultFramebuffer.h +++ b/src/Magnum/GL/DefaultFramebuffer.h @@ -54,7 +54,7 @@ classes, pass the new size in your @ref Platform::Sdl2Application::viewportEvent() "viewportEvent()" implementation, for example: -@snippet MagnumGL-application.cpp DefaultFramebuffer-usage-viewport +@snippet GL-application.cpp DefaultFramebuffer-usage-viewport Next thing you probably want is to clear all used buffers before performing any drawing. Again, in case you're using one of the @@ -62,7 +62,7 @@ any drawing. Again, in case you're using one of the @ref Platform::Sdl2Application::drawEvent() "drawEvent()" implementation, for example: -@snippet MagnumGL-application.cpp DefaultFramebuffer-usage-clear +@snippet GL-application.cpp DefaultFramebuffer-usage-clear See documentation of particular functions and @ref Framebuffer documentation for more involved usage, usage of non-default or multiple framebuffers. @@ -378,7 +378,7 @@ class MAGNUM_GL_EXPORT DefaultFramebuffer: public AbstractFramebuffer { * can achieve the same by passing @ref DrawAttachment::None as * attachment. Example usage: * - * @snippet MagnumGL.cpp DefaultFramebuffer-usage-map + * @snippet GL.cpp DefaultFramebuffer-usage-map * * If @gl_extension{ARB,direct_state_access} (part of OpenGL 4.5) is * not available, the framebuffer is bound before the operation (if not diff --git a/src/Magnum/GL/Framebuffer.h b/src/Magnum/GL/Framebuffer.h index a68d734f9..ad77e7a14 100644 --- a/src/Magnum/GL/Framebuffer.h +++ b/src/Magnum/GL/Framebuffer.h @@ -67,12 +67,12 @@ there's not much reason to use @ref Renderbuffer anymore, however in OpenGL ES and WebGL due to various texture format restrictions, renderbuffers are still the more flexible option if you don't need to use the result in a shader. -@snippet MagnumGL.cpp Framebuffer-usage +@snippet GL.cpp Framebuffer-usage Rendering then usually consists of switching between different framebuffers using @ref bind() and reusing the rendered texture in subsequent draws: -@snippet MagnumGL.cpp Framebuffer-usage-rendering +@snippet GL.cpp Framebuffer-usage-rendering @section GL-Framebuffer-usage-multisample Multisampled rendering @@ -80,7 +80,7 @@ Another use case for custom framebuffers is multisampled rendering --- as you're not always allowed to control the MSAA setting on a default framebuffer, or you might want your rendered texture to be multisampled as well: -@snippet MagnumGL.cpp Framebuffer-usage-multisample +@snippet GL.cpp Framebuffer-usage-multisample Here @ref Renderbuffer gets used for the color attachment as well. While it's possible to achieve the same with a @ref MultisampleTexture2D, support for it @@ -95,7 +95,7 @@ gets used. In builtin shaders this is also how the @ref Shaders::FlatGL::ColorOutput / @ref Shaders::FlatGL::ObjectIdOutput etc. get used: -@snippet MagnumGL.cpp Framebuffer-usage-deferred +@snippet GL.cpp Framebuffer-usage-deferred @section GL-Framebuffer-performance-optimizations Performance optimizations @@ -535,7 +535,7 @@ class MAGNUM_GL_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractO * used, you can achieve the same by passing @ref Framebuffer::DrawAttachment::None * as color attachment ID. Example usage: * - * @snippet MagnumGL.cpp Framebuffer-mapForDraw + * @snippet GL.cpp Framebuffer-mapForDraw * * If @gl_extension{ARB,direct_state_access} (part of OpenGL 4.5) is * not available, the framebuffer is bound before the operation (if not diff --git a/src/Magnum/GL/Mesh.h b/src/Magnum/GL/Mesh.h index c5b6040d3..e8ee17628 100644 --- a/src/Magnum/GL/Mesh.h +++ b/src/Magnum/GL/Mesh.h @@ -251,7 +251,7 @@ If you have a @ref Trade::MeshData instance that you got for example from @ref Trade::AbstractImporter::mesh() or from the @ref Primitives library, the simplest possible way is to use @ref MeshTools::compile(): -@snippet MagnumTrade.cpp MeshData-usage-compile +@snippet Trade.cpp MeshData-usage-compile This one-liner uploads the data and configures the mesh for all attributes known by Magnum that are present in it, making it suitable to be drawn by @@ -286,7 +286,7 @@ type expected by @ref Shaders::FlatGL3D::Position, so the default constructor is sufficient for it. The @ref GL-Mesh-configuration-formats section below shows cases where the types don't match. -@snippet MagnumGL.cpp Mesh-vertices +@snippet GL.cpp Mesh-vertices Here's a mesh with a position and a normal interleaved together, as is needed for @ref Shaders::PhongGL. See the docs of @ref addVertexBuffer() for @@ -296,12 +296,12 @@ specified. Note that @ref Shaders::FlatGL::Position and @ref Shaders::GenericGL::Position, meaning you can render a mesh configured for the Phong shader with the Flat shader as well: -@snippet MagnumGL.cpp Mesh-vertices-interleaved +@snippet GL.cpp Mesh-vertices-interleaved Indexed meshes have the index buffer and corresponding index type set using @ref setIndexBuffer(). -@snippet MagnumGL.cpp Mesh-indices +@snippet GL.cpp Mesh-indices @@ -331,13 +331,13 @@ use @ref MeshTools::interleave() to interleave them together. The usage including the padding specification, is similar to @ref addVertexBuffer(). The above vertex buffer setup but with separate position and normal arrays that get interleaved can be expressed like this: -@snippet MagnumGL.cpp Mesh-vertices-interleaved-tool +@snippet GL.cpp Mesh-vertices-interleaved-tool For indices it's often beneficial to store them in a 16-bit type if they don't need the full 32-bit range. That's what @ref MeshTools::compressIndices() is for: -@snippet MagnumGL.cpp Mesh-indices-tool +@snippet GL.cpp Mesh-indices-tool The ultimate generic tool is the already-shown @ref MeshTools::compile(), together with all @ref MeshTools APIs that operate on @ref Trade::MeshData @@ -355,7 +355,7 @@ the normal is a packed normalized @relativeref{Magnum,Vector3s}, together with padding for having vertex boundaries aligned to four bytes to make the GPU happier: -@snippet MagnumGL.cpp Mesh-formats +@snippet GL.cpp Mesh-formats @subsection GL-Mesh-configuration-dynamic Dynamically specified attributes @@ -368,7 +368,7 @@ specifying also the stride. Adding a RGB attribute at location 3 normalized from unsigned byte to float with one byte padding at the end (or, in other words, stride of four bytes) could then look like this: -@snippet MagnumGL.cpp Mesh-dynamic +@snippet GL.cpp Mesh-dynamic The @ref DynamicAttribute also allows @ref VertexFormat to be used for specifying attribute types instead of the rather verbose @@ -376,7 +376,7 @@ specifying attribute types instead of the rather verbose @relativeref{GL::Attribute,DataOptions} tuple that GL itself accepts. The above packed position + normal attribute specification would then look like this: -@snippet MagnumGL.cpp Mesh-formats-vertexformat +@snippet GL.cpp Mesh-formats-vertexformat @subsection GL-Mesh-buffer-ownership Transferring buffer ownership @@ -388,20 +388,20 @@ a @ref Buffer as a rvalue. While this allows you to discard the buffer instances and pass just the mesh around, it also means you lose a way to access or update the buffers afterwards. -@snippet MagnumGL.cpp Mesh-buffer-ownership +@snippet GL.cpp Mesh-buffer-ownership If adding the same buffer multiple times or using it for both vertex and index data, be sure to transfer the ownership last to avoid the other functions getting only a moved-out instance. For example: -@snippet MagnumGL.cpp Mesh-buffer-ownership-multiple +@snippet GL.cpp Mesh-buffer-ownership-multiple @section GL-Mesh-rendering Rendering meshes With a framebuffer bound and a compatible shader set up, it's only a matter of calling @ref AbstractShaderProgram::draw(): -@snippet MagnumGL.cpp Mesh-draw +@snippet GL.cpp Mesh-draw @section GL-Mesh-webgl-restrictions WebGL restrictions @@ -866,14 +866,14 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { * accepts only a position and a normal, so you have to skip the weight * and the texture coordinate in each vertex: * - * @snippet MagnumGL.cpp Mesh-addVertexBuffer1 + * @snippet GL.cpp Mesh-addVertexBuffer1 * * You can also achieve the same effect by calling @ref addVertexBuffer() * more times with explicitly specified gaps before and after the * attributes. This can be used for e.g. runtime-dependent * configuration, as it isn't dependent on the variadic template: * - * @snippet MagnumGL.cpp Mesh-addVertexBuffer2 + * @snippet GL.cpp Mesh-addVertexBuffer2 * * If specifying more than one attribute, the function assumes that * the array is interleaved. Adding non-interleaved vertex buffer can @@ -881,7 +881,7 @@ class MAGNUM_GL_EXPORT Mesh: public AbstractObject { * Above example with the position and normal arrays one after another * (non-interleaved): * - * @snippet MagnumGL.cpp Mesh-addVertexBuffer3 + * @snippet GL.cpp Mesh-addVertexBuffer3 * * If @gl_extension{ARB,vertex_array_object} (part of OpenGL 3.0), OpenGL * ES 3.0, WebGL 2.0, @gl_extension{OES,vertex_array_object} in OpenGL diff --git a/src/Magnum/GL/MultisampleTexture.h b/src/Magnum/GL/MultisampleTexture.h index 1652b8bc9..da9ed1119 100644 --- a/src/Magnum/GL/MultisampleTexture.h +++ b/src/Magnum/GL/MultisampleTexture.h @@ -78,7 +78,7 @@ also @ref AbstractTexture documentation for more information. As multisample textures have no sampler state, the only thing you need is to set storage: -@snippet MagnumGL.cpp MultisampleTexture-usage +@snippet GL.cpp MultisampleTexture-usage In shader, the texture is used via @glsl sampler2DMS @ce / @glsl sampler2DMSArray @ce, @glsl isampler2DMS @ce / @glsl isampler2DMSArray @ce or @glsl usampler2DMS @ce diff --git a/src/Magnum/GL/OpenGLTester.h b/src/Magnum/GL/OpenGLTester.h index 8cde0e6bf..57230d6d2 100644 --- a/src/Magnum/GL/OpenGLTester.h +++ b/src/Magnum/GL/OpenGLTester.h @@ -299,7 +299,7 @@ class OpenGLTester: public TestSuite::Tester { Equivalent to -@snippet MagnumGL.cpp OpenGLTester-MAGNUM_VERIFY_NO_GL_ERROR +@snippet GL.cpp OpenGLTester-MAGNUM_VERIFY_NO_GL_ERROR */ #define MAGNUM_VERIFY_NO_GL_ERROR() CORRADE_COMPARE(Magnum::GL::Renderer::error(), Magnum::GL::Renderer::Error::NoError) diff --git a/src/Magnum/GL/PrimitiveQuery.h b/src/Magnum/GL/PrimitiveQuery.h index 8bc0288b8..372618a23 100644 --- a/src/Magnum/GL/PrimitiveQuery.h +++ b/src/Magnum/GL/PrimitiveQuery.h @@ -42,7 +42,7 @@ namespace Magnum { namespace GL { Queries count of generated primitives from vertex shader, geometry shader or transform feedback. Example usage: -@snippet MagnumGL.cpp PrimitiveQuery-usage +@snippet GL.cpp PrimitiveQuery-usage @see @ref PipelineStatisticsQuery, @ref SampleQuery, @ref TimeQuery, @ref TransformFeedback diff --git a/src/Magnum/GL/RectangleTexture.h b/src/Magnum/GL/RectangleTexture.h index d73325b8e..896043cd3 100644 --- a/src/Magnum/GL/RectangleTexture.h +++ b/src/Magnum/GL/RectangleTexture.h @@ -54,7 +54,7 @@ See also @ref AbstractTexture documentation for more information. Common usage is to fully configure all texture parameters and then set the data from e.g. @ref Image2D. Example configuration: -@snippet MagnumGL.cpp RectangleTexture-usage +@snippet GL.cpp RectangleTexture-usage In a shader, the texture is used via @glsl sampler2DRect @ce, @glsl sampler2DRectShadow @ce, @glsl isampler2DRect @ce or @glsl usampler2DRect @ce. @@ -393,7 +393,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-image1 + * @snippet GL.cpp RectangleTexture-image1 */ Image2D image(Image2D&& image); @@ -425,7 +425,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-image2 + * @snippet GL.cpp RectangleTexture-image2 */ BufferImage2D image(BufferImage2D&& image, BufferUsage usage); @@ -445,7 +445,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-compressedImage1 + * @snippet GL.cpp RectangleTexture-compressedImage1 */ CompressedImage2D compressedImage(CompressedImage2D&& image); @@ -480,7 +480,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-compressedImage2 + * @snippet GL.cpp RectangleTexture-compressedImage2 */ CompressedBufferImage2D compressedImage(CompressedBufferImage2D&& image, BufferUsage usage); @@ -499,7 +499,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-subImage1 + * @snippet GL.cpp RectangleTexture-subImage1 */ Image2D subImage(const Range2Di& range, Image2D&& image); @@ -532,7 +532,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-subImage2 + * @snippet GL.cpp RectangleTexture-subImage2 */ BufferImage2D subImage(const Range2Di& range, BufferImage2D&& image, BufferUsage usage); @@ -557,7 +557,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-compressedSubImage1 + * @snippet GL.cpp RectangleTexture-compressedSubImage1 */ CompressedImage2D compressedSubImage(const Range2Di& range, CompressedImage2D&& image); @@ -597,7 +597,7 @@ class MAGNUM_GL_EXPORT RectangleTexture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp RectangleTexture-compressedSubImage2 + * @snippet GL.cpp RectangleTexture-compressedSubImage2 */ CompressedBufferImage2D compressedSubImage(const Range2Di& range, CompressedBufferImage2D&& image, BufferUsage usage); diff --git a/src/Magnum/GL/Renderer.h b/src/Magnum/GL/Renderer.h index 9cc4ae81e..b2ad89bb4 100644 --- a/src/Magnum/GL/Renderer.h +++ b/src/Magnum/GL/Renderer.h @@ -602,7 +602,7 @@ class MAGNUM_GL_EXPORT Renderer { * * Convenience equivalent to the following: * - * @snippet MagnumGL.cpp Renderer-setFeature + * @snippet GL.cpp Renderer-setFeature * * Prefer to use @ref enable() and @ref disable() directly to avoid * unnecessary branching. @@ -1875,7 +1875,7 @@ class MAGNUM_GL_EXPORT Renderer { * whether your colors / textures have a [premultiplied alpha](https://developer.nvidia.com/content/alpha-blending-pre-or-not-pre) * (RGB channels always less than or equal to the alpha) or not: * - * @snippet MagnumGL.cpp Renderer-setBlendFunction + * @snippet GL.cpp Renderer-setBlendFunction * * Note that in 3D you need to sort and render transparent objects * back-to-front after all opaque objects in order for them to appear diff --git a/src/Magnum/GL/SampleQuery.h b/src/Magnum/GL/SampleQuery.h index 26d71d591..2e24503dc 100644 --- a/src/Magnum/GL/SampleQuery.h +++ b/src/Magnum/GL/SampleQuery.h @@ -43,7 +43,7 @@ Queries count of samples passed from fragment shader or boolean value indicating whether any samples passed. Can be used for example for conditional rendering: -@snippet MagnumGL.cpp SampleQuery-usage +@snippet GL.cpp SampleQuery-usage This approach has some drawbacks, as the rendering is blocked until result is available for the CPU to decide. This can be improved by using conditional @@ -51,7 +51,7 @@ rendering on GPU itself. The drawing commands will be sent to the GPU and processed or discarded later, so CPU can continue executing the code without waiting for the result. -@snippet MagnumGL.cpp SampleQuery-conditional-render +@snippet GL.cpp SampleQuery-conditional-render @see @ref PipelineStatisticsQuery, @ref PrimitiveQuery, @ref TimeQuery @requires_gles30 Extension @gl_extension{EXT,occlusion_query_boolean} in diff --git a/src/Magnum/GL/Texture.h b/src/Magnum/GL/Texture.h index 66efdc30d..364eb764d 100644 --- a/src/Magnum/GL/Texture.h +++ b/src/Magnum/GL/Texture.h @@ -73,7 +73,7 @@ Common usage is to fully configure all texture parameters and then set the data from e.g. @ref Image. Example configuration of high quality texture with trilinear anisotropic filtering, i.e. the best you can ask for: -@snippet MagnumGL.cpp Texture-usage +@snippet GL.cpp Texture-usage @attention Note that default configuration is to use mipmaps. Be sure to either reduce mip level count using @ref setBaseLevel() and @ref setMaxLevel(), @@ -704,7 +704,7 @@ Texture: public AbstractTexture { * @cpp '1' @ce for zero and one, similarly as in the * @ref Math::gather() function. Example usage: * - * @snippet MagnumGL.cpp Texture-setSwizzle + * @snippet GL.cpp Texture-setSwizzle * * If @gl_extension{ARB,direct_state_access} (part of OpenGL 4.5) is * not available, the texture is bound before the operation (if not @@ -888,7 +888,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-image1 + * @snippet GL.cpp Texture-image1 */ Image image(Int level, Image&& image); @@ -929,7 +929,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-image2 + * @snippet GL.cpp Texture-image2 */ BufferImage image(Int level, BufferImage&& image, BufferUsage usage); @@ -974,7 +974,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-compressedImage1 + * @snippet GL.cpp Texture-compressedImage1 */ CompressedImage compressedImage(Int level, CompressedImage&& image); @@ -1018,7 +1018,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-compressedImage2 + * @snippet GL.cpp Texture-compressedImage2 */ CompressedBufferImage compressedImage(Int level, CompressedBufferImage&& image, BufferUsage usage); @@ -1050,7 +1050,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-subImage1 + * @snippet GL.cpp Texture-subImage1 */ Image subImage(Int level, const RangeTypeFor& range, Image&& image); @@ -1092,7 +1092,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-subImage2 + * @snippet GL.cpp Texture-subImage2 */ BufferImage subImage(Int level, const RangeTypeFor& range, BufferImage&& image, BufferUsage usage); @@ -1135,7 +1135,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-compressedSubImage1 + * @snippet GL.cpp Texture-compressedSubImage1 */ CompressedImage compressedSubImage(Int level, const RangeTypeFor& range, CompressedImage&& image); @@ -1182,7 +1182,7 @@ Texture: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp Texture-compressedSubImage2 + * @snippet GL.cpp Texture-compressedSubImage2 */ CompressedBufferImage compressedSubImage(Int level, const RangeTypeFor& range, CompressedBufferImage&& image, BufferUsage usage); #endif diff --git a/src/Magnum/GL/TextureArray.h b/src/Magnum/GL/TextureArray.h index 944fc76c4..4a7894a77 100644 --- a/src/Magnum/GL/TextureArray.h +++ b/src/Magnum/GL/TextureArray.h @@ -66,13 +66,13 @@ See @ref Texture documentation for introduction. Common usage is to fully configure all texture parameters and then set the data. Example configuration: -@snippet MagnumGL.cpp TextureArray-usage1 +@snippet GL.cpp TextureArray-usage1 It is often more convenient to first allocate the memory for all layers by calling @ref setStorage() and then specify each layer separately using @ref setSubImage(): -@snippet MagnumGL.cpp TextureArray-usage2 +@snippet GL.cpp TextureArray-usage2 In shader, the texture is used via @glsl sampler1DArray @ce / @glsl sampler2DArray @ce, @glsl sampler1DArrayShadow @ce / @glsl sampler1DArrayShadow @ce, @glsl isampler1DArray @ce @@ -620,7 +620,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-image1 + * @snippet GL.cpp TextureArray-image1 */ Image image(Int level, Image&& image); @@ -656,7 +656,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-image2 + * @snippet GL.cpp TextureArray-image2 */ BufferImage image(Int level, BufferImage&& image, BufferUsage usage); @@ -681,7 +681,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-compressedImage1 + * @snippet GL.cpp TextureArray-compressedImage1 */ CompressedImage compressedImage(Int level, CompressedImage&& image); @@ -720,7 +720,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-compressedImage2 + * @snippet GL.cpp TextureArray-compressedImage2 */ CompressedBufferImage compressedImage(Int level, CompressedBufferImage&& image, BufferUsage usage); @@ -744,7 +744,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-subImage1 + * @snippet GL.cpp TextureArray-subImage1 */ Image subImage(Int level, const RangeTypeFor& range, Image&& image); @@ -781,7 +781,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-subImage2 + * @snippet GL.cpp TextureArray-subImage2 */ BufferImage subImage(Int level, const RangeTypeFor& range, BufferImage&& image, BufferUsage usage); @@ -811,7 +811,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-compressedSubImage1 + * @snippet GL.cpp TextureArray-compressedSubImage1 */ CompressedImage compressedSubImage(Int level, const RangeTypeFor& range, CompressedImage&& image); @@ -854,7 +854,7 @@ TextureArray: public AbstractTexture { * * Convenience alternative to the above, example usage: * - * @snippet MagnumGL.cpp TextureArray-compressedSubImage2 + * @snippet GL.cpp TextureArray-compressedSubImage2 */ CompressedBufferImage compressedSubImage(Int level, const RangeTypeFor& range, CompressedBufferImage&& image, BufferUsage usage); #endif diff --git a/src/Magnum/GL/TimeQuery.h b/src/Magnum/GL/TimeQuery.h index e36539e7f..3b209be88 100644 --- a/src/Magnum/GL/TimeQuery.h +++ b/src/Magnum/GL/TimeQuery.h @@ -40,9 +40,9 @@ Queries timestamp after all previous OpenGL calls have been processed. It can query either duration of sequence of commands or absolute timestamp. Example usage of both methods: -@snippet MagnumGL.cpp TimeQuery-usage1 +@snippet GL.cpp TimeQuery-usage1 -@snippet MagnumGL.cpp TimeQuery-usage2 +@snippet GL.cpp TimeQuery-usage2 Using the latter results in fewer OpenGL calls when doing more measures. All times are reported in nanoseconds. diff --git a/src/Magnum/MaterialTools/RemoveDuplicates.h b/src/Magnum/MaterialTools/RemoveDuplicates.h index 4f2ad4b83..678a371f3 100644 --- a/src/Magnum/MaterialTools/RemoveDuplicates.h +++ b/src/Magnum/MaterialTools/RemoveDuplicates.h @@ -66,7 +66,7 @@ The output index array can be passed to @ref SceneTools::mapIndexField() to update a @ref Trade::SceneField::MeshMaterial field to reference only the unique materials. For example: -@snippet MagnumMaterialTools.cpp removeDuplicatesInPlace +@snippet MaterialTools.cpp removeDuplicatesInPlace @see @ref removeDuplicatesInPlaceInto() */ diff --git a/src/Magnum/Math/Algorithms/KahanSum.h b/src/Magnum/Math/Algorithms/KahanSum.h index bec124556..3eb0ab280 100644 --- a/src/Magnum/Math/Algorithms/KahanSum.h +++ b/src/Magnum/Math/Algorithms/KahanSum.h @@ -52,14 +52,14 @@ significantly reduces numerical error in the total. See the article on Wikipedia for an in-depth explanation. Example with summation of a hundred million ones: -@snippet MagnumMathAlgorithms.cpp kahanSum +@snippet MathAlgorithms.cpp kahanSum If required, it is also possible to use this algorithm on non-contiguous ranges or single values (for example when calculating sum of pixel values in an image with some row padding or when the inputs are generated / converted from other values): -@snippet MagnumMathAlgorithms.cpp kahanSum-iterative +@snippet MathAlgorithms.cpp kahanSum-iterative */ template())>::type> T kahanSum(Iterator begin, Iterator end, T sum = T(0), T* compensation = nullptr) { T c = compensation ? *compensation : T(0); diff --git a/src/Magnum/Math/Algorithms/Svd.h b/src/Magnum/Math/Algorithms/Svd.h index c618e3178..bba4c8ab9 100644 --- a/src/Magnum/Math/Algorithms/Svd.h +++ b/src/Magnum/Math/Algorithms/Svd.h @@ -72,7 +72,7 @@ Full @f$ \boldsymbol{U} @f$, @f$ \boldsymbol{\Sigma} @f$ matrices and original @f$ \boldsymbol{M} @f$ matrix can be reconstructed from the values as following: -@snippet MagnumMathAlgorithms.cpp svd +@snippet MathAlgorithms.cpp svd One possible use is to decompose a transformation matrix into separate rotation and scaling parts. Note, however, that the decomposition is not unique. See the diff --git a/src/Magnum/Math/Angle.h b/src/Magnum/Math/Angle.h index 2a3c793e3..91a9cf1ba 100644 --- a/src/Magnum/Math/Angle.h +++ b/src/Magnum/Math/Angle.h @@ -51,28 +51,28 @@ and conversion less error-prone. You can create the value either by using a literal: -@snippet MagnumMath.cpp Deg-usage +@snippet Math.cpp Deg-usage Or explicitly convert a unitless value (such as an output from some function) to either degrees or radians: -@snippet MagnumMath.cpp Deg-usage-convert +@snippet Math.cpp Deg-usage-convert The classes support all arithmetic operations, such as addition, subtraction or multiplication/division by a unitless number: -@snippet MagnumMath.cpp Deg-usage-operations +@snippet Math.cpp Deg-usage-operations It is also possible to compare angles with all comparison operators, but comparison of degrees and radians is not possible without explicit conversion to a common type: -@snippet MagnumMath.cpp Deg-usage-comparison +@snippet Math.cpp Deg-usage-comparison It is possible to seamlessly convert between degrees and radians and explicitly convert the value back to the underlying type: -@snippet MagnumMath.cpp Deg-usage-conversion +@snippet Math.cpp Deg-usage-conversion @section Math-Angle-explicit-conversion Requirement of explicit conversion @@ -93,7 +93,7 @@ std::sin(b); // silent error, std::sin() expected radians These silent errors are easily avoided by requiring explicit conversions: -@snippet MagnumMath.cpp Deg-usage-explicit-conversion +@snippet Math.cpp Deg-usage-explicit-conversion @see @link Literals::AngleLiterals::operator""_degf() @endlink, @link Literals::AngleLiterals::operator""_deg() @endlink, @ref Magnum::Deg, @@ -162,7 +162,7 @@ namespace Literals { Example usage: -@snippet MagnumMath.cpp _deg +@snippet Math.cpp _deg @see @link operator""_degf() @endlink, @link operator""_rad() @endlink @m_keywords{_deg deg} @@ -174,7 +174,7 @@ constexpr Deg operator "" _deg(long double value) { return Deg(D Example usage: -@snippet MagnumMath.cpp _degf +@snippet Math.cpp _degf @see @link operator""_deg() @endlink, @link operator""_radf() @endlink @m_keywords{_degf degf} diff --git a/src/Magnum/Math/BitVector.h b/src/Magnum/Math/BitVector.h index 990fe2b9d..2046615a7 100644 --- a/src/Magnum/Math/BitVector.h +++ b/src/Magnum/Math/BitVector.h @@ -66,7 +66,7 @@ Value at position 0 is the lowest bit of the first byte passed in constructor. Value at position 8 is the lowest bit of the second byte passed in constructor. For example: -@snippet MagnumMath-cpp14.cpp BitVector-indexing +@snippet Math-cpp14.cpp BitVector-indexing @section Math-BitVector-boolean Boolean operations @@ -80,7 +80,7 @@ returning @cpp true @ce only if all bits are set, this means the condition will be passed only if @cpp b @ce is around @cpp a @ce in *all dimensions*, and work the same way as if the variables were just scalars: -@snippet MagnumMath.cpp BitVector-boolean +@snippet Math.cpp BitVector-boolean @see @ref Magnum::BitVector2, @ref Magnum::BitVector3, @ref Magnum::BitVector4 */ @@ -339,7 +339,7 @@ template class BitVector { In order to avoid potential confusion, prints the value as a comma-separated sequence of binary literals, so the output corresponds to how the value would be constructed. For example, -@snippet MagnumMath-cpp14.cpp BitVector-debug +@snippet Math-cpp14.cpp BitVector-debug diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index 84804345e..3b58fa2ec 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -293,7 +293,7 @@ instead. For convenience, conversion from and to 8bpp representation without sRGB conversion is possible with @ref fromLinearRgbInt() and @ref toLinearRgbInt(). -@snippet MagnumMath.cpp Color3 +@snippet Math.cpp Color3 Conversion from and to HSV is done always using floating-point types, so hue is always in range in range @f$ [0.0\degree, 360.0\degree] @f$, saturation and @@ -429,12 +429,12 @@ template class Color3: public Vector3 { * representation and want to create a floating-point linear RGB color * out of it: * - * @snippet MagnumMath.cpp Color3-fromSrgb + * @snippet Math.cpp Color3-fromSrgb * * For conversion from a *linear* 24-bit representation (i.e, without * applying the sRGB curve), use @ref unpack(): * - * @snippet MagnumMath.cpp Color3-unpack + * @snippet Math.cpp Color3-unpack * * @see @ref fromSrgbInt(), @link operator""_srgbf() @endlink, * @ref Color4::fromSrgbAlpha(const Vector4&) @@ -455,7 +455,7 @@ template class Color3: public Vector3 { * that does this conversion directly from hexadecimal literals. The * following two statements are equivalent: * - * @snippet MagnumMath.cpp Color3-fromSrgbInt + * @snippet Math.cpp Color3-fromSrgbInt * * Note that the integral value is endian-dependent (the red channel * being in the *last* byte on little-endian platforms), for conversion @@ -490,7 +490,7 @@ template class Color3: public Vector3 { * conversion directly from hexadecimal literals. The following two * statements are equivalent: * - * @snippet MagnumMath.cpp Color3-fromLinearRgbInt + * @snippet Math.cpp Color3-fromLinearRgbInt * * Note that the integral value is endian-dependent (the red channel * being in the *last* byte on little-endian platforms), for conversion @@ -646,12 +646,12 @@ template class Color3: public Vector3 { * Useful in cases where you have a floating-point linear RGB color and * want to create for example an 8-bit sRGB representation out of it: * - * @snippet MagnumMath.cpp Color3-toSrgb + * @snippet Math.cpp Color3-toSrgb * * For conversion to a *linear* 24-bit representation (i.e, without * applying the sRGB curve), use @ref pack(): * - * @snippet MagnumMath.cpp Color3-pack + * @snippet Math.cpp Color3-pack * * @see @ref toSrgbInt(), @ref Color4::toSrgbAlpha(), * @ref toLinearRgbInt() @@ -841,12 +841,12 @@ class Color4: public Vector4 { * representation and want to create a floating-point linear RGBA color * out of it: * - * @snippet MagnumMath.cpp Color4-fromSrgbAlpha + * @snippet Math.cpp Color4-fromSrgbAlpha * * For conversion from a *linear* 32-bit representation (i.e, without * applying the sRGB curve), use @ref unpack(): * - * @snippet MagnumMath.cpp Color4-unpack + * @snippet Math.cpp Color4-unpack * * @see @ref fromSrgbAlphaInt(UnsignedInt) */ @@ -901,7 +901,7 @@ class Color4: public Vector4 { * directly from hexadecimal literals. The following two statements are * equivalent: * - * @snippet MagnumMath.cpp Color4-fromSrgbAlphaInt + * @snippet Math.cpp Color4-fromSrgbAlphaInt * * Note that the integral value is endian-dependent (the red channel * being in the *last* byte on little-endian platforms), for conversion @@ -961,7 +961,7 @@ class Color4: public Vector4 { * does this conversion directly from hexadecimal literals. The * following two statements are equivalent: * - * @snippet MagnumMath.cpp Color4-fromLinearRgbaInt + * @snippet Math.cpp Color4-fromLinearRgbaInt * * Note that the integral value is endian-dependent (the red channel * being in the *last* byte on little-endian platforms), for conversion @@ -1117,12 +1117,12 @@ class Color4: public Vector4 { * and want to create for example an 8-bit sRGB + alpha representation * out of it: * - * @snippet MagnumMath.cpp Color4-toSrgbAlpha + * @snippet Math.cpp Color4-toSrgbAlpha * * For conversion to a *linear* 32-bit representation (i.e, without * applying the sRGB curve), use @ref pack(): * - * @snippet MagnumMath.cpp Color4-pack + * @snippet Math.cpp Color4-pack * * @see @ref toSrgbAlphaInt(), @ref toLinearRgbaInt() */ @@ -1324,7 +1324,7 @@ namespace Literals { Unpacks the literal into three 8-bit values. Example usage: -@snippet MagnumMath.cpp _rgb +@snippet Math.cpp _rgb @attention 8bit-per-channel colors are commonly treated as being in sRGB color space, which is not directly usable in calculations and has to be converted @@ -1346,7 +1346,7 @@ Behaves identically to @link operator""_rgb() @endlink though it doesn't return a @ref Color3 type to indicate that the resulting value is not linear RGB. Use this literal to document that given value is in sRGB. Example usage: -@snippet MagnumMath.cpp _srgb +@snippet Math.cpp _srgb @attention Note that colors in sRGB representation should not be used directly in calculations --- they should be converted to linear RGB, calculation @@ -1369,7 +1369,7 @@ constexpr Vector3 operator "" _srgb(unsigned long long value) { Unpacks the literal into four 8-bit values. Example usage: -@snippet MagnumMath.cpp _rgba +@snippet Math.cpp _rgba @attention 8bit-per-channel colors are commonly treated as being in sRGB color space, which is not directly usable in calculations and has to be converted @@ -1392,7 +1392,7 @@ return a @ref Color4 type to indicate that the resulting value is not linear RGBA. Use this literal to document that given value is in sRGB + alpha. Example usage: -@snippet MagnumMath.cpp _srgba +@snippet Math.cpp _srgba @attention Note that colors in sRGB representation should not be used directly in calculations --- they should be converted to linear RGB, calculation @@ -1416,7 +1416,7 @@ constexpr Vector4 operator "" _srgba(unsigned long long value) { Equivalent to calling @ref Color3::fromLinearRgbInt() on the literal value. Example usage: -@snippet MagnumMath.cpp _rgbf +@snippet Math.cpp _rgbf @attention 8bit-per-channel colors are commonly treated as being in sRGB color space, which is not directly usable in calculations and has to be converted @@ -1437,7 +1437,7 @@ constexpr Color3 operator "" _rgbf(unsigned long long value) { Calls @ref Color3::fromSrgbInt() on the literal value. Example usage: -@snippet MagnumMath.cpp _srgbf +@snippet Math.cpp _srgbf @see @link operator""_srgbaf() @endlink, @link operator""_srgb() @endlink, @link operator""_rgbf() @endlink @@ -1453,7 +1453,7 @@ inline Color3 operator "" _srgbf(unsigned long long value) { Equivalent to calling @ref Color4::fromLinearRgbaInt() on the literal value. Example usage: -@snippet MagnumMath.cpp _rgbaf +@snippet Math.cpp _rgbaf @attention 8bit-per-channel colors are commonly treated as being in sRGB color space, which is not directly usable in calculations and has to be converted @@ -1475,7 +1475,7 @@ constexpr Color4 operator "" _rgbaf(unsigned long long value) { Calls @ref Color4::fromSrgbAlphaInt() on the literal value. Example usage: -@snippet MagnumMath.cpp _srgbaf +@snippet Math.cpp _srgbaf @see @link operator""_srgbf() @endlink, @link operator""_srgba() @endlink, @link operator""_rgbaf() @endlink @@ -1508,7 +1508,7 @@ If @ref Debug::Flag::Color is not enabled, the value is printed as a hex color For example, the following snippet: -@snippet MagnumMath.cpp Color3-debug +@snippet Math.cpp Color3-debug @@ -1541,7 +1541,7 @@ If @ref Debug::Flag::Color is not enabled, the value is printed as a hex color For example, the following snippet: -@snippet MagnumMath.cpp Color4-debug +@snippet Math.cpp Color4-debug diff --git a/src/Magnum/Math/CubicHermite.h b/src/Magnum/Math/CubicHermite.h index abb1481c2..ac5bf5b27 100644 --- a/src/Magnum/Math/CubicHermite.h +++ b/src/Magnum/Math/CubicHermite.h @@ -82,7 +82,7 @@ template class CubicHermite { * the end of a curve, simply pass a dummy Bézier segment that * satisfies this constraint as the other parameter: * - * @snippet MagnumMath.cpp CubicHermite-fromBezier + * @snippet Math.cpp CubicHermite-fromBezier * * Enabled only on vector underlying types. See * @ref Bezier::fromCubicHermite() for the inverse operation. diff --git a/src/Magnum/Math/Dual.h b/src/Magnum/Math/Dual.h index 5d49e8891..cdfaf06f3 100644 --- a/src/Magnum/Math/Dual.h +++ b/src/Magnum/Math/Dual.h @@ -116,7 +116,7 @@ template class Dual { * Performs only default casting on the values, no rounding or anything * else. Example usage: * - * @snippet MagnumMath.cpp Dual-conversion + * @snippet Math.cpp Dual-conversion */ template constexpr explicit Dual(const Dual& other) noexcept: _real{T(other._real)}, _dual{T(other._dual)} {} diff --git a/src/Magnum/Math/Frustum.h b/src/Magnum/Math/Frustum.h index b70d5b4e6..84003c5bb 100644 --- a/src/Magnum/Math/Frustum.h +++ b/src/Magnum/Math/Frustum.h @@ -202,7 +202,7 @@ template class Frustum { * to check for a point/frustum intersection, similarly to * @ref Intersection::pointFrustum(): * - * @snippet MagnumMath.cpp Frustum-range + * @snippet Math.cpp Frustum-range */ Vector4* begin() { return _data; } diff --git a/src/Magnum/Math/Functions.h b/src/Magnum/Math/Functions.h index 46dd7402d..8040f894f 100644 --- a/src/Magnum/Math/Functions.h +++ b/src/Magnum/Math/Functions.h @@ -71,11 +71,11 @@ namespace Implementation { Example usage: -@snippet MagnumMath.cpp div +@snippet Math.cpp div Equivalent to the following, but possibly done in a single CPU instruction: -@snippet MagnumMath.cpp div-equivalent +@snippet Math.cpp div-equivalent */ template inline Containers::Pair div(Integral x, Integral y) { static_assert(IsIntegral::value && IsScalar::value, @@ -368,7 +368,7 @@ template inline Containers::Pair, Vec Values smaller than @p min are set to @p min, values larger than @p max are set to @p max. Equivalent to: -@snippet MagnumMath.cpp clamp +@snippet Math.cpp clamp NaNs passed in @p value parameter are propagated. @see @ref min(), @ref max() @@ -569,7 +569,7 @@ another --- for example, the following snippet maps `a` from a range @f$ [ -1; +1 ] @f$ to a range @f$ [ 5\degree; 15\degree ] @f$; the second expression combines that with @ref clamp() to ensure the value is in bounds: -@snippet MagnumMath.cpp lerpInverted-map +@snippet Math.cpp lerpInverted-map @see @ref select() */ diff --git a/src/Magnum/Math/Half.h b/src/Magnum/Math/Half.h index 1ebd3ddb4..b265b983d 100644 --- a/src/Magnum/Math/Half.h +++ b/src/Magnum/Math/Half.h @@ -63,13 +63,13 @@ negation operator, a @link Literals::HalfLiterals::operator""_h() @endlink literal and an @ref operator<<(Debug&, Half) debug operator. Internally the class uses @ref packHalf() and @ref unpackHalf(). Example usage: -@snippet MagnumMath.cpp Half-usage +@snippet Math.cpp Half-usage Note that it is also possible to use this type inside @ref Vector classes, though, again, only for passing data around and converting them, without any arithmetic operations: -@snippet MagnumMath.cpp Half-usage-vector +@snippet Math.cpp Half-usage-vector @see @ref Magnum::Half */ diff --git a/src/Magnum/Math/Intersection.h b/src/Magnum/Math/Intersection.h index 60208239b..cd4ac081f 100644 --- a/src/Magnum/Math/Intersection.h +++ b/src/Magnum/Math/Intersection.h @@ -298,7 +298,7 @@ template bool pointCone(const Vector3& point, const Vector3& cone The @p tanAngleSqPlusOne parameter can be precomputed like this: -@snippet MagnumMath.cpp Intersection-tanAngleSqPlusOne +@snippet Math.cpp Intersection-tanAngleSqPlusOne */ template bool pointCone(const Vector3& point, const Vector3& coneOrigin, const Vector3& coneNormal, T tanAngleSqPlusOne); @@ -327,7 +327,7 @@ template bool pointDoubleCone(const Vector3& point, const Vector3 The @p tanAngleSqPlusOne parameter can be precomputed like this: -@snippet MagnumMath.cpp Intersection-tanAngleSqPlusOne +@snippet Math.cpp Intersection-tanAngleSqPlusOne */ template bool pointDoubleCone(const Vector3& point, const Vector3& coneOrigin, const Vector3& coneNormal, T tanAngleSqPlusOne); @@ -359,7 +359,7 @@ Transforms the sphere center into cone space (using the cone view matrix) and performs sphere-cone intersection with the zero-origin -Z axis-aligned cone. The @p sinAngle and @p tanAngle can be precomputed like this: -@snippet MagnumMath.cpp Intersection-sinAngle-tanAngle +@snippet Math.cpp Intersection-sinAngle-tanAngle @see @ref MeshTools::boundingSphereBouncingBubble() */ @@ -400,7 +400,7 @@ normal direction), and behind the plane, where the test is equivalent to testing whether the origin of the original cone intersects the sphere. The @p sinAngle and @p tanAngleSqPlusOne parameters can be precomputed like this: -@snippet MagnumMath.cpp Intersection-sinAngle-tanAngleSqPlusOne +@snippet Math.cpp Intersection-sinAngle-tanAngleSqPlusOne @see @ref MeshTools::boundingSphereBouncingBubble() */ @@ -446,7 +446,7 @@ cone's axis and are tested for intersection with the cone using The @p tanAngleSqPlusOne parameter can be precomputed like this: -@snippet MagnumMath.cpp Intersection-tanAngleSqPlusOne +@snippet Math.cpp Intersection-tanAngleSqPlusOne */ template bool aabbCone(const Vector3& aabbCenter, const Vector3& aabbExtents, const Vector3& coneOrigin, const Vector3& coneNormal, T tanAngleSqPlusOne); @@ -478,7 +478,7 @@ Converts the range into center/extents representation and passes it on to @ref aabbCone(const Vector3&, const Vector3&, const Vector3&, const Vector3&, T) "aabbCone()". The @p tanAngleSqPlusOne parameter can be precomputed like this: -@snippet MagnumMath.cpp Intersection-tanAngleSqPlusOne +@snippet Math.cpp Intersection-tanAngleSqPlusOne */ template bool rangeCone(const Range3D& range, const Vector3& coneOrigin, const Vector3& coneNormal, const T tanAngleSqPlusOne); diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index f59b53301..ff082747f 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -95,7 +95,7 @@ template class Matrix: public RectangularMatrix constexpr explicit Matrix(const RectangularMatrix& other) noexcept: RectangularMatrix(other) {} diff --git a/src/Magnum/Math/Matrix3.h b/src/Magnum/Math/Matrix3.h index 245b19229..1957bbee9 100644 --- a/src/Magnum/Math/Matrix3.h +++ b/src/Magnum/Math/Matrix3.h @@ -74,7 +74,7 @@ recommended usage is by creating elementary transformation matrices with and multiplying them together to form the final transformation --- the rightmost transformation is applied first, leftmost last: -@snippet MagnumMath.cpp Matrix3-usage +@snippet Math.cpp Matrix3-usage Conversely, the transformation parts can be extracted back using the member @ref rotation() const "rotation()", @ref scaling() const "scaling()" and their @@ -440,7 +440,7 @@ template class Matrix3: public Matrix3x3 { * @ref determinant() is negative, and apply the sign flip to the * corresponding scaling component instead: * - * @snippet MagnumMath.cpp Matrix3-rotation-extract-reflection + * @snippet Math.cpp Matrix3-rotation-extract-reflection * * @note Extracting rotation part of a matrix with this function may * cause assertions in case you have unsanitized input (for diff --git a/src/Magnum/Math/Matrix4.h b/src/Magnum/Math/Matrix4.h index ca4bab468..236951150 100644 --- a/src/Magnum/Math/Matrix4.h +++ b/src/Magnum/Math/Matrix4.h @@ -95,7 +95,7 @@ recommended usage is by creating elementary transformation matrices with transformation --- the rightmost transformation is applied first, leftmost last: -@snippet MagnumMath.cpp Matrix4-usage +@snippet Math.cpp Matrix4-usage Conversely, the transformation parts can be extracted back using the member @ref rotation() const "rotation()", @ref scaling() const "scaling()" and their @@ -719,7 +719,7 @@ template class Matrix4: public Matrix4x4 { * @ref determinant() is negative, and apply the sign flip to the * corresponding scaling component instead: * - * @snippet MagnumMath.cpp Matrix4-rotation-extract-reflection + * @snippet Math.cpp Matrix4-rotation-extract-reflection * * @note Extracting rotation part of a matrix with this function may * cause assertions in case you have unsanitized input (for diff --git a/src/Magnum/Math/Packing.h b/src/Magnum/Math/Packing.h index b6b2eca61..89f03560b 100644 --- a/src/Magnum/Math/Packing.h +++ b/src/Magnum/Math/Packing.h @@ -65,7 +65,7 @@ value in range @f$ [0, 1] @f$ or from *signed* integral to range @f$ [-1, 1] @f$ To ensure the integral type is correctly detected when using literals, this function should be called with both template parameters explicit, e.g.: @attention - @snippet MagnumMath.cpp unpack-template-explicit + @snippet Math.cpp unpack-template-explicit @see @ref pack(), @ref unpackInto() */ @@ -77,7 +77,7 @@ template inline FloatingPoint unpack(const Alternative to the above with ability to specify how many bits of the integral representation to use. Example usage: -@snippet MagnumMath.cpp unpack +@snippet Math.cpp unpack */ template inline FloatingPoint unpack(const Integral& value); #else @@ -161,7 +161,7 @@ template inline Integral pack(FloatingPoint value); diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index 19a6e1c30..aded8442f 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -502,7 +502,7 @@ template class Quaternion { * back, you do the following, replace it with an X axis for a zero * angle: * - * @snippet MagnumMath.cpp Quaternion-axis-nan + * @snippet Math.cpp Quaternion-axis-nan * * @see @ref isNormalized(), @ref rotation() */ @@ -523,7 +523,7 @@ template class Quaternion { * Expects that the quaternion is normalized. Returns the angles in an * XYZ order, you can combine them back to a quaternion like this: * - * @snippet MagnumMath.cpp Quaternion-fromEuler + * @snippet Math.cpp Quaternion-fromEuler * * @see @ref rotation(), @ref DualQuaternion::rotation() */ diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 342631f3d..6154f2f6a 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -85,7 +85,7 @@ code that expects a vector type for any dimension. Solution is to unconditionally cast the value to a vector type or explicitly specify template parameters to choose a vector function overload. For example: -@snippet MagnumMath.cpp Range-generic +@snippet Math.cpp Range-generic */ template class Range { template friend class Range; @@ -116,7 +116,7 @@ template class Range { * For creating integer center ranges you can use @ref fromSize() * together with @ref padded(), for example: * - * @snippet MagnumMath.cpp Range-fromCenter-integer + * @snippet Math.cpp Range-fromCenter-integer */ static Range fromCenter(const VectorType& center, const VectorType& halfSize) { return {center - halfSize, center + halfSize}; @@ -153,7 +153,7 @@ template class Range { * Useful in combination with e.g. @ref minmax(), here for example to * calculate bounds of a triangle: * - * @snippet MagnumMath.cpp Range-construct-minmax3D + * @snippet Math.cpp Range-construct-minmax3D */ constexpr /*implicit*/ Range(const Containers::Pair& minmax) noexcept: _min{minmax.first()}, _max{minmax.second()} {} @@ -170,7 +170,7 @@ template class Range { * Performs only default casting on the values, no rounding or * anything else. Example usage: * - * @snippet MagnumMath.cpp Range-conversion + * @snippet Math.cpp Range-conversion */ template constexpr explicit Range(const Range& other) noexcept: _min(other._min), _max(other._max) {} @@ -454,7 +454,7 @@ template class Range2D: public Range<2, T> { * Useful in combination with e.g. @ref minmax(), here for example to * calculate texture bounds: * - * @snippet MagnumMath.cpp Range-construct-minmax2D + * @snippet Math.cpp Range-construct-minmax2D */ constexpr /*implicit*/ Range2D(const Containers::Pair, Vector2>& minmax) noexcept: Range<2, T>{minmax.first(), minmax.second()} {} @@ -605,7 +605,7 @@ template class Range3D: public Range<3, T> { * Useful in combination with e.g. @ref minmax(), here for example to * calculate bounds of a triangle: * - * @snippet MagnumMath.cpp Range-construct-minmax3D + * @snippet Math.cpp Range-construct-minmax3D */ constexpr /*implicit*/ Range3D(const Containers::Pair, Vector3>& minmax) noexcept: Range<3, T>{minmax.first(), minmax.second()} {} diff --git a/src/Magnum/Math/RectangularMatrix.h b/src/Magnum/Math/RectangularMatrix.h index dda34bd42..108710bd9 100644 --- a/src/Magnum/Math/RectangularMatrix.h +++ b/src/Magnum/Math/RectangularMatrix.h @@ -179,7 +179,7 @@ template class RectangularMatrix { * Performs only default casting on the values, no rounding or * anything else. Example usage: * - * @snippet MagnumMath.cpp RectangularMatrix-conversion + * @snippet Math.cpp RectangularMatrix-conversion */ template constexpr explicit RectangularMatrix(const RectangularMatrix& other) noexcept: RectangularMatrix(typename Containers::Implementation::GenerateSequence::Type{}, other) {} @@ -256,7 +256,7 @@ template class RectangularMatrix { * Particular elements can be accessed using @ref Vector::operator[](), * e.g.: * - * @snippet MagnumMath.cpp RectangularMatrix-access + * @snippet Math.cpp RectangularMatrix-access * * @see @ref row(), @ref data() */ diff --git a/src/Magnum/Math/StrictWeakOrdering.h b/src/Magnum/Math/StrictWeakOrdering.h index 9a3258289..19bba610f 100644 --- a/src/Magnum/Math/StrictWeakOrdering.h +++ b/src/Magnum/Math/StrictWeakOrdering.h @@ -50,7 +50,7 @@ set. With it an ordering can be achieved between the elements. This is useful mainly for interoperability with ordering containers from the C++ standard library, like @ref std::map and @link std::set @endlink: -@snippet MagnumMath-stl.cpp StrictWeakOrdering +@snippet Math-stl.cpp StrictWeakOrdering The implementation is done for all types in the @ref Math library, check the source for defails if you want to create an implementation for your own types. diff --git a/src/Magnum/Math/Swizzle.h b/src/Magnum/Math/Swizzle.h index ac35a5bc1..90d931dc1 100644 --- a/src/Magnum/Math/Swizzle.h +++ b/src/Magnum/Math/Swizzle.h @@ -109,7 +109,7 @@ namespace Implementation { Creates a new vector from given components. Example: -@snippet MagnumMath.cpp gather +@snippet Math.cpp gather You can use letters @cpp 'x' @ce, @cpp 'y' @ce, @cpp 'z' @ce, @cpp 'w' @ce and @cpp 'r' @ce, @cpp 'g' @ce, @cpp 'b' @ce, @cpp 'a' @ce for addressing @@ -138,7 +138,7 @@ Returns a copy of @p vector with particular components updated from @p values. Inverse to @ref gather(), supporting the same component addressing except for @cpp '0' @ce and @cpp '1' @ce. Example: -@snippet MagnumMath.cpp scatter +@snippet Math.cpp scatter @see @ref matrix-vector-component-access, @ref Vector4::xyz(), @ref Vector4::rgb(), @ref Vector4::xy(), @ref Vector3::xy() diff --git a/src/Magnum/Math/Time.h b/src/Magnum/Math/Time.h index 266e1e3e8..4ce838d1c 100644 --- a/src/Magnum/Math/Time.h +++ b/src/Magnum/Math/Time.h @@ -60,24 +60,24 @@ You can create the value by using one of the time literals. For all of them the result type is @ref Nanoseconds for preserving maximum precision, but you can directly convert the literal value @link Seconds @endlink: -@snippet MagnumMath.cpp Nanoseconds-usage +@snippet Math.cpp Nanoseconds-usage Or by explicitly converting a unitless value (such as an output from some function) to either nanoseconds or seconds. And same can be done in the other direction: -@snippet MagnumMath-stl.cpp Nanoseconds-usage-convert +@snippet Math-stl.cpp Nanoseconds-usage-convert The classes support all arithmetic operations, such as addition, subtraction or multiplication/division by a unitless number: -@snippet MagnumMath.cpp Nanoseconds-usage-operations +@snippet Math.cpp Nanoseconds-usage-operations It is also possible to compare time values with all comparison operators. As the literals are all producing @ref Nanoseconds, it's most convenient to compare to nanosecond values. Comparison of @ref Nanoseconds and @ref Seconds is not possible without conversion to a common type first. -@snippet MagnumMath.cpp Nanoseconds-usage-comparison +@snippet Math.cpp Nanoseconds-usage-comparison @section Math-Nanoseconds-stl STL compatibility @@ -104,7 +104,7 @@ Magnum type | ↭ | STL type Example: -@snippet MagnumMath-stl.cpp Nanoseconds-usage +@snippet Math-stl.cpp Nanoseconds-usage @@ -116,7 +116,7 @@ Example: it's not possible to provide safe conversion for it. Thus a simple conversion, while it may compile, won't do the right thing: @par - @snippet MagnumMath-stl.cpp Nanoseconds-usage-time + @snippet Math-stl.cpp Nanoseconds-usage-time @see @link Literals::TimeLiterals::operator""_nsec() @endlink, @link Literals::TimeLiterals::operator""_usec() @endlink, @@ -296,7 +296,7 @@ Compared to the microsecond, millisecond and second literals, this literal is an integer value and not a floating-point, as it's not possible to represent fractions of nanoseconds. Usage example: -@snippet MagnumMath.cpp _nsec +@snippet Math.cpp _nsec @see @link operator""_usec() @endlink, @link operator""_msec() @endlink, @link operator""_sec() @endlink @@ -319,7 +319,7 @@ instead. On the other hand, if nanosecond-level precision isn't needed, it's possible to convert directly to @ref Seconds that offer a microsecond-level precision on a range of roughly ±8 seconds. For example: -@snippet MagnumMath.cpp _usec +@snippet Math.cpp _usec @see @link operator""_msec() @endlink, @link operator""_sec() @endlink, @ref CORRADE_LONG_DOUBLE_SAME_AS_DOUBLE @@ -342,7 +342,7 @@ instead. On the other hand, if nanosecond-level precision isn't needed, it's possible to convert directly to @ref Seconds that offer a millisecond-level precision on a range of roughly ±2 hours. For example: -@snippet MagnumMath.cpp _msec +@snippet Math.cpp _msec @see @link operator""_usec() @endlink, @link operator""_sec() @endlink, @ref CORRADE_LONG_DOUBLE_SAME_AS_DOUBLE @@ -365,7 +365,7 @@ instead. On the other hand, if nanosecond-level precision isn't needed, it's possible to convert directly to @ref Seconds that offer a millisecond-level precision on a range of roughly ±2 hours. For example: -@snippet MagnumMath.cpp _sec +@snippet Math.cpp _sec @see @link operator""_usec() @endlink, @link operator""_msec() @endlink, @ref CORRADE_LONG_DOUBLE_SAME_AS_DOUBLE diff --git a/src/Magnum/Math/TypeTraits.h b/src/Magnum/Math/TypeTraits.h index de20885be..e8afb8e65 100644 --- a/src/Magnum/Math/TypeTraits.h +++ b/src/Magnum/Math/TypeTraits.h @@ -389,7 +389,7 @@ template struct TypeTraits: Implementation::TypeTraitsDefault { * the magnitude of original values so the epsilon can be properly scaled. * In other words, the following lines are equivalent: * - * @snippet MagnumMath.cpp TypeTraits-equalsZero + * @snippet Math.cpp TypeTraits-equalsZero */ static bool equalsZero(T a, T magnitude); #endif diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index 4f55f4b4c..8aee3ba35 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -228,7 +228,7 @@ template class Vector { * Performs only default casting on the values, no rounding or * anything else. Example usage: * - * @snippet MagnumMath.cpp Vector-conversion + * @snippet Math.cpp Vector-conversion */ template constexpr explicit Vector(const Vector& other) noexcept: Vector(typename Containers::Implementation::GenerateSequence::Type{}, other) {} @@ -983,13 +983,13 @@ template class Vector { * floating-point value of desired precision, cast to a floating-point * vector first: * - * @snippet MagnumMath.cpp Vector-length-integer + * @snippet Math.cpp Vector-length-integer * * A [Manhattan length](https://en.wikipedia.org/wiki/Taxicab_geometry) * might be more suitable than @ref length() in certain cases where the * square root is undesirable --- it's a sum of absolute values: * - * @snippet MagnumMath.cpp Vector-length-manhattan + * @snippet Math.cpp Vector-length-manhattan * * @see @ref lengthInverted(), @ref Math::sqrt(), @ref normalized(), * @ref resized(), @ref Distance::pointPoint(), @@ -1035,7 +1035,7 @@ template class Vector { * this function is faster than the obvious way of sizing * a @ref normalized() vector. Enabled only for floating-point types. * - * @snippet MagnumMath.cpp Vector-resized + * @snippet Math.cpp Vector-resized * * @see @ref normalized() */ diff --git a/src/Magnum/Math/Vector2.h b/src/Magnum/Math/Vector2.h index 2ba33b8c9..a43d65a85 100644 --- a/src/Magnum/Math/Vector2.h +++ b/src/Magnum/Math/Vector2.h @@ -79,7 +79,7 @@ template class Vector2: public Vector<2, T> { * * Usable for translation in given axis, for example: * - * @snippet MagnumMath.cpp Vector2-xAxis + * @snippet Math.cpp Vector2-xAxis * * @see @ref yAxis(), @ref xScale(), @ref Matrix3::right() */ @@ -98,7 +98,7 @@ template class Vector2: public Vector<2, T> { * * Usable for scaling along given direction, for example: * - * @snippet MagnumMath.cpp Vector2-xScale + * @snippet Math.cpp Vector2-xScale * * @see @ref yScale(), @ref xAxis() */ diff --git a/src/Magnum/Math/Vector3.h b/src/Magnum/Math/Vector3.h index 49fe93ebc..417abe4a5 100644 --- a/src/Magnum/Math/Vector3.h +++ b/src/Magnum/Math/Vector3.h @@ -81,7 +81,7 @@ template class Vector3: public Vector<3, T> { * * Usable for translation or rotation along given axis, for example: * - * @snippet MagnumMath.cpp Vector3-xAxis + * @snippet Math.cpp Vector3-xAxis * * @see @ref yAxis(), @ref zAxis(), @ref xScale(), @ref Color3::red(), * @ref Matrix4::right() @@ -109,7 +109,7 @@ template class Vector3: public Vector<3, T> { * * Usable for scaling along given direction, for example: * - * @snippet MagnumMath.cpp Vector3-xScale + * @snippet Math.cpp Vector3-xScale * * @see @ref yScale(), @ref zScale(), @ref Color3::cyan(), @ref xAxis() */ diff --git a/src/Magnum/MeshTools/CombineIndexedArrays.h b/src/Magnum/MeshTools/CombineIndexedArrays.h index 7bbea38fa..9c25fe83e 100644 --- a/src/Magnum/MeshTools/CombineIndexedArrays.h +++ b/src/Magnum/MeshTools/CombineIndexedArrays.h @@ -168,7 +168,7 @@ avoid explicit verbose specification of tuple type, you can write it with help of some STL functions like shown below. Also if one index array is shared by more than one attribute array, just pass the index array more times. Example: -@snippet MagnumMeshTools.cpp combineIndexedArrays +@snippet MeshTools.cpp combineIndexedArrays See @ref combineIndexArrays() documentation for more information about the procedure. diff --git a/src/Magnum/MeshTools/Compile.h b/src/Magnum/MeshTools/Compile.h index a921d4c75..28e95bd3b 100644 --- a/src/Magnum/MeshTools/Compile.h +++ b/src/Magnum/MeshTools/Compile.h @@ -187,14 +187,14 @@ Assumes the whole vertex / index data are already uploaded to @p indices / index/vertex buffer when multiple @ref Trade::MeshData instances share the same data arrays, or to allow buffer access later. For example: -@snippet MagnumMeshTools-gl.cpp compile-external +@snippet MeshTools-gl.cpp compile-external Another use case is specifying additional vertex attributes that are not recognized by the function itself. You can choose among various r-value overloads depending on whether you want to have the index/vertex buffers owned by the mesh or not: -@snippet MagnumMeshTools-gl.cpp compile-external-attributes +@snippet MeshTools-gl.cpp compile-external-attributes If @p mesh is not indexed, the @p indices parameter is ignored --- in that case you can pass a @ref NoCreate "NoCreate"-d instance to avoid allocating an diff --git a/src/Magnum/MeshTools/CompressIndices.h b/src/Magnum/MeshTools/CompressIndices.h index f93804497..a913c132e 100644 --- a/src/Magnum/MeshTools/CompressIndices.h +++ b/src/Magnum/MeshTools/CompressIndices.h @@ -63,7 +63,7 @@ to many GPUs (and for example unextended Vulkan or D3D12 don't even support them). It's also possible to choose a type larger than the input type to "inflate" an index buffer of a smaller type. Example usage: -@snippet MagnumMeshTools-gl.cpp compressIndices +@snippet MeshTools-gl.cpp compressIndices In case the indices all start from a large offset, the @p offset parameter can be used to subtract it, allowing them to be compressed even further. For @@ -72,7 +72,7 @@ into a 32-bit type), subtracting 75000 makes them in range @f$ [ 0; 21000 ] @f$ which fits into 16 bits. Note that you also need to update vertex attribute offsets accordingly. Example: -@snippet MagnumMeshTools.cpp compressIndices-offset +@snippet MeshTools.cpp compressIndices-offset A negative @p offset value will do an operation inverse to the above. See also @ref compressIndices(const Trade::MeshData&, MeshIndexType) that can do this @@ -189,7 +189,7 @@ sufficient. Example usage: -@snippet MagnumMeshTools-gl.cpp compressIndices-stl +@snippet MeshTools-gl.cpp compressIndices-stl */ CORRADE_DEPRECATED("use compressIndices(const Containers::StridedArrayView1D&, MeshIndexType, Long) instead") MAGNUM_MESHTOOLS_EXPORT std::tuple, MeshIndexType, UnsignedInt, UnsignedInt> compressIndices(const std::vector& indices); @@ -204,7 +204,7 @@ Values in the index array are expected to be representable with given type. Example usage: -@snippet MagnumMeshTools.cpp compressIndicesAs +@snippet MeshTools.cpp compressIndicesAs */ template CORRADE_DEPRECATED("use compressIndices(const Containers::StridedArrayView1D&, MeshIndexType, Long) instead") MAGNUM_MESHTOOLS_EXPORT Containers::Array compressIndicesAs(const std::vector& indices); diff --git a/src/Magnum/MeshTools/GenerateNormals.h b/src/Magnum/MeshTools/GenerateNormals.h index 9cf056fb8..ec8e6d407 100644 --- a/src/Magnum/MeshTools/GenerateNormals.h +++ b/src/Magnum/MeshTools/GenerateNormals.h @@ -51,7 +51,7 @@ indexed mesh, @ref duplicate() the vertices first, after the operation you might want to remove the duplicates again using @ref removeDuplicatesInPlace(). Example usage: -@snippet MagnumMeshTools.cpp generateFlatNormals +@snippet MeshTools.cpp generateFlatNormals @see @ref generateFlatNormalsInto(), @ref generateSmoothNormals(), @ref MeshTools::CompileFlag::GenerateFlatNormals, @@ -73,7 +73,7 @@ Useful when you need to interface for example with STL containers --- in that case @cpp #include @ce @ref Corrade/Containers/ArrayViewStl.h to get implicit conversions: -@snippet MagnumMeshTools-stl.cpp generateFlatNormalsInto +@snippet MeshTools-stl.cpp generateFlatNormalsInto @see @ref generateSmoothNormalsInto() */ @@ -161,7 +161,7 @@ Useful when you need to interface for example with STL containers --- in that case @cpp #include @ce @ref Corrade/Containers/ArrayViewStl.h to get implicit conversions: -@snippet MagnumMeshTools-stl.cpp generateSmoothNormalsInto +@snippet MeshTools-stl.cpp generateSmoothNormalsInto @see @ref generateFlatNormalsInto() */ diff --git a/src/Magnum/MeshTools/Interleave.h b/src/Magnum/MeshTools/Interleave.h index 3245f0450..f67780d01 100644 --- a/src/Magnum/MeshTools/Interleave.h +++ b/src/Magnum/MeshTools/Interleave.h @@ -127,12 +127,12 @@ attributes have the same element count. Example usage: -@snippet MagnumMeshTools-gl.cpp interleave1 +@snippet MeshTools-gl.cpp interleave1 It's often desirable to align data for one vertex on 32bit boundaries. To achieve that, you can specify gaps between the attributes: -@snippet MagnumMeshTools.cpp interleave2 +@snippet MeshTools.cpp interleave2 All gap bytes are set zero. This way vertex stride is 24 bytes, without gaps it would be 21 bytes, causing possible performance loss. @@ -253,13 +253,13 @@ instance. By default the attributes are tightly packed, you can add arbitrary padding using instances constructed via @ref Trade::MeshAttributeData::MeshAttributeData(Int). Example: -@snippet MagnumMeshTools.cpp interleavedLayout-extra +@snippet MeshTools.cpp interleavedLayout-extra This function doesn't preserve index data information in any way, making the output non-indexed. If you want to preserve index data, create a new indexed instance with attribute and vertex data transferred from the returned instance: -@snippet MagnumMeshTools.cpp interleavedLayout-indices +@snippet MeshTools.cpp interleavedLayout-indices This function will unconditionally allocate a new array to store all @ref Trade::MeshAttributeData, use @ref interleavedLayout(Trade::MeshData&&, UnsignedInt, Containers::ArrayView, InterleaveFlags) diff --git a/src/Magnum/MeshTools/RemoveDuplicates.h b/src/Magnum/MeshTools/RemoveDuplicates.h index 6f638fd51..429f24cef 100644 --- a/src/Magnum/MeshTools/RemoveDuplicates.h +++ b/src/Magnum/MeshTools/RemoveDuplicates.h @@ -61,7 +61,7 @@ data from an already indexed array, use @ref removeDuplicatesIndexedInPlace(const Containers::StridedArrayView1D&, const Containers::StridedArrayView2D&) instead. Usage example: -@snippet MagnumMeshTools.cpp removeDuplicates +@snippet MeshTools.cpp removeDuplicates See @ref removeDuplicates(const Containers::StridedArrayView2D&) for a variant that doesn't modify the input data in any way but instead returns @@ -220,7 +220,7 @@ duplicates in multiple incidental arrays --- first remove duplicates in each array separately and then combine the resulting index arrays to single index array, and reorder the data accordingly: -@snippet MagnumMeshTools.cpp removeDuplicates-multiple +@snippet MeshTools.cpp removeDuplicates-multiple */ template CORRADE_DEPRECATED("use removeDuplicatesInPlace() instead") std::vector removeDuplicates(std::vector& data, typename Vector::Type epsilon = Math::TypeTraits::epsilon()); #endif diff --git a/src/Magnum/MeshTools/Transform.h b/src/Magnum/MeshTools/Transform.h index 5b9800b30..052c37e40 100644 --- a/src/Magnum/MeshTools/Transform.h +++ b/src/Magnum/MeshTools/Transform.h @@ -51,7 +51,7 @@ translation. Example usage: -@snippet MagnumMeshTools.cpp transformVectors +@snippet MeshTools.cpp transformVectors @see @ref transformVectors(), @ref transform2DInPlace(), @ref transform3DInPlace(), @ref transformTextureCoordinates2DInPlace(), @@ -105,7 +105,7 @@ translation. Example usage: -@snippet MagnumMeshTools.cpp transformPoints +@snippet MeshTools.cpp transformPoints @see @ref transformPoints(), @ref transform2DInPlace(), @ref transform3DInPlace(), @ref transformTextureCoordinates2DInPlace(), diff --git a/src/Magnum/Platform/AbstractXApplication.h b/src/Magnum/Platform/AbstractXApplication.h index a681bd902..b35caa5c9 100644 --- a/src/Magnum/Platform/AbstractXApplication.h +++ b/src/Magnum/Platform/AbstractXApplication.h @@ -154,7 +154,7 @@ class AbstractXApplication { * need to explicitly @cpp return @ce after calling it, as it can't * exit the constructor on its own: * - * @snippet MagnumPlatform.cpp exit-from-constructor + * @snippet Platform.cpp exit-from-constructor * * When called from the main loop, the application exits cleanly * before next main loop iteration is executed. diff --git a/src/Magnum/Platform/EmscriptenApplication.h b/src/Magnum/Platform/EmscriptenApplication.h index 15710aa2c..5bdba0d3a 100644 --- a/src/Magnum/Platform/EmscriptenApplication.h +++ b/src/Magnum/Platform/EmscriptenApplication.h @@ -384,7 +384,7 @@ class EmscriptenApplication { * that, however, you need to explicitly @cpp return @ce after calling * it, as it can't exit the constructor on its own: * - * @snippet MagnumPlatform.cpp exit-from-constructor + * @snippet Platform.cpp exit-from-constructor * * When called from the main loop, the application exits cleanly * before next main loop iteration is executed. diff --git a/src/Magnum/Platform/GlfwApplication.h b/src/Magnum/Platform/GlfwApplication.h index e2e42cf74..040333673 100644 --- a/src/Magnum/Platform/GlfwApplication.h +++ b/src/Magnum/Platform/GlfwApplication.h @@ -289,7 +289,7 @@ class GlfwApplication { * you need to explicitly @cpp return @ce after calling it, as it can't * exit the constructor on its own: * - * @snippet MagnumPlatform.cpp exit-from-constructor + * @snippet Platform.cpp exit-from-constructor */ void exit(int exitCode = 0); diff --git a/src/Magnum/Platform/ScreenedApplication.h b/src/Magnum/Platform/ScreenedApplication.h index d9c7542e2..e2922c7ce 100644 --- a/src/Magnum/Platform/ScreenedApplication.h +++ b/src/Magnum/Platform/ScreenedApplication.h @@ -142,19 +142,19 @@ called *before* all @ref BasicScreen::viewportEvent() "Screen::viewportEvent()", in this case to make it possible to handle viewport changes on the default framebuffer: -@snippet MagnumPlatform.cpp ScreenedApplication-global-events +@snippet Platform.cpp ScreenedApplication-global-events Uses @ref Corrade::Containers::LinkedList for efficient screen management. Traversing front-to-back through the list of screens can be done using range-based for: -@snippet MagnumPlatform.cpp ScreenedApplication-for-range +@snippet Platform.cpp ScreenedApplication-for-range Or, if you need more flexibility, like in the following code. Traversing back-to-front can be done using @ref Corrade::Containers::LinkedList::last() and @ref BasicScreen::nextNearerScreen(). -@snippet MagnumPlatform.cpp ScreenedApplication-for +@snippet Platform.cpp ScreenedApplication-for @section Platform-ScreenedApplication-template-specializations Explicit template specializations diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h index 96ecf2023..5db3c42fe 100644 --- a/src/Magnum/Platform/Sdl2Application.h +++ b/src/Magnum/Platform/Sdl2Application.h @@ -465,7 +465,7 @@ With @ref windowSize(), @ref framebufferSize() and @ref dpiScaling() having a different relation on each platform, the way to calculate context scaling consistently everywhere is using this expression: -@snippet MagnumPlatform.cpp Sdl2Application-dpi-scaling +@snippet Platform.cpp Sdl2Application-dpi-scaling If your application is saving and restoring window size, it's advisable to take @ref dpiScaling() into account: @@ -610,7 +610,7 @@ class Sdl2Application { * you need to explicitly @cpp return @ce after calling it, as it can't * exit the constructor on its own: * - * @snippet MagnumPlatform.cpp exit-from-constructor + * @snippet Platform.cpp exit-from-constructor */ void exit(int exitCode = 0); diff --git a/src/Magnum/Primitives/Gradient.h b/src/Magnum/Primitives/Gradient.h index 78f952cf8..ae5098e22 100644 --- a/src/Magnum/Primitives/Gradient.h +++ b/src/Magnum/Primitives/Gradient.h @@ -56,7 +56,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData gradient2D(const Vector2& a, const Colo Equivalent to calling @ref gradient2D() like this: -@snippet MagnumPrimitives.cpp gradient2DHorizontal +@snippet Primitives.cpp gradient2DHorizontal @image html primitives-gradient2dhorizontal.png width=256px @@ -69,7 +69,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData gradient2DHorizontal(const Color4& colo Equivalent to calling @ref gradient2D() like this: -@snippet MagnumPrimitives.cpp gradient2DVertical +@snippet Primitives.cpp gradient2DVertical @image html primitives-gradient2dvertical.png width=256px @@ -99,7 +99,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData gradient3D(const Vector3& a, const Colo Equivalent to calling @ref gradient3D() like this: -@snippet MagnumPrimitives.cpp gradient3DHorizontal +@snippet Primitives.cpp gradient3DHorizontal @image html primitives-gradient3dhorizontal.png width=256px @@ -112,7 +112,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData gradient3DHorizontal(const Color4& colo Equivalent to calling @ref gradient3D() like this: -@snippet MagnumPrimitives.cpp gradient3DVertical +@snippet Primitives.cpp gradient3DVertical @image html primitives-gradient3dvertical.png width=256px diff --git a/src/Magnum/Primitives/Line.h b/src/Magnum/Primitives/Line.h index 6f0106c1c..11ff11234 100644 --- a/src/Magnum/Primitives/Line.h +++ b/src/Magnum/Primitives/Line.h @@ -53,7 +53,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line2D(const Vector2& a, const Vector2& Equivalent to calling @ref line2D(const Vector2&, const Vector2&) as -@snippet MagnumPrimitives.cpp line2D-identity +@snippet Primitives.cpp line2D-identity */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line2D(); @@ -76,7 +76,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line3D(const Vector3& a, const Vector3& Unit-size line in direction of positive X axis. Equivalent to calling @ref line3D(const Vector3&, const Vector3&) as -@snippet MagnumPrimitives.cpp line3D-identity +@snippet Primitives.cpp line3D-identity */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line3D(); diff --git a/src/Magnum/SceneGraph/AbstractFeature.h b/src/Magnum/SceneGraph/AbstractFeature.h index 5a718368a..98e43babc 100644 --- a/src/Magnum/SceneGraph/AbstractFeature.h +++ b/src/Magnum/SceneGraph/AbstractFeature.h @@ -101,7 +101,7 @@ caching is disabled. You can enable it using @ref setCachedTransformations() and then implement corresponding cleaning function(s) --- either @ref clean(), @ref cleanInverted() or both. Example: -@snippet MagnumSceneGraph.cpp AbstractFeature-caching +@snippet SceneGraph.cpp AbstractFeature-caching Before using the cached value explicitly request object cleaning by calling @cpp object()->setClean() @ce. @@ -113,7 +113,7 @@ know about any used transformation. By using small template trick in the constructor it is possible to gain access to transformation interface in the constructor: -@snippet MagnumSceneGraph.cpp AbstractFeature-object-transformation +@snippet SceneGraph.cpp AbstractFeature-object-transformation See @ref scenegraph-features-transformation for more detailed information. diff --git a/src/Magnum/SceneGraph/AbstractGroupedFeature.h b/src/Magnum/SceneGraph/AbstractGroupedFeature.h index 645a83de8..3e1506de6 100644 --- a/src/Magnum/SceneGraph/AbstractGroupedFeature.h +++ b/src/Magnum/SceneGraph/AbstractGroupedFeature.h @@ -46,7 +46,7 @@ Used together with @ref FeatureGroup. Usage is via subclassing the feature using [CRTP](http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern) and @cpp typedef @ce'ing @ref FeatureGroup to accept only given type, e.g.: -@snippet MagnumSceneGraph.cpp AbstractGroupedFeature-subclassing +@snippet SceneGraph.cpp AbstractGroupedFeature-subclassing @section SceneGraph-AbstractGroupedFeature-explicit-specializations Explicit template specializations diff --git a/src/Magnum/SceneGraph/AbstractObject.h b/src/Magnum/SceneGraph/AbstractObject.h index 68d01d092..436108e83 100644 --- a/src/Magnum/SceneGraph/AbstractObject.h +++ b/src/Magnum/SceneGraph/AbstractObject.h @@ -49,13 +49,13 @@ subclass instead. See also @ref scenegraph for more information. Uses @ref Corrade::Containers::LinkedList for efficient feature management. Traversing through the feature list can be done using range-based for: -@snippet MagnumSceneGraph.cpp AbstractObject-features-range +@snippet SceneGraph.cpp AbstractObject-features-range Or, if you need more flexibility, like in the following code. It is also possible to go in reverse order using @ref Corrade::Containers::LinkedList::last() and @ref AbstractFeature::previousFeature(). -@snippet MagnumSceneGraph.cpp AbstractObject-features +@snippet SceneGraph.cpp AbstractObject-features @section SceneGraph-AbstractObject-explicit-specializations Explicit template specializations diff --git a/src/Magnum/SceneGraph/Animable.h b/src/Magnum/SceneGraph/Animable.h index f9b33f50c..091a99a8d 100644 --- a/src/Magnum/SceneGraph/Animable.h +++ b/src/Magnum/SceneGraph/Animable.h @@ -79,7 +79,7 @@ First thing is to add @ref Animable feature to some object and implement to implement your animation, the function provides both absolute animation time and time delta. Example: -@snippet MagnumSceneGraph.cpp Animable-usage-definition +@snippet SceneGraph.cpp Animable-usage-definition Similarly to @ref Drawable feature, there is no way to just animate all the objects in the scene. You need to create animable group and use it to control @@ -89,14 +89,14 @@ The animation is initially in stopped state and without repeat, see @ref setState(), @ref setRepeated() and @ref setRepeatCount() for more information. -@snippet MagnumSceneGraph.cpp Animable-usage +@snippet SceneGraph.cpp Animable-usage Animation step is performed by calling @ref AnimableGroup::step() in your draw event implementation. The function expects absolute time from relative to some fixed point in the past and time delta (i.e. duration of the frame). You can use @ref Timeline for that, see its documentation for more information. -@snippet MagnumSceneGraph-gl.cpp Animable-usage-timeline +@snippet SceneGraph-gl.cpp Animable-usage-timeline @section SceneGraph-Animable-multiple-groups Using multiple animable groups to improve performance diff --git a/src/Magnum/SceneGraph/Camera.h b/src/Magnum/SceneGraph/Camera.h index 4f8abcca8..0aaf8785c 100644 --- a/src/Magnum/SceneGraph/Camera.h +++ b/src/Magnum/SceneGraph/Camera.h @@ -65,11 +65,11 @@ ratio correction. Common setup example for 2D scenes: -@snippet MagnumSceneGraph.cpp Camera-2D +@snippet SceneGraph.cpp Camera-2D Common setup example for 3D scenes: -@snippet MagnumSceneGraph.cpp Camera-3D +@snippet SceneGraph.cpp Camera-3D @section SceneGraph-Camera-explicit-specializations Explicit template specializations @@ -160,13 +160,13 @@ template class Camera: public AbstractFeature struct GenericGL { * of the tangent basis. Reconstructing the @ref Bitangent attribute can be * then done like this: * - * @snippet MagnumTrade.cpp MeshAttribute-bitangent-from-tangent + * @snippet Trade.cpp MeshAttribute-bitangent-from-tangent * * Use either this or the @ref Tangent attribute. Corresponds to * @ref Trade::MeshAttribute::Tangent. diff --git a/src/Magnum/Shaders/LineGL.h b/src/Magnum/Shaders/LineGL.h index f372d984c..facb3dd7c 100644 --- a/src/Magnum/Shaders/LineGL.h +++ b/src/Magnum/Shaders/LineGL.h @@ -92,13 +92,13 @@ to convert an existing line @ref Trade::MeshData to a form accepted by this shader with @ref MeshTools::generateLines() and then compile it to a @ref GL::Mesh with @ref MeshTools::compileLines(): -@snippet MagnumShaders-gl.cpp LineGL-usage +@snippet Shaders-gl.cpp LineGL-usage For rendering use @ref setTransformationProjectionMatrix(), @ref setColor(), @ref setWidth() and others. It's important to pass viewport size in @ref setViewportSize() as the line width is interpreted relative to it. -@snippet MagnumShaders-gl.cpp LineGL-usage2 +@snippet Shaders-gl.cpp LineGL-usage2 @subsection Shaders-LineGL-usage-triangulation Line triangulation @@ -166,7 +166,7 @@ single-color background, you can @ref setBackgroundColor() to a color matching the background and keep blending disabled, but note that you may get artifacts if the lines are self-overlapping. -@snippet MagnumShaders-gl.cpp LineGL-usage-antialiasing +@snippet Shaders-gl.cpp LineGL-usage-antialiasing @subsection Shaders-LineGL-usage-3d Lines in 3D @@ -221,7 +221,7 @@ equivalent to the @ref Shaders-LineGL-usage "snippet at the top" would look like this --- note that @ref setViewportSize() is an immediate uniform here as well, as it's assumed to be set globally and rarely changed: -@snippet MagnumShaders-gl.cpp LineGL-ubo +@snippet Shaders-gl.cpp LineGL-ubo For a multidraw workflow enable @ref Flag::MultiDraw and supply desired material and draw count via @ref Configuration::setMaterialCount() and diff --git a/src/Magnum/Shaders/MeshVisualizerGL.h b/src/Magnum/Shaders/MeshVisualizerGL.h index 35749106b..846ac67b5 100644 --- a/src/Magnum/Shaders/MeshVisualizerGL.h +++ b/src/Magnum/Shaders/MeshVisualizerGL.h @@ -187,7 +187,7 @@ instanced one. It'll take per-instance transformation from the @ref setTransformationProjectionMatrix(). The snippet below shows adding a buffer with per-instance transformation to a mesh: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL2D-usage-instancing +@snippet Shaders-gl.cpp MeshVisualizerGL2D-usage-instancing If @ref Flag::ObjectIdTexture is used and @ref Flag::InstancedTextureOffset is enabled, the @ref TextureOffset attribute (or @ref TextureOffsetLayer in case @@ -1456,28 +1456,28 @@ function. See @ref GL::Renderer::setBlendFunction() for details. Common mesh setup: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-geom1 +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-geom1 Common rendering setup: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-geom2 +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-geom2 @subsection Shaders-MeshVisualizerGL3D-wireframe-no-geom Example setup for indexed meshes without a geometry shader The vertices have to be converted to a non-indexed array first. Mesh setup: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-no-geom1 +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-no-geom1 Rendering setup: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-no-geom2 +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-no-geom2 @subsection Shaders-MeshVisualizerGL3D-usage-wireframe-no-geom-old Wireframe visualization of non-indexed meshes without a geometry shader on older hardware You need to provide also the @ref VertexIndex attribute. Mesh setup *in addition to the above*: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-no-geom-old +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-no-geom-old Rendering setup the same as above. @@ -1508,11 +1508,11 @@ case you'll enable @ref Flag::BitangentDirection). Note that these two are mutually exclusive, so you need to choose either of them based on what given mesh contains. Example for the first case: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-tbn1 +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-tbn1 Rendering setup: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-tbn2 +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-tbn2 @section Shaders-MeshVisualizerGL3D-object-id Object, vertex and primitive ID visualization @@ -1523,7 +1523,7 @@ and use @ref setColorMapTransformation() to map given range of discrete IDs to the @f$ [0, 1] @f$ texture range. Various colormap presets are in the @ref DebugTools::ColorMap namespace. Example usage: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-object-id +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-object-id Consistently with the other shaders, textured object ID is also supported if @ref Flag::ObjectIdTexture is enabled. In that case you need to provide also @@ -1603,7 +1603,7 @@ taken, applied before the matrix set by @ref setNormalMatrix(). The snippet below shows adding a buffer with per-instance transformation to a mesh, including a normal matrix attribute for correct TBN visualization: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-usage-instancing +@snippet Shaders-gl.cpp MeshVisualizerGL3D-usage-instancing If @ref Flag::ObjectIdTexture is used and @ref Flag::InstancedTextureOffset is enabled, the @ref TextureOffset attribute (or @ref TextureOffsetLayer in case @@ -1641,7 +1641,7 @@ buffer setup equivalent to the look like this --- note that @ref setViewportSize() is an immediate uniform here as well, as it's assumed to be set globally and rarely changed: -@snippet MagnumShaders-gl.cpp MeshVisualizerGL3D-ubo +@snippet Shaders-gl.cpp MeshVisualizerGL3D-ubo For a multidraw workflow enable @ref Flag::MultiDraw, supply desired material and draw count via @ref Configuration::setMaterialCount() and diff --git a/src/Magnum/Shaders/PhongGL.h b/src/Magnum/Shaders/PhongGL.h index df700933f..2762cd012 100644 --- a/src/Magnum/Shaders/PhongGL.h +++ b/src/Magnum/Shaders/PhongGL.h @@ -59,11 +59,11 @@ shader. Common mesh setup: -@snippet MagnumShaders-gl.cpp PhongGL-usage-colored1 +@snippet Shaders-gl.cpp PhongGL-usage-colored1 Common rendering setup: -@snippet MagnumShaders-gl.cpp PhongGL-usage-colored2 +@snippet Shaders-gl.cpp PhongGL-usage-colored2 @section Shaders-PhongGL-texture Textured rendering @@ -75,11 +75,11 @@ and @ref bindSpecularTexture() (or the combined @ref bindTextures()). The texture is multiplied by the color, which is by default set to fully opaque white for enabled textures. Mesh setup with a diffuse and a specular texture: -@snippet MagnumShaders-gl.cpp PhongGL-usage-texture1 +@snippet Shaders-gl.cpp PhongGL-usage-texture1 Common rendering setup: -@snippet MagnumShaders-gl.cpp PhongGL-usage-texture2 +@snippet Shaders-gl.cpp PhongGL-usage-texture2 @section Shaders-PhongGL-lights Light specification @@ -120,7 +120,7 @@ passed to @ref setLightColors() and @ref setLightSpecularColors(). The following example shows a three-light setup with one dim directional light shining from the top and two stronger but range-limited point lights: -@snippet MagnumShaders-gl.cpp PhongGL-usage-lights +@snippet Shaders-gl.cpp PhongGL-usage-lights @subsection Shaders-PhongGL-lights-ambient Ambient lights @@ -130,7 +130,7 @@ math for ambient color and lights is equivalent. Add the ambient colors together and reuse the diffuse texture in the @ref bindAmbientTexture() slot to have it affected by the ambient as well: -@snippet MagnumShaders-gl.cpp PhongGL-usage-lights-ambient +@snippet Shaders-gl.cpp PhongGL-usage-lights-ambient @subsection Shaders-PhongGL-lights-zero Zero lights @@ -183,7 +183,7 @@ so only ambient alpha will be taken into account. If you have a diffuse texture combined with the alpha mask, you can use that texture for both ambient and diffuse part and then separate the alpha like this: -@snippet MagnumShaders-gl.cpp PhongGL-usage-alpha +@snippet Shaders-gl.cpp PhongGL-usage-alpha @section Shaders-PhongGL-normal-mapping Normal mapping @@ -274,7 +274,7 @@ The snippet below shows adding a buffer with per-instance transformation to a mesh --- note how a normal matrix attribute has to be populated and supplied as well to ensure lighting works: -@snippet MagnumShaders-gl.cpp PhongGL-usage-instancing +@snippet Shaders-gl.cpp PhongGL-usage-instancing For instanced skinning the joint buffer is assumed to contain joint transformations for all instances. By default all instances use the same joint @@ -307,7 +307,7 @@ buffer setup equivalent to the @ref Shaders-PhongGL-colored "colored case at the top", with one default light, would look like this: -@snippet MagnumShaders-gl.cpp PhongGL-ubo +@snippet Shaders-gl.cpp PhongGL-ubo For a multidraw workflow enable @ref Flag::MultiDraw (and possibly @ref Flag::TextureArrays) and supply desired light, material and draw count via diff --git a/src/Magnum/Shaders/VectorGL.h b/src/Magnum/Shaders/VectorGL.h index e9c25d392..afd2656b5 100644 --- a/src/Magnum/Shaders/VectorGL.h +++ b/src/Magnum/Shaders/VectorGL.h @@ -80,11 +80,11 @@ working on the framebuffer, you need to enable Common mesh setup: -@snippet MagnumShaders-gl.cpp VectorGL-usage1 +@snippet Shaders-gl.cpp VectorGL-usage1 Common rendering setup: -@snippet MagnumShaders-gl.cpp VectorGL-usage2 +@snippet Shaders-gl.cpp VectorGL-usage2 @section Shaders-VectorGL-ubo Uniform buffers @@ -101,7 +101,7 @@ texture transformation a per-draw @ref TextureTransformationUniform buffer bound with @ref bindTextureTransformationBuffer() can be supplied as well. A uniform buffer setup equivalent to the above would look like this: -@snippet MagnumShaders-gl.cpp VectorGL-ubo +@snippet Shaders-gl.cpp VectorGL-ubo For a multidraw workflow enable @ref Flag::MultiDraw, supply desired material and draw count via @ref Configuration::setMaterialCount() and diff --git a/src/Magnum/Shaders/VertexColorGL.h b/src/Magnum/Shaders/VertexColorGL.h index 2fad80f71..48e618142 100644 --- a/src/Magnum/Shaders/VertexColorGL.h +++ b/src/Magnum/Shaders/VertexColorGL.h @@ -81,11 +81,11 @@ working on the framebuffer, you need to enable Common mesh setup. The shader accepts either three- or four-component color attribute, use either @ref Color3 or @ref Color4 to specify which one you use. -@snippet MagnumShaders-gl.cpp VertexColorGL-usage1 +@snippet Shaders-gl.cpp VertexColorGL-usage1 Common rendering setup: -@snippet MagnumShaders-gl.cpp VertexColorGL-usage2 +@snippet Shaders-gl.cpp VertexColorGL-usage2 @section Shaders-VertexColorGL-ubo Uniform buffers @@ -97,7 +97,7 @@ buffer bound with @ref bindTransformationProjectionBuffer(). This is also the only buffer supplied, as there are no other draw parameters. A uniform buffer setup equivalent to the above would look like this: -@snippet MagnumShaders-gl.cpp VectorGL-ubo +@snippet Shaders-gl.cpp VectorGL-ubo For a multidraw workflow enable @ref Flag::MultiDraw and supply desired draw count via @ref Configuration::setDrawCount(). The usage is similar for all diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index cc3e53e86..941f39467 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -111,7 +111,7 @@ In the following example a font is loaded from the filesystem using the @ref StbTrueTypeFont plugin, prerendering all needed glyphs, completely with all error handling: -@snippet MagnumText-gl.cpp AbstractFont-usage +@snippet Text-gl.cpp AbstractFont-usage See @ref plugins for more information about general plugin usage and the list of @m_class{m-doc} [derived classes](#derived-classes) for available font @@ -147,7 +147,7 @@ shown above, it's possible to use @ref openData() to import data from memory. Note that the particular importer implementation must support @ref FontFeature::OpenData for this method to work. -@snippet MagnumText.cpp AbstractFont-usage-data +@snippet Text.cpp AbstractFont-usage-data Some font formats consist of more than one file and in that case you may want to intercept those references and load them in a custom way as well. For font @@ -161,7 +161,7 @@ file loading callback affects @ref openFile() as well --- you don't have to load the top-level file manually and pass it to @ref openData(), any font plugin supporting the callback feature handles that correctly. -@snippet MagnumText.cpp AbstractFont-usage-callbacks +@snippet Text.cpp AbstractFont-usage-callbacks For importers that don't support @ref FontFeature::FileCallback directly, the base @ref openFile() implementation will use the file callback to pass the @@ -321,7 +321,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin { * See the overload below for a more convenient type-safe way to pass * the user data pointer. * - * @snippet MagnumText.cpp AbstractFont-setFileCallback + * @snippet Text.cpp AbstractFont-setFileCallback * * @see @ref Text-AbstractFont-usage-callbacks */ @@ -337,7 +337,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin { * @ref Corrade::Utility::Resource instance to avoid a potentially slow * resource group lookup every time: * - * @snippet MagnumText.cpp AbstractFont-setFileCallback-template + * @snippet Text.cpp AbstractFont-setFileCallback-template * * @see @ref Text-AbstractFont-usage-callbacks */ @@ -763,7 +763,7 @@ Same string as returned by inside @ref CORRADE_PLUGIN_REGISTER() to avoid having to update the interface string by hand every time the version gets bumped: -@snippet MagnumText.cpp MAGNUM_TEXT_ABSTRACTFONT_PLUGIN_INTERFACE +@snippet Text.cpp MAGNUM_TEXT_ABSTRACTFONT_PLUGIN_INTERFACE The interface string version gets increased on every ABI break to prevent silent crashes and memory corruption. Plugins built against the previous diff --git a/src/Magnum/Text/AbstractFontConverter.h b/src/Magnum/Text/AbstractFontConverter.h index ddd3436bc..9b27a9c4d 100644 --- a/src/Magnum/Text/AbstractFontConverter.h +++ b/src/Magnum/Text/AbstractFontConverter.h @@ -448,7 +448,7 @@ Same string as returned by be used inside @ref CORRADE_PLUGIN_REGISTER() to avoid having to update the interface string by hand every time the version gets bumped: -@snippet MagnumText.cpp MAGNUM_TEXT_ABSTRACTFONTCONVERTER_PLUGIN_INTERFACE +@snippet Text.cpp MAGNUM_TEXT_ABSTRACTFONTCONVERTER_PLUGIN_INTERFACE The interface string version gets increased on every ABI break to prevent silent crashes and memory corruption. Plugins built against the previous diff --git a/src/Magnum/Text/AbstractGlyphCache.h b/src/Magnum/Text/AbstractGlyphCache.h index b04fcc0c2..fe629a7ff 100644 --- a/src/Magnum/Text/AbstractGlyphCache.h +++ b/src/Magnum/Text/AbstractGlyphCache.h @@ -118,7 +118,7 @@ A glyph cache is created in an appropriate @ref PixelFormat and a size. @ref PixelFormat::R8Unorm is the usual choice, @ref PixelFormat::RGBA8Unorm is useful for emoji fonts or when arbitrary icon data are put into the cache. -@snippet MagnumText-gl.cpp AbstractGlyphCache-filling-construct +@snippet Text-gl.cpp AbstractGlyphCache-filling-construct The rest of this section describes low level usage of the glyph cache filling APIs, which are useful mainly when implementing an @ref AbstractFont itself or @@ -132,7 +132,7 @@ don't necessarily need to be a font per se. Assuming the input images are stored in a simple array, and the goal is to put them all together into the cache and reference them later simply by their array indices. -@snippet MagnumText.cpp AbstractGlyphCache-filling-images +@snippet Text.cpp AbstractGlyphCache-filling-images @subsection Text-AbstractGlyphCache-filling-font Adding a font @@ -144,7 +144,7 @@ it with a concrete @ref AbstractFont instance to look it up later with querying glyphs. In our case the glyph IDs are simply indices into the array, so the upper bound is the array size: -@snippet MagnumText.cpp AbstractGlyphCache-filling-font +@snippet Text.cpp AbstractGlyphCache-filling-font @subsection Text-AbstractGlyphCache-filling-atlas Reserving space in the glyph atlas @@ -157,7 +157,7 @@ simple, rotations are disabled as well, see the atlas packer class docs for information about how to deal with them and achieve potentially better packing efficiency. -@snippet MagnumText.cpp AbstractGlyphCache-filling-atlas +@snippet Text.cpp AbstractGlyphCache-filling-atlas In case the layouting fails, triggering the assertion, the cache size was picked too small or there was already enough glyphs added that the new ones @@ -179,7 +179,7 @@ this case is the third *glyph offset* argument, which describes how the glyph image is positioned relative to the text layouting cursor (used for example for letters *j* or *q* that reach below the baseline). -@snippet MagnumText.cpp AbstractGlyphCache-filling-glyphs +@snippet Text.cpp AbstractGlyphCache-filling-glyphs Important is to call @ref flushImage() at the end, which makes the glyph cache update its actual GPU-side texture based on what area of the image was updated. @@ -230,14 +230,14 @@ glyph was added yet, the function returns @cpp 0 @ce, i.e. the invalid glyph. The @ref glyph() function then directly returns data for given glyph, or the invalid glyph data in case the glyph wasn't found. -@snippet MagnumText.cpp AbstractGlyphCache-querying +@snippet Text.cpp AbstractGlyphCache-querying As text rendering is potentially happening very often, batch @ref glyphIdsInto(), @ref glyphOffsets(), @ref glyphLayers() and @ref glyphRectangles() APIs are provided as well to trim down the amount of function calls and redundant lookups: -@snippet MagnumText.cpp AbstractGlyphCache-querying-batch +@snippet Text.cpp AbstractGlyphCache-querying-batch For invalid glyphs it's the caller choice to either use the invalid glyph as-is (as done above), leading to blank spaces in the text, or remember the diff --git a/src/Magnum/Text/AbstractShaper.h b/src/Magnum/Text/AbstractShaper.h index 7a6eb7a97..3de26838e 100644 --- a/src/Magnum/Text/AbstractShaper.h +++ b/src/Magnum/Text/AbstractShaper.h @@ -129,7 +129,7 @@ inserted into) an @ref AbstractGlyphCache, and the rendered glyphs positioned at @p offsets with the cursor moving by @p advances is what makes up the final shaped text. -@snippet MagnumText.cpp AbstractShaper-shape +@snippet Text.cpp AbstractShaper-shape For best results, it's recommended to call (a subset of) @ref setScript(), @ref setLanguage() and @ref setDirection() if at least some properties of the @@ -153,7 +153,7 @@ capitals (and the particular @ref AbstractFont plugin would recognize and use the feature), we could render the "world" part with small caps, resulting in "Hello, ᴡᴏʀʟᴅ!". -@snippet MagnumText.cpp AbstractShaper-shape-features +@snippet Text.cpp AbstractShaper-shape-features Similarly, features can be enabled for the whole text by omitting the begin and end parameters, or for example a feature that a particular @ref AbstractFont @@ -168,7 +168,7 @@ Sometimes it's desirable to render different parts of the text with different fonts, not just different features of the same font. A variation of the above example could be rendering the "world" part with a bold font: -@snippet MagnumText.cpp AbstractShaper-shape-multiple +@snippet Text.cpp AbstractShaper-shape-multiple The resulting `glyphs` array is usable the same way as in the above case, with a difference that the glyph IDs have to be looked up in an diff --git a/src/Magnum/Text/DistanceFieldGlyphCache.h b/src/Magnum/Text/DistanceFieldGlyphCache.h index be98165d2..60828aef7 100644 --- a/src/Magnum/Text/DistanceFieldGlyphCache.h +++ b/src/Magnum/Text/DistanceFieldGlyphCache.h @@ -66,7 +66,7 @@ outlining, thinning, thickening or shadow effects will be used when rendering, using them leads to precision loss when the distance field is stored in 8-bit channels. -@snippet MagnumText-gl.cpp DistanceFieldGlyphCache-usage +@snippet Text-gl.cpp DistanceFieldGlyphCache-usage See the @ref Renderer class for information about text rendering. The @ref AbstractGlyphCache base class has more information about general glyph diff --git a/src/Magnum/Text/GlyphCache.h b/src/Magnum/Text/GlyphCache.h index 44ac251d2..dfd6aabd4 100644 --- a/src/Magnum/Text/GlyphCache.h +++ b/src/Magnum/Text/GlyphCache.h @@ -47,7 +47,7 @@ Contains font glyphs rendered into a texture atlas. Create the @ref GlyphCache object with sufficient size and then call @ref AbstractFont::createGlyphCache() to fill it with glyphs. -@snippet MagnumText-gl.cpp GlyphCache-usage +@snippet Text-gl.cpp GlyphCache-usage See the @ref Renderer class for information about text rendering. The @ref AbstractGlyphCache base class has more information about general glyph diff --git a/src/Magnum/Text/Renderer.h b/src/Magnum/Text/Renderer.h index 8e9a501ba..96f7bebd2 100644 --- a/src/Magnum/Text/Renderer.h +++ b/src/Magnum/Text/Renderer.h @@ -438,7 +438,7 @@ methods, returning result either as data arrays or as fully configured mesh. The text can be then drawn as usual by configuring the shader and drawing the mesh: -@snippet MagnumText-gl.cpp Renderer-usage1 +@snippet Text-gl.cpp Renderer-usage1 See @ref render(AbstractFont&, const AbstractGlyphCache&, Float, const std::string&, Alignment) and @ref render(AbstractFont&, const AbstractGlyphCache&, Float, const std::string&, GL::Buffer&, GL::Buffer&, GL::BufferUsage, Alignment) @@ -448,7 +448,7 @@ While this method is sufficient for one-shot rendering of static texts, for mutable texts (e.g. FPS counters, chat messages) there is another approach that doesn't recreate everything on each text change: -@snippet MagnumText-gl.cpp Renderer-usage2 +@snippet Text-gl.cpp Renderer-usage2 @subsection Text-Renderer-usage-font-size Font size @@ -510,12 +510,12 @@ documented thoroughly in @ref Platform-Sdl2Application-dpi, for this particular case a scaled interface size, used instead of window size for the projection, would be calculated like this: -@snippet MagnumText-gl.cpp Renderer-dpi-interface-size +@snippet Text-gl.cpp Renderer-dpi-interface-size And a multiplier for the @ref AbstractFont and @ref GlyphCache font size like this. The @ref Renderer keeps using the size without this multiplier. -@snippet MagnumText-gl.cpp Renderer-dpi-size-multiplier +@snippet Text-gl.cpp Renderer-dpi-size-multiplier @section Text-Renderer-required-opengl-functionality Required OpenGL functionality diff --git a/src/Magnum/TextureTools/Atlas.h b/src/Magnum/TextureTools/Atlas.h index dc1092802..abf65f0f8 100644 --- a/src/Magnum/TextureTools/Atlas.h +++ b/src/Magnum/TextureTools/Atlas.h @@ -135,7 +135,7 @@ width set to 1024 and height unbounded. The algorithm by default makes all images the same orientation as that significantly improves the layout efficiency while not making any difference for texture mapping. -@snippet MagnumTextureTools.cpp AtlasLandfill-usage +@snippet TextureTools.cpp AtlasLandfill-usage Calculating a texture coordinate transformation matrix for a particular image can then be done with @ref atlasTextureCoordinateTransformation(), see its @@ -148,7 +148,7 @@ linear rasterizer later, they can be disabled by clearing appropriate @ref add(const Containers::StridedArrayView1D&, const Containers::StridedArrayView1D&) overload without the rotations argument. -@snippet MagnumTextureTools.cpp AtlasLandfill-usage-no-rotation +@snippet TextureTools.cpp AtlasLandfill-usage-no-rotation @subsection TextureTools-AtlasLandfill-usage-atlas Array atlas @@ -156,7 +156,7 @@ The packing can be extended to a third dimension as well, in which case the packing overflows to next slices instead of expanding to potentially unbounded height. -@snippet MagnumTextureTools.cpp AtlasLandfill-usage-array +@snippet TextureTools.cpp AtlasLandfill-usage-array The layer has to be taken into an account in addition to the texture coordinate transformation matrix calculated with @ref atlasTextureCoordinateTransformation(), @@ -461,7 +461,7 @@ matrix for a particular image can then be done with calculate and apply the matrix to either the mesh directly or to a material / shader. -@snippet MagnumTextureTools.cpp atlasArrayPowerOfTwo +@snippet TextureTools.cpp atlasArrayPowerOfTwo The algorithm first sorts the textures by size using @ref std::stable_sort(), which is usually @f$ \mathcal{O}(n \log{} n) @f$, and then performs the actual @@ -514,13 +514,13 @@ With a concrete `atlasSize`, `sizes` being the input sizes passed to @ref AtlasLandfill::add() (i.e., without any potential rotations applied yet), and `offsets` and `rotations` being the output, the usage is as follows: -@snippet MagnumTextureTools.cpp atlasTextureCoordinateTransformation +@snippet TextureTools.cpp atlasTextureCoordinateTransformation The resulting matrix can be then directly used to adjust texture coordinates, like below with @ref MeshTools::transformTextureCoordinates2DInPlace() on a @link Trade::MeshData @endlink: -@snippet MagnumTextureTools.cpp atlasTextureCoordinateTransformation-meshdata +@snippet TextureTools.cpp atlasTextureCoordinateTransformation-meshdata Alternatively, for example in cases where a single mesh is used with several different textures, the transformation can be applied at draw time, such as with @ref Shaders::FlatGL::setTextureMatrix(). In case there's already a @@ -529,7 +529,7 @@ transformation has to happen *after*, so multiplied from the left side. For example with a @ref Trade::MaterialData that contains a @link Trade::MaterialAttribute::TextureMatrix @endlink: -@snippet MagnumTextureTools.cpp atlasTextureCoordinateTransformation-materialdata +@snippet TextureTools.cpp atlasTextureCoordinateTransformation-materialdata */ MAGNUM_TEXTURETOOLS_EXPORT Matrix3 atlasTextureCoordinateTransformation(const Vector2i& atlasSize, const Vector2i& size, const Vector2i& offset); diff --git a/src/Magnum/Trade/AbstractImageConverter.h b/src/Magnum/Trade/AbstractImageConverter.h index 4727c7943..16f65cffc 100644 --- a/src/Magnum/Trade/AbstractImageConverter.h +++ b/src/Magnum/Trade/AbstractImageConverter.h @@ -522,7 +522,7 @@ case we *know* that @ref AnyImageConverter supports especially when dealing with compressed image formats it might be good to check against the reported @ref features() first. -@snippet MagnumTrade.cpp AbstractImageConverter-usage-file +@snippet Trade.cpp AbstractImageConverter-usage-file See @ref plugins for more information about general plugin usage, @ref file-formats to compare implementations of common file formats and the @@ -546,7 +546,7 @@ the following snippet we'll save three mip levels to an EXR file, again using the @ref AnyImageConverter plugin, which will then most likely delegate to @link OpenExrImageConverter @endlink: -@snippet MagnumTrade.cpp AbstractImageConverter-usage-file-levels +@snippet Trade.cpp AbstractImageConverter-usage-file-levels @subsection Trade-AbstractImageConverter-usage-image Converting image data @@ -560,7 +560,7 @@ a compressed image and so we can put in just a sanity assert, but in the general case it's converter-dependent and may even rely on configuration options set for the plugin. -@snippet MagnumTrade.cpp AbstractImageConverter-usage-image +@snippet Trade.cpp AbstractImageConverter-usage-image Commonly, when operating directly on the image data, each plugin exposes a set of configuration options to specify what actually gets done and how, and the @@ -1958,7 +1958,7 @@ Same string as returned by be used inside @ref CORRADE_PLUGIN_REGISTER() to avoid having to update the interface string by hand every time the version gets bumped: -@snippet MagnumTrade.cpp MAGNUM_TRADE_ABSTRACTIMAGECONVERTER_PLUGIN_INTERFACE +@snippet Trade.cpp MAGNUM_TRADE_ABSTRACTIMAGECONVERTER_PLUGIN_INTERFACE The interface string version gets increased on every ABI break to prevent silent crashes and memory corruption. Plugins built against the previous diff --git a/src/Magnum/Trade/AbstractImporter.h b/src/Magnum/Trade/AbstractImporter.h index 5f4298088..8af295339 100644 --- a/src/Magnum/Trade/AbstractImporter.h +++ b/src/Magnum/Trade/AbstractImporter.h @@ -238,7 +238,7 @@ treated as a programmer error and will produce the usual assertions. In the following example an image is loaded from the filesystem using the @ref AnyImageImporter plugin, completely with all needed error handling: -@snippet MagnumTrade.cpp AbstractImporter-usage +@snippet Trade.cpp AbstractImporter-usage See @ref plugins for more information about general plugin usage, @ref file-formats to compare implementations of common file formats and the @@ -260,7 +260,7 @@ data from memory (for example from @relativeref{Corrade,Utility::Resource}). Note that the particular importer implementation has to support @ref ImporterFeature::OpenData for this method to work: -@snippet MagnumTrade.cpp AbstractImporter-usage-data +@snippet Trade.cpp AbstractImporter-usage-data Complex scene files often reference other files such as images and in that case you may want to intercept those references and load them in a custom way as @@ -276,7 +276,7 @@ well --- you don't have to load the top-level file manually and pass it to @ref openData(), any importer supporting the callback feature handles that correctly. -@snippet MagnumTrade.cpp AbstractImporter-usage-callbacks +@snippet Trade.cpp AbstractImporter-usage-callbacks For importers that don't support @ref ImporterFeature::FileCallback directly, the base @ref openFile() implementation will use the file callback to pass the @@ -613,7 +613,7 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * See the overload below for a more convenient type-safe way to pass * the user data pointer. * - * @snippet MagnumTrade.cpp AbstractImporter-setFileCallback + * @snippet Trade.cpp AbstractImporter-setFileCallback * * @see @ref Trade-AbstractImporter-usage-callbacks */ @@ -628,7 +628,7 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * @ref Corrade::Utility::Resource instance to avoid a potentially slow * resource group lookup every time: * - * @snippet MagnumTrade.cpp AbstractImporter-setFileCallback-template + * @snippet Trade.cpp AbstractImporter-setFileCallback-template * * @see @ref Trade-AbstractImporter-usage-callbacks */ @@ -1861,7 +1861,7 @@ class MAGNUM_TRADE_EXPORT AbstractImporter: public PluginManager::AbstractManagi * Example workflow in a plugin that needs to preserve access to the * input data but wants to avoid allocating a copy if possible: * - * @snippet MagnumTrade.cpp AbstractImporter-doOpenData-ownership + * @snippet Trade.cpp AbstractImporter-doOpenData-ownership * * The @p dataFlags can never be @ref DataFlag::Mutable without * any other flag set. The case of @ref DataFlag::Mutable with @@ -2628,7 +2628,7 @@ Same string as returned by used inside @ref CORRADE_PLUGIN_REGISTER() to avoid having to update the interface string by hand every time the version gets bumped: -@snippet MagnumTrade.cpp MAGNUM_TRADE_ABSTRACTIMPORTER_PLUGIN_INTERFACE +@snippet Trade.cpp MAGNUM_TRADE_ABSTRACTIMPORTER_PLUGIN_INTERFACE The interface string version gets increased on every ABI break to prevent silent crashes and memory corruption. Plugins built against the previous diff --git a/src/Magnum/Trade/AbstractSceneConverter.h b/src/Magnum/Trade/AbstractSceneConverter.h index 2b100c93c..ebe1f1f6b 100644 --- a/src/Magnum/Trade/AbstractSceneConverter.h +++ b/src/Magnum/Trade/AbstractSceneConverter.h @@ -633,7 +633,7 @@ case we *know* that @ref AnySceneConverter supports @ref SceneConverterFeature::ConvertMeshToFile, however in a more general case it might be good to check against the reported @ref features() first. -@snippet MagnumTrade.cpp AbstractSceneConverter-usage-mesh-file +@snippet Trade.cpp AbstractSceneConverter-usage-mesh-file See @ref plugins for more information about general plugin usage, @ref file-formats to compare implementations of common file formats and the @@ -648,7 +648,7 @@ a set of optimizations on the mesh to make it render faster. While here it would have no way to know what we want and so we request the concrete plugin name directly. -@snippet MagnumTrade.cpp AbstractSceneConverter-usage-mesh +@snippet Trade.cpp AbstractSceneConverter-usage-mesh Commonly, when operating directly on the mesh data, each plugin exposes a set of configuration options to specify what actually gets done and how, and the @@ -668,7 +668,7 @@ plugin docs before use. An equivalent to the above operation, but performed in-place, would be the following: -@snippet MagnumTrade.cpp AbstractSceneConverter-usage-mesh-in-place +@snippet Trade.cpp AbstractSceneConverter-usage-mesh-in-place @subsection Trade-AbstractSceneConverter-usage-multiple Converting multiple data @@ -689,14 +689,14 @@ through only data actually supported by the converter, printing a warning for the rest. In the following example, a COLLADA file is converted to a glTF using @ref GltfSceneConverter delegated from @link AnySceneConverter @endlink: -@snippet MagnumTrade.cpp AbstractSceneConverter-usage-multiple-file +@snippet Trade.cpp AbstractSceneConverter-usage-multiple-file This API takes an optional second parameter, @ref SceneContents, allowing you to selectively perform operations on certain data types while still making use of the convenience passthrough for the rest. The following snippet will remove duplicates from all meshes before saving them to the output: -@snippet MagnumTrade.cpp AbstractSceneConverter-usage-multiple-file-selective +@snippet Trade.cpp AbstractSceneConverter-usage-multiple-file-selective @@ -2472,7 +2472,7 @@ Same string as returned by be used inside @ref CORRADE_PLUGIN_REGISTER() to avoid having to update the interface string by hand every time the version gets bumped: -@snippet MagnumTrade.cpp MAGNUM_TRADE_ABSTRACTSCENECONVERTER_PLUGIN_INTERFACE +@snippet Trade.cpp MAGNUM_TRADE_ABSTRACTSCENECONVERTER_PLUGIN_INTERFACE The interface string version gets increased on every ABI break to prevent silent crashes and memory corruption. Plugins built against the previous diff --git a/src/Magnum/Trade/AnimationData.h b/src/Magnum/Trade/AnimationData.h index 6a59cd587..07902e952 100644 --- a/src/Magnum/Trade/AnimationData.h +++ b/src/Magnum/Trade/AnimationData.h @@ -694,7 +694,7 @@ keep using the animations later, you need to take ownership of the data using In the following snippet all animated positions are stored in an array. The array is then updated during calls to @ref Animation::Player::advance(). -@snippet MagnumTrade.cpp AnimationData-usage +@snippet Trade.cpp AnimationData-usage It's also possible to directly update object transformations using callbacks, among other things. See documentation of the @ref Animation::Player class for @@ -711,7 +711,7 @@ these, you need to check that the data are mutable using @ref dataFlags() first. The following snippet inverts the Y coordinate of a translation animation: -@snippet MagnumTrade.cpp AnimationData-usage-mutable +@snippet Trade.cpp AnimationData-usage-mutable @experimental */ diff --git a/src/Magnum/Trade/ImageData.h b/src/Magnum/Trade/ImageData.h index 629dc80c3..cf86b848c 100644 --- a/src/Magnum/Trade/ImageData.h +++ b/src/Magnum/Trade/ImageData.h @@ -82,7 +82,7 @@ compressed properties through @ref compressedStorage() and @ref compressedFormat(). Example of uploading the image to a @link GL::Texture @endlink: -@snippet MagnumTrade.cpp ImageData-usage +@snippet Trade.cpp ImageData-usage Uncompressed image data instances provide pixel data access via @ref pixels() in the same way as the @ref Image class. See @ref Image-pixel-access "its documentation for more information". @@ -97,7 +97,7 @@ there's the @ref mutableData() and @ref mutablePixels() set of functions. To use these, you need to check that the data are mutable using @ref dataFlags() first. The following snippet flips the R and B channels of the imported image: -@snippet MagnumTrade.cpp ImageData-usage-mutable +@snippet Trade.cpp ImageData-usage-mutable @section Trade-ImageData-populating Populating an instance @@ -106,7 +106,7 @@ An @ref ImageData instance by default takes over the ownership of an with size and either @ref PixelFormat or @ref CompressedPixelFormat, similarly to the @ref Image and @ref CompressedImage classes: -@snippet MagnumTrade.cpp ImageData-populating +@snippet Trade.cpp ImageData-populating The constructor internally checks that the passed array is large enough and as with other image classes, care must be taken in presence of @@ -114,12 +114,12 @@ non-four-byte-aligned rows. This often closely depends on behavior of the code or library that operates with the image data and the recommended way is to pad the row data to satisfy the alignment: -@snippet MagnumTrade.cpp ImageData-populating-padding +@snippet Trade.cpp ImageData-populating-padding Alternatively, if padding is not possible or desirable, you can pass a @ref PixelStorage instance with the alignment overriden to @cpp 1 @ce: -@snippet MagnumTrade.cpp ImageData-populating-alignment +@snippet Trade.cpp ImageData-populating-alignment As with @ref Image / @ref ImageView, this class supports extra storage parameters and implementation-specific format specification, if the importer @@ -134,7 +134,7 @@ global data etc. For that, instead of moving in an mutability and ownership together with an @relativeref{Corrade,Containers::ArrayView}: -@snippet MagnumTrade.cpp ImageData-populating-non-owned +@snippet Trade.cpp ImageData-populating-non-owned @see @ref ImageData1D, @ref ImageData2D, @ref ImageData3D */ diff --git a/src/Magnum/Trade/LightData.h b/src/Magnum/Trade/LightData.h index 5169a5db2..5ef68da0c 100644 --- a/src/Magnum/Trade/LightData.h +++ b/src/Magnum/Trade/LightData.h @@ -111,20 +111,20 @@ parameters and let the class set the rest implicitly. For example, a @ref attenuation() implicitly set to @cpp {1.0f, 0.0f, 1.0f} @ce and cone angles to @cpp 360.0_degf @ce: -@snippet MagnumTrade.cpp LightData-populating-range +@snippet Trade.cpp LightData-populating-range Or, a @ref LightType::Spot light constructed from a constant / linear / quadratic attenuation will have @ref range() implicitly set to @ref Constants::inf(): -@snippet MagnumTrade.cpp LightData-populating-attenuation +@snippet Trade.cpp LightData-populating-attenuation And a @ref LightType::Directional light that doesn't attenuate can be constructed without either, causing @ref attenuation() to be @cpp {1.0f, 0.0f, 0.0f} @ce and @ref range() @ref Constants::inf(), cancelling out the attenuation equation: -@snippet MagnumTrade.cpp LightData-populating-none +@snippet Trade.cpp LightData-populating-none @section Trade-LightData-attenuation Attenuation calculation diff --git a/src/Magnum/Trade/MaterialData.h b/src/Magnum/Trade/MaterialData.h index 35b2166c1..85b11b6f0 100644 --- a/src/Magnum/Trade/MaterialData.h +++ b/src/Magnum/Trade/MaterialData.h @@ -825,7 +825,7 @@ enum class MaterialAttribute: UnsignedInt { * Shader code that is able to reconstruct a XYZ normal from both RG and GA * variants assuming constant values in other channels ([source](https://github.com/KhronosGroup/glTF/issues/1682#issuecomment-557880407)): * - * @snippet MagnumTrade.glsl unpackTwoChannelNormal + * @snippet Trade.glsl unpackTwoChannelNormal * * Default value is @ref MaterialTextureSwizzle::RGB. * @see @ref PbrMetallicRoughnessMaterialData::hasNormalRoughnessMetallicTexture(), @@ -1461,7 +1461,7 @@ class MAGNUM_TRADE_EXPORT MaterialAttributeData { * name. Apart from the type check, the following two instances are * equivalent: * - * @snippet MagnumTrade.cpp MaterialAttributeData-name + * @snippet Trade.cpp MaterialAttributeData-name */ template @@ -1954,7 +1954,7 @@ greater flexibility, custom attributes can be also strings, untyped buffers or pointers, allowing you to store arbitrary properties such as image filenames or direct texture pointers instead of IDs: -@snippet MagnumTrade.cpp MaterialData-populating-custom +@snippet Trade.cpp MaterialData-populating-custom @subsection Trade-MaterialData-populating-layers Adding material layers @@ -1967,7 +1967,7 @@ snippet we have two layers (one base material and one clear coat layer), the base material being the first two attributes and the clear coat layer being attributes in range @cpp 2 @ce to @cpp 6 @ce (thus four attributes): -@snippet MagnumTrade.cpp MaterialData-populating-layers +@snippet Trade.cpp MaterialData-populating-layers Like with just a base material, the attributes get sorted for a @f$ \mathcal{O}(\log n) @f$ lookup --- but not as a whole, each layer @@ -1984,7 +1984,7 @@ Apart from builtin layers, there's no limit in what the layers can be used for of authored `rockTile`, `sandTile`, `grassTile` textures and procedurally generated blend factors `a`, `b`, `c`, `d`: -@snippet MagnumTrade.cpp MaterialData-populating-layers-custom +@snippet Trade.cpp MaterialData-populating-layers-custom @section Trade-MaterialData-representation Internal representation diff --git a/src/Magnum/Trade/MeshData.h b/src/Magnum/Trade/MeshData.h index 92e603281..50f5a6657 100644 --- a/src/Magnum/Trade/MeshData.h +++ b/src/Magnum/Trade/MeshData.h @@ -100,7 +100,7 @@ enum class MeshAttribute: UnsignedShort { * tangent basis. Reconstructing the @ref MeshAttribute::Bitangent can be * then done like this: * - * @snippet MagnumTrade.cpp MeshAttribute-bitangent-from-tangent + * @snippet Trade.cpp MeshAttribute-bitangent-from-tangent * * When used as a morph target attribute, the handedness shouldn't change * compared to the base attribute. It's not checked or enforced in any way @@ -281,7 +281,7 @@ introduction. The most straightforward usage is constructing the instance from a view on the index array. The @ref MeshIndexType gets inferred from the view type: -@snippet MagnumTrade.cpp MeshIndexData-usage +@snippet Trade.cpp MeshIndexData-usage Alternatively, you can pass a typeless @cpp const void @ce view and supply @ref MeshIndexType explicitly, or a contiguous 2D view and let the class detect @@ -413,7 +413,7 @@ The most straightforward usage is constructing an instance from a pair of a @ref MeshAttribute and a strided view. The @ref VertexFormat gets inferred from the view type: -@snippet MagnumTrade.cpp MeshAttributeData-usage +@snippet Trade.cpp MeshAttributeData-usage Alternatively, you can pass a typeless @cpp const void @ce or a 2D view and supply @ref VertexFormat explicitly. @@ -428,7 +428,7 @@ pointer patching during data serialization, but also for example when vertex layout is static (and thus can be defined at compile time), but the actual data is allocated / populated at runtime. -@snippet MagnumTrade.cpp MeshAttributeData-usage-offset-only +@snippet Trade.cpp MeshAttributeData-usage-offset-only See @ref Trade-MeshData-populating-non-owned "the corresponding MeshData documentation" for a complete usage example. Offset-only attributes return @cpp true @ce for @@ -446,7 +446,7 @@ implementation-specific formats as well. Formats that don't have a generic however note that most APIs and @ref MeshTools functions can't work with those as their size or contents can't be known: -@snippet MagnumTrade.cpp MeshAttributeData-custom-vertex-format +@snippet Trade.cpp MeshAttributeData-custom-vertex-format @see @ref MeshIndexData */ @@ -773,7 +773,7 @@ the @ref Primitives library as well as from various @ref MeshTools algorithms. If all you want is to create a @ref GL::Mesh that can be rendered by builtin shaders, a simple yet efficient way is to use @ref MeshTools::compile(): -@snippet MagnumTrade.cpp MeshData-usage-compile +@snippet Trade.cpp MeshData-usage-compile This one-liner uploads the data and configures the mesh for all attributes known by Magnum that are present in it. It's however rather opaque and doesn't @@ -804,7 +804,7 @@ you are creating a @ref GL::Mesh, the usual path forward is then to The mesh can be also indexed, in which case the index buffer is exposed through @ref indicesAsArray(). -@snippet MagnumTrade.cpp MeshData-usage +@snippet Trade.cpp MeshData-usage @section Trade-MeshData-usage-advanced Advanced usage @@ -821,7 +821,7 @@ also a pair of @ref GL::Attribute defined by the shader and the actual @ref VertexFormat, figuring out the GL-specific properties such as component count or element data type for you: -@snippet MagnumTrade.cpp MeshData-usage-advanced +@snippet Trade.cpp MeshData-usage-advanced This approach is especially useful when dealing with custom attributes. See also @ref MeshTools::compile(const Trade::MeshData&, GL::Buffer&, GL::Buffer&) @@ -842,7 +842,7 @@ first, and if not then you may want to make a mutable copy first using @ref MeshTools::copy(). The following snippet applies a transformation to the mesh positions: -@snippet MagnumTrade.cpp MeshData-usage-mutable +@snippet Trade.cpp MeshData-usage-mutable If the transformation includes a rotation or non-uniform scaling, you may want to do a similar operation with normals and tangents as well. @@ -855,7 +855,7 @@ and similar) searches only through the base attributes. Meshes that have morph targets can have the additional attributes accessed by passing a `morphTargetId` argument to these functions: -@snippet MagnumTrade.cpp MeshData-usage-morph-targets +@snippet Trade.cpp MeshData-usage-morph-targets If a base attribute doesn't have a corresponding morph target attribute (which can be checked using @ref hasAttribute(MeshAttribute, Int) const with @@ -895,7 +895,7 @@ when configuring meshes directly like shown in the @ref Trade-MeshData-usage-advanced chapter above, you may want to check the constraints explicitly before passing the values over. -@snippet MagnumTrade.cpp MeshData-usage-special-layouts +@snippet Trade.cpp MeshData-usage-special-layouts In order to convert a mesh with a special data layout to something the GPU vertex pipeline is able to consume, @ref MeshTools::interleave(const Trade::MeshData&, Containers::ArrayView, InterleaveFlags) "MeshTools::interleave()" @@ -917,7 +917,7 @@ example, an interleaved indexed mesh with 3D positions and RGBA colors would look like this --- and variants with just vertex data or just index data or neither are possible too: -@snippet MagnumTrade.cpp MeshData-populating +@snippet Trade.cpp MeshData-populating @subsection Trade-MeshData-populating-non-owned Non-owned instances and static vertex layouts @@ -931,7 +931,7 @@ describing data mutability and ownership together with constructor. The following snippet is a variant of the above where the index data is constant and vertex data mutable, both referenced externally: -@snippet MagnumTrade.cpp MeshData-populating-non-owned +@snippet Trade.cpp MeshData-populating-non-owned There are also other constructor overloads allowing you to mix and match owned vertex data with non-owned index data and vice versa. The @ref MeshAttributeData @@ -941,7 +941,7 @@ instead if desired. Finally, if the vertex layout is constant but the actual data is allocated / populated at runtime, the @ref MeshAttributeData instances can be defined in a global array as offset-only: -@snippet MagnumTrade.cpp MeshData-populating-offset-only +@snippet Trade.cpp MeshData-populating-offset-only See also the @ref Trade-MeshAttributeData-usage-offset-only "corresponding MeshAttributeData documentation for offset-only fields". @@ -954,12 +954,12 @@ snippet below describes a custom per-face structure that exposes faces as higher-order polygons combining multiple triangles together ---in this case, each face has an array of 15 IDs, which is exposed as a 2D array: -@snippet MagnumTrade.cpp MeshData-populating-custom +@snippet Trade.cpp MeshData-populating-custom Later, the (array) attributes can be retrieved back using the same custom identifiers --- note the use of @cpp [] @ce to get back a 2D array again: -@snippet MagnumTrade.cpp MeshData-populating-custom-retrieve +@snippet Trade.cpp MeshData-populating-custom-retrieve When a custom attribute is exposed through @ref AbstractImporter, it's possible to map custom @ref MeshAttribute values to human-readable string names using @@ -2092,7 +2092,7 @@ class MAGNUM_TRADE_EXPORT MeshData { * elements. You can make a 2D view onto the result to conveniently * index the data: * - * @snippet MagnumTrade.cpp MeshData-jointIdsAsArray + * @snippet Trade.cpp MeshData-jointIdsAsArray * * @see @ref weightsAsArray(), @ref jointIdsInto(), * @ref attributeFormat(), diff --git a/src/Magnum/Trade/MeshData2D.h b/src/Magnum/Trade/MeshData2D.h index ecfcf2e09..a2cd19e70 100644 --- a/src/Magnum/Trade/MeshData2D.h +++ b/src/Magnum/Trade/MeshData2D.h @@ -57,7 +57,7 @@ It's possible to use @ref MeshTools::transformPointsInPlace() and vertex data. For example, baking a particular translation + rotation + scaling directly to vertex positions: -@snippet MagnumTrade.cpp MeshData2D-transform +@snippet Trade.cpp MeshData2D-transform @m_deprecated_since{2020,06} Use @ref MeshData instead. diff --git a/src/Magnum/Trade/MeshData3D.h b/src/Magnum/Trade/MeshData3D.h index 7a465aa3e..2babf6c60 100644 --- a/src/Magnum/Trade/MeshData3D.h +++ b/src/Magnum/Trade/MeshData3D.h @@ -57,7 +57,7 @@ It's possible to use @ref MeshTools::transformPointsInPlace() and vertex data. For example, baking a particular translation + rotation directly to positions and normals: -@snippet MagnumTrade.cpp MeshData3D-transform +@snippet Trade.cpp MeshData3D-transform @m_deprecated_since{2020,06} Use @ref MeshData instead. diff --git a/src/Magnum/Trade/ObjectData2D.h b/src/Magnum/Trade/ObjectData2D.h index 441d12cdc..ca4107cd8 100644 --- a/src/Magnum/Trade/ObjectData2D.h +++ b/src/Magnum/Trade/ObjectData2D.h @@ -246,7 +246,7 @@ class CORRADE_DEPRECATED("use SceneData instead") MAGNUM_TRADE_EXPORT ObjectData * * The corresponding code is as follows: * - * @snippet MagnumTrade.cpp ObjectData2D-transformation + * @snippet Trade.cpp ObjectData2D-transformation * * @see @ref flags() */ diff --git a/src/Magnum/Trade/ObjectData3D.h b/src/Magnum/Trade/ObjectData3D.h index aa59253be..3e870eea6 100644 --- a/src/Magnum/Trade/ObjectData3D.h +++ b/src/Magnum/Trade/ObjectData3D.h @@ -247,7 +247,7 @@ class CORRADE_DEPRECATED("use SceneData instead") MAGNUM_TRADE_EXPORT ObjectData * * The corresponding code is as follows: * - * @snippet MagnumTrade.cpp ObjectData3D-transformation + * @snippet Trade.cpp ObjectData3D-transformation * * @see @ref flags() */ diff --git a/src/Magnum/Trade/SceneData.h b/src/Magnum/Trade/SceneData.h index 9f8c450c7..4e4d3f88a 100644 --- a/src/Magnum/Trade/SceneData.h +++ b/src/Magnum/Trade/SceneData.h @@ -829,7 +829,7 @@ The most straightforward usage is constructing an instance from a @ref SceneField and a strided view for the field data and object mapping. The @ref SceneMappingType and @ref SceneFieldType get inferred from the view types: -@snippet MagnumTrade.cpp SceneFieldData-usage +@snippet Trade.cpp SceneFieldData-usage Alternatively, you can pass typeless @cpp const void @ce or 2D views and supply @ref SceneMappingType and @ref SceneFieldType explicitly. @@ -844,7 +844,7 @@ is useful mainly to avoid pointer patching during data serialization, but also for example when the data layout is static (and thus can be defined at compile time), but the actual data is allocated / populated at runtime. -@snippet MagnumTrade.cpp SceneFieldData-usage-offset-only +@snippet Trade.cpp SceneFieldData-usage-offset-only See @ref Trade-SceneData-populating-non-owned "the corresponding SceneData documentation" for a complete usage example. Offset-only fields are marked with @@ -888,7 +888,7 @@ particular type can correspond to more than one @ref SceneFieldType (such as @ref SceneFieldType::StringRangeNullTerminated32 being both represented with an @relativeref{Magnum,UnsignedInt}), the type has to be specified explicitly: -@snippet MagnumTrade.cpp SceneFieldData-usage-strings +@snippet Trade.cpp SceneFieldData-usage-strings Offset-only constructors have it similar, containing an extra base string offset. Due to packing in the internal layout, string fields can't be arrays. @@ -1644,7 +1644,7 @@ upper bound to all object identifiers referenced by the scene, but as mentioned above, not all of them may be actual nodes so we don't allocate actual scene graph object instances for them yet. Alternatively, for very sparse ranges, a hashmap could be also used here. -@snippet MagnumTrade.cpp SceneData-usage1 +@snippet Trade.cpp SceneData-usage1 @@ -1654,7 +1654,7 @@ Next we go through objects that have an associated parent using @ref parentsAsArray(). Those are the actual nodes we want, so we allocate a scene graph object for each ... -@snippet MagnumTrade.cpp SceneData-usage2 +@snippet Trade.cpp SceneData-usage2 @m_class{m-noindent} @@ -1666,7 +1666,7 @@ object is already allocated by the time we pass it to @ref SceneGraph::Object::setParent() --- generally there's no guarantee that a parent appears in the field before its children. -@snippet MagnumTrade.cpp SceneData-usage3 +@snippet Trade.cpp SceneData-usage3 With the hierarchy done, we assign transformations. The transformation field can be present for only a subset of the nodes, with the rest implicitly having @@ -1676,7 +1676,7 @@ nodes, so we only set it for objects present in our hierarchy. The transformation / rotation / scaling fields into a matrix for us, if the scene contains only those. -@snippet MagnumTrade.cpp SceneData-usage4 +@snippet Trade.cpp SceneData-usage4 Finally, assuming there's a `Drawable` class derived from @ref SceneGraph::Drawable that accepts a mesh and material ID (retrieving them @@ -1685,7 +1685,7 @@ subsequently from @ref AbstractImporter::mesh() / assigning actual meshes to corresponding scene nodes is just another @cpp for @ce loop over @ref meshesMaterialsAsArray(): -@snippet MagnumTrade.cpp SceneData-usage5 +@snippet Trade.cpp SceneData-usage5 @@ -1716,7 +1716,7 @@ in a textual form, @ref GltfImporter will always parse the data into canonical 32-bit types. With that assumption, the above snippet that used @ref transformations3DAsArray() can be rewritten to a zero-copy form like this: -@snippet MagnumTrade.cpp SceneData-usage-advanced +@snippet Trade.cpp SceneData-usage-advanced @section Trade-SceneData-usage-per-object Per-object access @@ -1735,7 +1735,7 @@ For example, together with an @ref AbstractImporter instance the scene comes from, the following snippet lists meshes and material names that are associated with a "Chair" object, assuming such object exists: -@snippet MagnumTrade.cpp SceneData-per-object +@snippet Trade.cpp SceneData-per-object The actual object ID lookup is done by @ref findFieldObjectOffset() and depending on what @ref SceneFieldFlags are present for given field, it can be @@ -1756,7 +1756,7 @@ the data are mutable using @ref dataFlags() first. The following snippet updates all transformations with the live state of a scene imported earlier, for example in order to bake in a certain animation state: -@snippet MagnumTrade.cpp SceneData-usage-mutable +@snippet Trade.cpp SceneData-usage-mutable @section Trade-SceneData-populating Populating an instance @@ -1768,7 +1768,7 @@ stored together in a @cpp struct @ce, while a subset of them has a mesh and a material assigned, which are stored in separate arrays. And because the scene is small, we save space by using just 16-bit indices for everything. -@snippet MagnumTrade.cpp SceneData-populating +@snippet Trade.cpp SceneData-populating Note that the above layout is just an example, you're free to choose any representation that matches your use case best, with fields interleaved @@ -1786,7 +1786,7 @@ mutability and ownership together with an @ref SceneData(SceneMappingType, UnsignedLong, DataFlags, Containers::ArrayView, Containers::Array&&, const void*) constructor: -@snippet MagnumTrade.cpp SceneData-populating-non-owned +@snippet Trade.cpp SceneData-populating-non-owned The @ref SceneFieldData list is still implicitly allocated in the above case, but it can also be defined externally and referenced via @@ -1796,7 +1796,7 @@ layout is constant but the actual data is allocated / populated at runtime, the and then subsequently referenced from a @ref SceneData with a concrete data array: -@snippet MagnumTrade.cpp SceneData-populating-offset-only +@snippet Trade.cpp SceneData-populating-offset-only See also the @ref Trade-SceneFieldData-usage-offset-only "corresponding SceneFieldData documentation for offset-only fields". @@ -1814,7 +1814,7 @@ cells, and we save calculated frustums for inspection as well. For the new data we allocate object IDs from a range after `nodeCount`, and copy in the actual data. -@snippet MagnumTrade.cpp SceneData-populating-custom1 +@snippet Trade.cpp SceneData-populating-custom1 Then, similarly as with @ref MeshData, the scene can have custom fields as well, created with @ref sceneFieldCustom(). We create one for the cell light @@ -1822,13 +1822,13 @@ reference array and one for the cell frustum and then use them to annotate the views allocated above. Note that we also increased the total object count to include the light culling grid cells as well. -@snippet MagnumTrade.cpp SceneData-populating-custom2 +@snippet Trade.cpp SceneData-populating-custom2 Later, the fields can be retrieved back using the same custom identifiers. The light references are actually a 2D array (8 lights for each cell), so a @cpp [] @ce needs to be used: -@snippet MagnumTrade.cpp SceneData-populating-custom-retrieve +@snippet Trade.cpp SceneData-populating-custom-retrieve @subsection Trade-SceneData-populating-strings String fields @@ -1874,12 +1874,12 @@ assuming there's enough stored data --- the space efficiency is the same as if a just a numeric value of an 8-bit @cpp enum @ce would be stored, but here it includes human-readable string names. -@snippet MagnumTrade.cpp SceneData-populating-strings +@snippet Trade.cpp SceneData-populating-strings While there's many options how to store the string, retrieving of any string @ref SceneFieldType can be conveniently done using @ref fieldStrings(): -@snippet MagnumTrade.cpp SceneData-populating-strings-retrieve +@snippet Trade.cpp SceneData-populating-strings-retrieve */ class MAGNUM_TRADE_EXPORT SceneData { public: diff --git a/src/Magnum/Vk/Assert.h b/src/Magnum/Vk/Assert.h index 83ce3e4cd..7e1f1e6d0 100644 --- a/src/Magnum/Vk/Assert.h +++ b/src/Magnum/Vk/Assert.h @@ -91,7 +91,7 @@ return any of the specified results in addition to accepts any number of @ref Magnum::Vk::Result "Result" values, the macro then returns the actual result value. Example usage: -@snippet MagnumVk.cpp MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR +@snippet Vk.cpp MAGNUM_VK_INTERNAL_ASSERT_SUCCESS_OR Similarly to @ref CORRADE_INTERNAL_ASSERT_EXPRESSION() this macro is usable in any expression such as @cpp if @ce and @cpp return @ce statements. You can diff --git a/src/Magnum/Vk/Buffer.h b/src/Magnum/Vk/Buffer.h index 28e60796b..3fbbfa551 100644 --- a/src/Magnum/Vk/Buffer.h +++ b/src/Magnum/Vk/Buffer.h @@ -56,7 +56,7 @@ Wraps a @type_vk_keyword{Buffer} and its memory. Pass a @ref BufferCreateInfo with desired usage and size to the @ref Buffer constructor together with specifying @ref MemoryFlags for the allocation. -@snippet MagnumVk.cpp Buffer-creation +@snippet Vk.cpp Buffer-creation @attention At this point, a dedicated allocation is used, subsequently accessible through @ref dedicatedMemory(). This behavior may change in the @@ -69,7 +69,7 @@ will be created without any memory bound. Buffer memory requirements can be then queried using @ref memoryRequirements() and an allocated memory bound with @ref bindMemory(). See @ref Memory for further details about memory allocation. -@snippet MagnumVk.cpp Buffer-creation-custom-allocation +@snippet Vk.cpp Buffer-creation-custom-allocation Using @ref bindDedicatedMemory() instead of @ref bindMemory() will transfer ownership of the @ref Memory to the buffer instance, making it subsequently @@ -85,7 +85,7 @@ memory. The following snippet shows zero-filling the whole buffer using @ref CommandBuffer::fillBuffer(): -@snippet MagnumVk.cpp Buffer-usage-fill +@snippet Vk.cpp Buffer-usage-fill @subsection Vk-Buffer-usage-copy Copying buffer data @@ -99,7 +99,7 @@ want to combine it with a @ref CommandBuffer::pipelineBarrier(PipelineStages, Pi after to make the memory visible for subsequent operations. The following snippet shows populating a device-local vertex buffer from host-visible memory: -@snippet MagnumVk.cpp Buffer-usage-copy +@snippet Vk.cpp Buffer-usage-copy It's also possible to copy data between buffers and images, see @ref Vk-Image-usage-copy for examples. diff --git a/src/Magnum/Vk/CommandBuffer.h b/src/Magnum/Vk/CommandBuffer.h index 532baa920..a8e4a4728 100644 --- a/src/Magnum/Vk/CommandBuffer.h +++ b/src/Magnum/Vk/CommandBuffer.h @@ -188,7 +188,7 @@ calling @ref CommandPool::reset(), or alternatively reset each buffer separately using @ref reset(), if the pool was created with @ref CommandPoolCreateInfo::Flag::ResetCommandBuffer. -@snippet MagnumVk.cpp CommandBuffer-allocation +@snippet Vk.cpp CommandBuffer-allocation @section Vk-CommandBuffer-usage Command buffer recording and submit @@ -198,14 +198,14 @@ delimited with @ref beginRenderPass() and @ref endRenderPass(), see @ref Vk-RenderPass-usage for details. Once a recording is done, call @ref end(). You can (but don't have to) use method chaining: -@snippet MagnumVk.cpp CommandBuffer-usage +@snippet Vk.cpp CommandBuffer-usage Once recorded, call @ref Queue::submit() to submit the command buffer to a compatible @ref Queue that was set up at @ref Vk-Device-creation "device creation time". Usually you'd want to wait on the submit completion with a @link Fence @endlink: -@snippet MagnumVk.cpp CommandBuffer-usage-submit +@snippet Vk.cpp CommandBuffer-usage-submit */ class MAGNUM_VK_EXPORT CommandBuffer { public: diff --git a/src/Magnum/Vk/CommandPool.h b/src/Magnum/Vk/CommandPool.h index 4e8ffb248..c61b56a12 100644 --- a/src/Magnum/Vk/CommandPool.h +++ b/src/Magnum/Vk/CommandPool.h @@ -95,7 +95,7 @@ A @ref CommandPoolCreateInfo doesn't need many inputs --- the only required is queue family index coming from @ref DeviceProperties of the device it's created on: -@snippet MagnumVk.cpp CommandPool-creation +@snippet Vk.cpp CommandPool-creation After that, you can allocate command buffers and use them. See @ref CommandBuffer class docs for details. diff --git a/src/Magnum/Vk/DescriptorPool.h b/src/Magnum/Vk/DescriptorPool.h index 474937dfd..18eabec0f 100644 --- a/src/Magnum/Vk/DescriptorPool.h +++ b/src/Magnum/Vk/DescriptorPool.h @@ -53,7 +53,7 @@ descriptor counts for desired @ref DescriptorType "DescriptorTypes". The following snippet creates a pool allowing to allocate at most 8 descriptor sets with 24 sampler bindings and 16 uniform bindings: -@snippet MagnumVk.cpp DescriptorPool-creation +@snippet Vk.cpp DescriptorPool-creation With a descriptor pool created, you can allocate descriptor sets from it. See the @ref DescriptorSet class for details. diff --git a/src/Magnum/Vk/DescriptorSet.h b/src/Magnum/Vk/DescriptorSet.h index 9ea298022..6b9bdcb4c 100644 --- a/src/Magnum/Vk/DescriptorSet.h +++ b/src/Magnum/Vk/DescriptorSet.h @@ -52,7 +52,7 @@ Given a @ref DescriptorSetLayout and a compatible @ref DescriptorPool with enough free slots, asingle descriptor set for given layout can be allocated with @ref DescriptorPool::allocate(): -@snippet MagnumVk.cpp DescriptorSet-allocation +@snippet Vk.cpp DescriptorSet-allocation When allocating more than what the pool has, the @ref DescriptorPool::allocate() function aborts with an error message. In cases where the application is very @@ -61,7 +61,7 @@ dynamic and cannot predict that a pools is large enough, you can use --- for example by recycling unused sets or by allocating from a different pool: -@snippet MagnumVk.cpp DescriptorSet-allocation-try +@snippet Vk.cpp DescriptorSet-allocation-try @subsection Vk-DescriptorSet-allocation-free Freeing descriptor sets @@ -74,7 +74,7 @@ descriptor sets to be allocated without resetting the whole pool. Using this flag however can cause allocation to fail also due to pool fragmentation, not just when exhausing all available resources: -@snippet MagnumVk.cpp DescriptorSet-allocation-free +@snippet Vk.cpp DescriptorSet-allocation-free @subsection Vk-DescriptorSet-allocation-variable Variable descriptor count allocation @@ -83,7 +83,7 @@ has to be at most one and it has to be the last binding), a concrete count is specified in the call to @ref DescriptorPool::allocate(VkDescriptorSetLayout, UnsignedInt). Here the fragment shader can access up to 8 sampled images and we're allocating four: -@snippet MagnumVk.cpp DescriptorSet-allocation-variable +@snippet Vk.cpp DescriptorSet-allocation-variable */ class MAGNUM_VK_EXPORT DescriptorSet { public: diff --git a/src/Magnum/Vk/DescriptorSetLayout.h b/src/Magnum/Vk/DescriptorSetLayout.h index 96f4f89b2..273be3271 100644 --- a/src/Magnum/Vk/DescriptorSetLayout.h +++ b/src/Magnum/Vk/DescriptorSetLayout.h @@ -57,7 +57,7 @@ example one uniform buffer binding @cpp 0 @ce is accessible by any stages and one combined image/sampler binding @cpp 1 @ce is accessed only by @link ShaderStage::Fragment @endlink: -@snippet MagnumVk.cpp DescriptorSetLayout-creation +@snippet Vk.cpp DescriptorSetLayout-creation @@ -76,7 +76,7 @@ of the descriptor count argument. The descriptor count is then implicitly taken from size of the array. The above snippet with immutable samplers would look like this: -@snippet MagnumVk.cpp DescriptorSetLayout-creation-immutable-samplers +@snippet Vk.cpp DescriptorSetLayout-creation-immutable-samplers @subsection Vk-DescriptorSetLayout-creation-binding-flags Descriptor binding flags @@ -85,7 +85,7 @@ specify additional flags per binding. All of them require a certain @ref DeviceFeature to be supported and enabled, see particular @ref DescriptorSetLayoutBinding::Flag for more information: -@snippet MagnumVk.cpp DescriptorSetLayout-creation-binding-flags +@snippet Vk.cpp DescriptorSetLayout-creation-binding-flags @section Vk-DescriptorSetLayout-usage Descriptor set layout usage diff --git a/src/Magnum/Vk/Device.h b/src/Magnum/Vk/Device.h index a8fa38099..025e7a4ae 100644 --- a/src/Magnum/Vk/Device.h +++ b/src/Magnum/Vk/Device.h @@ -81,7 +81,7 @@ That's done by creating an empty @ref Queue instance and then referencing it from @ref DeviceCreateInfo::addQueues(). After the device is constructed, the queue gets populated and is ready to be used. -@snippet MagnumVk.cpp Device-creation-construct-queue +@snippet Vk.cpp Device-creation-construct-queue In the above snippet, we requested a graphics queue via a convenience API. The information about available queues and other device properties is stored in a @@ -97,7 +97,7 @@ both string names as well as predefined *device* extensions from the @ref Extensions namespace. Later on, presence of predefined extensions can be checked with @ref isExtensionEnabled(). -@snippet MagnumVk.cpp Device-creation-extensions +@snippet Vk.cpp Device-creation-extensions In addition to extensions, you'll be usually enabling features as well. These are all exposed in a giant @ref DeviceFeatures enum and you can simply OR them @@ -107,7 +107,7 @@ enabled by adding a corresponding structure to the `pNext` chain. As with extensions, the set of enabled features can be later checked with @ref enabledFeatures(). -@snippet MagnumVk.cpp Device-creation-features +@snippet Vk.cpp Device-creation-features However, usually you'll be checking for extension and feature availability first, which is doable through @@ -118,7 +118,7 @@ make use of the enum set operations and simply mask away features that are not available --- however note that some features also require an extension to be explicitly enabled. -@snippet MagnumVk.cpp Device-creation-check-supported +@snippet Vk.cpp Device-creation-check-supported With both @ref Instance and @ref Device created, you can proceed to setting up a @ref CommandPool and a @ref Pipeline, which will then need a @@ -150,7 +150,7 @@ implementations), and at runtime you query those features in appropriate cases other features, all APIs that require a particular Portability Subset feature are marked as such and also listed among others at @ref requires-vk-feature. -@snippet MagnumVk.cpp Device-creation-portability-subset +@snippet Vk.cpp Device-creation-portability-subset @see @ref vulkan-wrapping-optimizing-properties @@ -186,7 +186,7 @@ In addition to the common properties explained in @ref vulkan-wrapping-raw, the @ref Device contains device-level Vulkan function pointers, accessible through @ref operator->(): -@snippet MagnumVk.cpp Device-function-pointers +@snippet Vk.cpp Device-function-pointers These functions are by default not accessible globally (and neither there is a global "current instance"), which is done in order to avoid multiple @@ -196,7 +196,7 @@ operate on the same instance, or when writing quick prototype code --- and then it's possible to populate those using @ref populateGlobalFunctionPointers(). Compared to the above, the same custom code would then look like this: -@snippet MagnumVk.cpp Device-global-function-pointers +@snippet Vk.cpp Device-global-function-pointers Similarly you can use @ref Instance::populateGlobalFunctionPointers() to populate instance-level global function pointers. @@ -212,7 +212,7 @@ empty instance (for example as a class member) and do a delayed creation by moving a new instance over the empty one. Here you have to use the @ref create() function instead: -@snippet MagnumVk.cpp Device-delayed-creation +@snippet Vk.cpp Device-delayed-creation Similar case is with @ref wrap() --- instead of being @cpp static @ce, you have to call it on a @ref Device(NoCreateT) "NoCreate"'d instance. The @ref Instance @@ -427,7 +427,7 @@ class MAGNUM_VK_EXPORT Device { * also in the @ref vulkan-support "Vulkan support tables". Search * complexity is @f$ \mathcal{O}(1) @f$. Example usage: * - * @snippet MagnumVk.cpp Device-isExtensionEnabled + * @snippet Vk.cpp Device-isExtensionEnabled * * Note that this returns @cpp true @ce only if given extension is * supported by the driver *and* it was enabled via diff --git a/src/Magnum/Vk/Fence.h b/src/Magnum/Vk/Fence.h index 35c7c576f..243c7ce59 100644 --- a/src/Magnum/Vk/Fence.h +++ b/src/Magnum/Vk/Fence.h @@ -55,7 +55,7 @@ constructed directly using @ref Fence(Device&, const FenceCreateInfo&), leaving the @p info parameter at its default. If you want to pass additional parameters to it, include the @ref FenceCreateInfo class as usual: -@snippet MagnumVk.cpp Fence-creation +@snippet Vk.cpp Fence-creation @section Vk-Fence-usage Basic usage diff --git a/src/Magnum/Vk/Framebuffer.h b/src/Magnum/Vk/Framebuffer.h index 0915c4624..991cc7129 100644 --- a/src/Magnum/Vk/Framebuffer.h +++ b/src/Magnum/Vk/Framebuffer.h @@ -52,7 +52,7 @@ A framebuffer is created using @ref FramebufferCreateInfo that takes a previously-created @ref RenderPass together with @ref ImageView "ImageViews" onto @ref Image "Images" of desired sizes and compatible formats for all its attachments: -@snippet MagnumVk.cpp Framebuffer-creation +@snippet Vk.cpp Framebuffer-creation */ class MAGNUM_VK_EXPORT Framebuffer { public: diff --git a/src/Magnum/Vk/Image.h b/src/Magnum/Vk/Image.h index 883897a99..3a9c3f6f3 100644 --- a/src/Magnum/Vk/Image.h +++ b/src/Magnum/Vk/Image.h @@ -236,7 +236,7 @@ Pass one of the @ref ImageCreateInfo subclasses depending on desired image type with desired usage, format, size and other propoerties to the @ref Image constructor together with specifying @ref MemoryFlags for memory allocation. -@snippet MagnumVk.cpp Image-creation +@snippet Vk.cpp Image-creation @attention At this point, a dedicated allocation is used, subsequently accessible through @ref dedicatedMemory(). This behavior may change in the @@ -251,7 +251,7 @@ be created without any memory attached. Image memory requirements can be subsequently queried using @ref memoryRequirements() and an allocated memory bound with @ref bindMemory(). See @ref Memory for further details about memory allocation. -@snippet MagnumVk.cpp Image-creation-custom-allocation +@snippet Vk.cpp Image-creation-custom-allocation Using @ref bindDedicatedMemory() instead of @ref bindMemory() will transfer ownership of the @ref Memory to the image instance, making it subsequently @@ -276,7 +276,7 @@ need to do a clear outside of a render pass, it can be done using you'll also need to perform a layout transition first using a @ref CommandBuffer::pipelineBarrier(PipelineStages, PipelineStages, Containers::ArrayView, DependencyFlags) "pipelineBarrier()": -@snippet MagnumVk.cpp Image-usage-clear +@snippet Vk.cpp Image-usage-clear @todoc expand with @fn_vk{CmdClearAttachments} when exposed @@ -299,7 +299,7 @@ image type. In most cases you'll also need to add two commands to perform a layout transition before, and make the memory visible for subsequent operations after. For example: -@snippet MagnumVk.cpp Image-usage-copy-from-buffer +@snippet Vk.cpp Image-usage-copy-from-buffer Alternatively you can use @ref CopyBufferToImageInfo1D / @ref CopyImageToBufferInfo1D, @ref CopyBufferToImageInfo2D / @@ -308,7 +308,7 @@ Alternatively you can use @ref CopyBufferToImageInfo1D / constructors. This can be handy when uploading multiple regions --- for example uploading all mip levels of an image at the same time: -@snippet MagnumVk.cpp Image-usage-copy-from-buffer-multiple +@snippet Vk.cpp Image-usage-copy-from-buffer-multiple Image/image copy is possible as well and is done using @ref CommandBuffer::copyImage(). Because there's a lot of combinations of @@ -317,7 +317,7 @@ case. Together with a layout transition @ref CommandBuffer::pipelineBarrier(PipelineStages, PipelineStages, Containers::ArrayView, DependencyFlags) "pipelineBarrier()" for both images it could look like this: -@snippet MagnumVk.cpp Image-usage-copy-from-image +@snippet Vk.cpp Image-usage-copy-from-image @see @ref Buffer */ diff --git a/src/Magnum/Vk/ImageView.h b/src/Magnum/Vk/ImageView.h index 651b308e8..cee76e476 100644 --- a/src/Magnum/Vk/ImageView.h +++ b/src/Magnum/Vk/ImageView.h @@ -53,7 +53,7 @@ Similarly to @ref Image, a view is created by passing one of the subclass as @ref ImageCreateInfo, but other combinations are possible as well --- see docs of each subclass for more information. -@snippet MagnumVk.cpp ImageView-creation +@snippet Vk.cpp ImageView-creation While it would be *technically* possible to infer a view type from the originating @ref Image and thus avoid having to specify the type twice, the diff --git a/src/Magnum/Vk/Instance.h b/src/Magnum/Vk/Instance.h index d13db7844..c16cfc698 100644 --- a/src/Magnum/Vk/Instance.h +++ b/src/Magnum/Vk/Instance.h @@ -70,12 +70,12 @@ recommended to pass a @ref InstanceCreateInfo with at least the `argc` / `argv` pair, which allows you to use various `--magnum-*` @ref Vk-Instance-command-line "command-line options": -@snippet MagnumVk.cpp Instance-creation-minimal +@snippet Vk.cpp Instance-creation-minimal In addition to command-line arguments, setting application info isn't strictly required either, but may be beneficial for the driver: -@snippet MagnumVk.cpp Instance-creation +@snippet Vk.cpp Instance-creation @@ -96,14 +96,14 @@ both string names as well as predefined *instance* extensions from the @ref Extensions namespace. Later on, presence of predefined extensions can be checked with @ref isExtensionEnabled(). -@snippet MagnumVk.cpp Instance-creation-layers-extensions +@snippet Vk.cpp Instance-creation-layers-extensions However, with the above approach, if any layer or extension isn't available, the instance creation will abort. The recommended workflow is thus first checking layer and extension availability using @ref enumerateLayerProperties() and @ref enumerateInstanceExtensionProperties(): -@snippet MagnumVk.cpp Instance-creation-check-supported +@snippet Vk.cpp Instance-creation-check-supported Next step after creating a Vulkan instance is picking and creating a @ref Device. @@ -170,7 +170,7 @@ In addition to the common properties explained in @ref vulkan-wrapping-raw, the @ref Instance contains instance-level Vulkan function pointers, accessible through @ref operator->(): -@snippet MagnumVk.cpp Instance-function-pointers +@snippet Vk.cpp Instance-function-pointers These functions are by default not accessible globally (and neither there is a global "current instance"), which is done in order to avoid multiple @@ -180,7 +180,7 @@ operate on the same instance, or when writing quick prototype code --- and then it's possible to populate those using @ref populateGlobalFunctionPointers(). Compared to the above, the same custom code would then look like this: -@snippet MagnumVk.cpp Instance-global-function-pointers +@snippet Vk.cpp Instance-global-function-pointers Similarly you can use @ref Device::populateGlobalFunctionPointers() to populate device-level global function pointers. @@ -195,7 +195,7 @@ a difference compared to other Vulkan object wrappers, where you can use the member) and do a delayed creation by moving a new instance over the empty one. Here you have to use the @ref create() function instead: -@snippet MagnumVk.cpp Instance-delayed-creation +@snippet Vk.cpp Instance-delayed-creation Similar case is with @ref wrap() --- instead of being @cpp static @ce, you have to call it on a @ref Instance(NoCreateT) "NoCreate"'d instance. @@ -374,7 +374,7 @@ class MAGNUM_VK_EXPORT Instance { * listed also in the @ref vulkan-support "Vulkan support tables". * Search complexity is @f$ \mathcal{O}(1) @f$. Example usage: * - * @snippet MagnumVk.cpp Instance-isExtensionEnabled + * @snippet Vk.cpp Instance-isExtensionEnabled * * Note that this returns @cpp true @ce only if given extension is * supported by the driver *and* it was enabled via diff --git a/src/Magnum/Vk/Integration.h b/src/Magnum/Vk/Integration.h index 610d1a5cd..512b69de2 100644 --- a/src/Magnum/Vk/Integration.h +++ b/src/Magnum/Vk/Integration.h @@ -61,7 +61,7 @@ unsigned + signed type, which corresponds to a signed range on Magnum side. Example usage: -@snippet MagnumVk.cpp Integration +@snippet Vk.cpp Integration @see @ref types-thirdparty-integration */ diff --git a/src/Magnum/Vk/Memory.h b/src/Magnum/Vk/Memory.h index 2401b0b34..b0eddef26 100644 --- a/src/Magnum/Vk/Memory.h +++ b/src/Magnum/Vk/Memory.h @@ -142,7 +142,7 @@ tag to constructors of these objects), it consists of these steps: The following example allocates a single block memory for two buffers, one containing vertex and the other index data: -@snippet MagnumVk.cpp Memory-allocation +@snippet Vk.cpp Memory-allocation @section Vk-Memory-mapping Memory mapping @@ -165,7 +165,7 @@ means that in order to upload vertex and index data, there are two options: The following example maps the memory allocated above and copies index and vertex data to it: -@snippet MagnumVk.cpp Memory-mapping +@snippet Vk.cpp Memory-mapping diff --git a/src/Magnum/Vk/Mesh.h b/src/Magnum/Vk/Mesh.h index af66d0fc2..df059c34d 100644 --- a/src/Magnum/Vk/Mesh.h +++ b/src/Magnum/Vk/Mesh.h @@ -104,13 +104,13 @@ Continuing from the @ref Vk-MeshLayout-usage "mesh layout setup", the @ref Mesh gets concrete buffers bound using @ref addVertexBuffer() and vertex count specified with @ref setCount(): -@snippet MagnumVk.cpp Mesh-populating +@snippet Vk.cpp Mesh-populating For an indexed mesh, the index buffer can be specified via @ref setIndexBuffer(). With an index buffer present, @ref setCount() then describes count of indices, instead of vertices: -@snippet MagnumVk.cpp Mesh-populating-indexed +@snippet Vk.cpp Mesh-populating-indexed @subsection Vk-Mesh-populating-owned Transferring buffer and layout ownership @@ -121,7 +121,7 @@ or by directly passing a r-value. If a single buffer is used for multiple bindings (for example as both a vertex and an index buffer), perform the move last: -@snippet MagnumVk.cpp Mesh-populating-owned +@snippet Vk.cpp Mesh-populating-owned @section Vk-Mesh-drawing Drawing a mesh @@ -129,7 +129,7 @@ Assuming a rasterization pipeline with the same @ref MeshLayout was bound, a mesh can be then drawn using @ref CommandBuffer::draw(). The function takes care of binding all buffers and executing an appropriate draw command: -@snippet MagnumVk.cpp Mesh-drawing +@snippet Vk.cpp Mesh-drawing @subsection Vk-Mesh-drawing-dynamic Dynamic pipeline state @@ -146,7 +146,7 @@ binding for each attribute you can make the pipeline accept basically any mesh as long as just the attribute locations and types are the same --- offsets and strided of particular attributes are then fully dynamic. -@snippet MagnumVk.cpp Mesh-drawing-dynamic +@snippet Vk.cpp Mesh-drawing-dynamic diff --git a/src/Magnum/Vk/MeshLayout.h b/src/Magnum/Vk/MeshLayout.h index 4eddb3f2d..341d87792 100644 --- a/src/Magnum/Vk/MeshLayout.h +++ b/src/Magnum/Vk/MeshLayout.h @@ -189,7 +189,7 @@ normals in locations @cpp 0 @ce, @cpp 1 @ce and @cpp 5 @ce, respectively. If we'd have them stored interleaved in a single buffer, the layout description could look like this: -@snippet MagnumVk.cpp MeshLayout-usage +@snippet Vk.cpp MeshLayout-usage The `Binding` is then subsequently used as a binding index for a concrete vertex buffer when drawing, which is described in the @ref Mesh class diff --git a/src/Magnum/Vk/Pipeline.h b/src/Magnum/Vk/Pipeline.h index 3ba031b10..97c4b4d1b 100644 --- a/src/Magnum/Vk/Pipeline.h +++ b/src/Magnum/Vk/Pipeline.h @@ -90,7 +90,7 @@ subpass index and the count of color attachments. Apart from that you need to set a viewport using @ref RasterizationPipelineCreateInfo::setViewport() and you end up with a minimal setup needed for color-only rendering: -@snippet MagnumVk.cpp Pipeline-creation-rasterization +@snippet Vk.cpp Pipeline-creation-rasterization Certain aspects of the pipeline can be set as dynamic using @relativeref{RasterizationPipelineCreateInfo,setDynamicStates()} --- in that @@ -103,7 +103,7 @@ Compared to a rasterization pipeline, @ref ComputePipelineCreateInfo only takes a @ref ShaderSet containing a single @ref ShaderStage::Compute shader and a @link PipelineLayout @endlink: -@snippet MagnumVk.cpp Pipeline-creation-compute +@snippet Vk.cpp Pipeline-creation-compute @section Vk-Pipeline-usage Pipeline usage @@ -111,7 +111,7 @@ A pipeline is bound to a compatible command buffer using @ref CommandBuffer::bindPipeline(), which replaces any pipeline bound previously to the same @ref bindPoint(): -@snippet MagnumVk.cpp Pipeline-usage +@snippet Vk.cpp Pipeline-usage */ class MAGNUM_VK_EXPORT Pipeline { public: diff --git a/src/Magnum/Vk/PipelineLayout.h b/src/Magnum/Vk/PipelineLayout.h index fad0b28ee..06b9a38f5 100644 --- a/src/Magnum/Vk/PipelineLayout.h +++ b/src/Magnum/Vk/PipelineLayout.h @@ -53,7 +53,7 @@ case a default-constructed @ref PipelineLayoutCreateInfo would be enough, you'll want to list @ref DescriptorSetLayout instances for all descriptor sets needed by shaders in the pipeline: -@snippet MagnumVk.cpp PipelineLayout-creation +@snippet Vk.cpp PipelineLayout-creation @section Vk-PipelineLayout-usage Pipeline layout usage diff --git a/src/Magnum/Vk/RenderPass.h b/src/Magnum/Vk/RenderPass.h index 631c14205..6dfea9563 100644 --- a/src/Magnum/Vk/RenderPass.h +++ b/src/Magnum/Vk/RenderPass.h @@ -84,7 +84,7 @@ pass, in this case it'll get transferred to the host, as indicated by @ref ImageLayout::TransferSource. That will also need an explicit subpass dependency, as explained below. -@snippet MagnumVk.cpp RenderPass-creation +@snippet Vk.cpp RenderPass-creation @@ -120,7 +120,7 @@ some point* before the start of the renderpass, and the transition to In this case the initial transition is fine; for the transfer layout transition we however need it to happen before we do the actual transfer: -@snippet MagnumVk.cpp RenderPass-dependencies +@snippet Vk.cpp RenderPass-dependencies @section Vk-RenderPass-usage Render pass recording @@ -132,7 +132,7 @@ and a clear value for each attachment that had @ref AttachmentLoadOperation::Clear specified. After that you can execute @ref CommandBuffer commands that are allowed inside a render pass: -@snippet MagnumVk.cpp RenderPass-usage-begin +@snippet Vk.cpp RenderPass-usage-begin Advancing to the next subpass (if any) can be done with @ref CommandBuffer::nextSubpass() "nextSubpass()", and finally @@ -140,7 +140,7 @@ Advancing to the next subpass (if any) can be done with with render pass begin, these make Vulkan schedule implicit layout transitions between subpasses and at render pass end. -@snippet MagnumVk.cpp RenderPass-usage-end +@snippet Vk.cpp RenderPass-usage-end */ class MAGNUM_VK_EXPORT RenderPass { public: diff --git a/src/Magnum/Vk/Sampler.h b/src/Magnum/Vk/Sampler.h index cb67a522a..1adc4cdcc 100644 --- a/src/Magnum/Vk/Sampler.h +++ b/src/Magnum/Vk/Sampler.h @@ -51,12 +51,12 @@ The default-constructed @ref SamplerCreateInfo uses a conservative setup with nearest neighbor filtering and will produce valid results with no need to set up anything else: -@snippet MagnumVk.cpp Sampler-creation +@snippet Vk.cpp Sampler-creation Usually, however, you'll want to set up filtering and mip level selection at least, along with other properties: -@snippet MagnumVk.cpp Sampler-creation-linear +@snippet Vk.cpp Sampler-creation-linear */ class MAGNUM_VK_EXPORT Sampler { diff --git a/src/Magnum/Vk/Shader.h b/src/Magnum/Vk/Shader.h index 8f221fa8d..2bd63a3f2 100644 --- a/src/Magnum/Vk/Shader.h +++ b/src/Magnum/Vk/Shader.h @@ -141,7 +141,7 @@ to which any container is convertible, it can also take ownership of a keeping a loaded file in scope until it's consumed by the @ref Shader constructor: -@snippet MagnumVk.cpp Shader-creation +@snippet Vk.cpp Shader-creation @see @ref CORRADE_INTERNAL_ASSERT_EXPRESSION() */ diff --git a/src/Magnum/Vk/ShaderSet.h b/src/Magnum/Vk/ShaderSet.h index ba579f481..72b8d7e52 100644 --- a/src/Magnum/Vk/ShaderSet.h +++ b/src/Magnum/Vk/ShaderSet.h @@ -116,7 +116,7 @@ for and the entrypoint name --- usually it'd be @cpp main() @ce, but there can be also SPIR-V shader modules with multiple entry points, which is why this parameter is needed. -@snippet MagnumVk.cpp ShaderSet-usage +@snippet Vk.cpp ShaderSet-usage @@ -135,7 +135,7 @@ via an additional parameter, taking a list of @ref ShaderSpecialization instances. The constant can be an integer, float or a boolean; constant IDs not present in the SPIR-V module are ignored. -@snippet MagnumVk.cpp ShaderSet-usage-specializations +@snippet Vk.cpp ShaderSet-usage-specializations @subsection Vk-ShaderSet-usage-ownership-transfer Shader ownership transfer @@ -144,7 +144,7 @@ instances into the class using the @ref addShader(ShaderStage, Shader&&, Contain overload. If you have a multi-entrypoint shader, move only the last specified stage, for example: -@snippet MagnumVk.cpp ShaderSet-usage-ownership-transfer +@snippet Vk.cpp ShaderSet-usage-ownership-transfer */ class MAGNUM_VK_EXPORT ShaderSet { public: