From b16755fc13b4d67cc1b1c5462e46b4cc5dd283cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 12 Jul 2017 17:22:00 +0200 Subject: [PATCH] Doxygen fixes and workarounds. --- src/Magnum/AbstractTexture.cpp | 8 +++++--- src/Magnum/DebugTools/ObjectRenderer.cpp | 3 ++- src/Magnum/Math/Packing.h | 4 ++++ src/Magnum/Math/Range.h | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index 19a3daeb0..a58548758 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -1498,7 +1498,8 @@ void AbstractTexture::subImage2DImplementationDefault(GLint level, const Vector2 glTexSubImage2D(_target, level, offset.x(), offset.y(), size.x(), size.y(), GLenum(format), GLenum(type), data); } -#ifndef MAGNUM_TARGET_GLES +/* Doxygen gets confused by the template parameter */ +#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(MAGNUM_TARGET_GLES) template void AbstractTexture::subImageImplementationSvga3DSliceBySlice(GLint level, const Vector2i& offset, const Vector2i& size, PixelFormat format, PixelType type, const GLvoid* const data, const PixelStorage& storage) { /* Upload the data slice by slice only if this is an array texture and we are copying from user memory (not from a buffer) */ @@ -1603,8 +1604,9 @@ void AbstractTexture::subImage3DImplementationDefault(GLint level, const Vector3 #endif } -#ifndef MAGNUM_TARGET_WEBGL -template void AbstractTexture::subImageImplementationSvga3DSliceBySlice(GLint level, const Vector3i& offset, const Vector3i& size, PixelFormat format, PixelType type, const GLvoid* data, const PixelStorage& storage) { +/* Doxygen gets confused by the template parameter */ +#if !defined(DOXYGEN_GENERATING_OUTPUT) && !defined(MAGNUM_TARGET_WEBGL) +template void AbstractTexture::subImageImplementationSvga3DSliceBySlice(GLint level, const Vector3i& offset, const Vector3i& size, PixelFormat format, PixelType type, const GLvoid* const data, const PixelStorage& storage) { /* Upload the data slice by slice only if this is an array texture and we are copying from user memory (not from a buffer) */ if( diff --git a/src/Magnum/DebugTools/ObjectRenderer.cpp b/src/Magnum/DebugTools/ObjectRenderer.cpp index 8d25e2d27..3a7aea5b3 100644 --- a/src/Magnum/DebugTools/ObjectRenderer.cpp +++ b/src/Magnum/DebugTools/ObjectRenderer.cpp @@ -60,7 +60,8 @@ template<> struct Renderer<3> { } -template ObjectRenderer::ObjectRenderer(SceneGraph::AbstractObject& object, ResourceKey options, SceneGraph::DrawableGroup* drawables): SceneGraph::Drawable{object, drawables}, _options{ResourceManager::instance().get(options)} { +/* Doxygen gets confused when using {} to initialize parent object */ +template ObjectRenderer::ObjectRenderer(SceneGraph::AbstractObject& object, ResourceKey options, SceneGraph::DrawableGroup* drawables): SceneGraph::Drawable(object, drawables), _options{ResourceManager::instance().get(options)} { /* Shader */ _shader = ResourceManager::instance().get>(Renderer::shader()); if(!_shader) ResourceManager::instance().set(_shader.key(), new Shaders::VertexColor); diff --git a/src/Magnum/Math/Packing.h b/src/Magnum/Math/Packing.h index 897043b91..86b348b69 100644 --- a/src/Magnum/Math/Packing.h +++ b/src/Magnum/Math/Packing.h @@ -25,6 +25,10 @@ DEALINGS IN THE SOFTWARE. */ +/** @file + * @brief Functions @ref Magnum::Math::pack(), @ref Magnum::Math::unpack(), @ref Magnum::Math::packHalf(), @ref Magnum::Math::unpackHalf() + */ + #include "Magnum/Math/Functions.h" namespace Magnum { namespace Math { diff --git a/src/Magnum/Math/Range.h b/src/Magnum/Math/Range.h index 505f6530c..015726d5b 100644 --- a/src/Magnum/Math/Range.h +++ b/src/Magnum/Math/Range.h @@ -526,7 +526,7 @@ template class Range3D: public Range<3, T> { MAGNUM_RANGE_SUBCLASS_IMPLEMENTATION(3, Range3D, Vector3) }; -/** @relates Range +/** @relatesalso Range @brief Join two ranges Returns a range that contains both input ranges. If one of the ranges is empty,