From 82c9485bc16c15916aeffa1eac3623fbd3135238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 17 Sep 2022 19:45:32 +0200 Subject: [PATCH] Doc++, updated credits & changelog. --- doc/changelog.dox | 10 ++++++++++ doc/credits.dox | 6 +++--- src/Magnum/GL/AbstractShaderProgram.h | 12 +++++------- src/Magnum/GL/Buffer.cpp | 1 + src/Magnum/GL/Buffer.h | 8 +++++++- src/Magnum/GL/TransformFeedback.cpp | 1 + src/Magnum/GL/TransformFeedback.h | 10 ++++++++-- 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index bd6dd1e95..0fc889703 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -382,6 +382,9 @@ See also: - Added an @ref GL::AbstractShaderProgram::setTransformFeedbackOutputs() overload taking a @relativeref{Corrade,Containers::ArrayView} instead of a @ref std::initializer_list +- Added @ref GL::Buffer::bind() and @ref GL::TransformFeedback::attachBuffers() + overloads taking a @relativeref{Corrade,Containers::ArrayView} instead of a + @ref std::initializer_list (see [mosra/magnum#588](https://github.com/mosra/magnum/pull/588)) - @ref GL::Buffer::data() and @ref GL::Buffer::subData() is now available on WebGL 2.0 as well if Emscripten 2.0.17+ is used (see [mosra/magnum#560](https://github.com/mosra/magnum/pull/560)) @@ -1089,6 +1092,13 @@ See also: on ES2 builds by mistake --- the @gl_extension{EXT,texture_sRGB_R8} and @gl_extension{EXT,texture_sRGB_RG8} extensions require OpenGL ES 3.0 at least +- @ref GL::Buffer::bind() and @ref GL::TransformFeedback::attachBuffers() + overloads that used to take a @ref std::initializer_list of @ref std::tuple + are removed, as they caused ambiguity with a new + @relativeref{Corrade,Containers::Triple} overload. If your code used + @ref std::make_tuple() previously, change it to a simple @cpp {} @ce, if + you were already using C++14 @cpp {} @ce tuple construction, you don't need + to change anything. - @ref Math::Complex::fromMatrix() and @ref Math::Quaternion::fromMatrix() now additionaly assert that the input matrix is a pure rotation without any reflections. Before it only asserted for orthogonality, but that led to diff --git a/doc/credits.dox b/doc/credits.dox index 29bed54ce..f63a63132 100644 --- a/doc/credits.dox +++ b/doc/credits.dox @@ -146,9 +146,9 @@ Are the below lists missing your name or something's wrong? improvements to Debian package building experience - **Hilario Pérez Corona** ([\@hpcorona](https://github.com/hpcorona)) --- improvements to @cb{.cmake} android_create_apk() @ce -- **Hugo Amnov** ([\@hugoam](https://github.com/hugoam)) --- Additions and - performance optimization in the @ref GL library, buildsystem improvements - and STL usage cleanup +- **Hugo Amnov** ([\@hugoam](https://github.com/hugoam)) --- Additions, + usability improvements and performance optimization in the @ref GL library, + buildsystem improvements and STL usage cleanup - **Ivan P.** ([\@uzername](https://github.com/uzername)) --- documentation improvements - **Ivan Sanz Carasa** ([\@isc30](https://github.com/isc30)) --- buildsystem diff --git a/src/Magnum/GL/AbstractShaderProgram.h b/src/Magnum/GL/AbstractShaderProgram.h index d72d37ec6..ee98bb08f 100644 --- a/src/Magnum/GL/AbstractShaderProgram.h +++ b/src/Magnum/GL/AbstractShaderProgram.h @@ -303,8 +303,8 @@ layout(binding = 1) uniform sampler2D specularTexture; If you don't have the required version/extension, declare the uniforms without the `binding` qualifier and set the texture binding unit using -@ref setUniform(Int, const T&) "setUniform(Int, Int)". Note that additional -syntax changes may be needed for GLSL ES. +@ref setUniform(Int, Int). Note that additional syntax changes may be needed +for GLSL ES. @code{.glsl} uniform sampler2D diffuseTexture; @@ -315,13 +315,11 @@ uniform sampler2D specularTexture; @see @ref Shader::maxTextureImageUnits(), @ref maxImageUnits() @requires_gl42 Extension @gl_extension{ARB,shading_language_420pack} for explicit - texture binding unit instead of using - @ref setUniform(Int, const T&) "setUniform(Int, Int)". + texture binding unit instead of using @ref setUniform(Int, Int). @requires_gles31 Explicit texture binding unit is not supported in OpenGL ES - 3.0 and older. Use @ref setUniform(Int, const T&) "setUniform(Int, Int)" - instead. + 3.0 and older. Use @ref setUniform(Int, Int) instead. @requires_gles Explicit texture binding unit is not supported in WebGL. Use - @ref setUniform(Int, const T&) "setUniform(Int, Int)" instead. + @ref setUniform(Int, Int) instead. @subsection GL-AbstractShaderProgram-transform-feedback Specifying transform feedback binding points diff --git a/src/Magnum/GL/Buffer.cpp b/src/Magnum/GL/Buffer.cpp index 4d26d3c9c..eb9eb9c4a 100644 --- a/src/Magnum/GL/Buffer.cpp +++ b/src/Magnum/GL/Buffer.cpp @@ -4,6 +4,7 @@ Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Vladimír Vondruš Copyright © 2022 Pablo Escobar + Copyright @ 2022 Hugo Amiard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/src/Magnum/GL/Buffer.h b/src/Magnum/GL/Buffer.h index cdec63478..87413cfd8 100644 --- a/src/Magnum/GL/Buffer.h +++ b/src/Magnum/GL/Buffer.h @@ -6,6 +6,7 @@ Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Vladimír Vondruš Copyright © 2022 Pablo Escobar + Copyright @ 2022 Hugo Amiard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -735,6 +736,7 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject { /** * @brief Bind ranges of buffers to given range of indexed targets + * @m_since_latest * * Binds first buffer in the list to @p firstIndex, second to * @cpp firstIndex + 1 @ce etc. Second parameter is offset, third is @@ -768,11 +770,15 @@ class MAGNUM_GL_EXPORT Buffer: public AbstractObject { */ static void bind(Target target, UnsignedInt firstIndex, Containers::ArrayView> buffers); - /** @overload */ + /** + * @overload + * @m_since_latest + */ static void bind(Target target, UnsignedInt firstIndex, std::initializer_list> buffers); /** * @brief Bind buffers to given range of indexed targets + * @m_since_latest * * Binds first buffer in the list to @p firstIndex, second to * @cpp firstIndex + 1 @ce etc. If any buffer is @cpp nullptr @ce, diff --git a/src/Magnum/GL/TransformFeedback.cpp b/src/Magnum/GL/TransformFeedback.cpp index b0479ea64..b063bb1e7 100644 --- a/src/Magnum/GL/TransformFeedback.cpp +++ b/src/Magnum/GL/TransformFeedback.cpp @@ -3,6 +3,7 @@ Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Vladimír Vondruš + Copyright @ 2022 Hugo Amiard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff --git a/src/Magnum/GL/TransformFeedback.h b/src/Magnum/GL/TransformFeedback.h index 878d9385c..17144c08b 100644 --- a/src/Magnum/GL/TransformFeedback.h +++ b/src/Magnum/GL/TransformFeedback.h @@ -5,6 +5,7 @@ Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Vladimír Vondruš + Copyright @ 2022 Hugo Amiard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -321,6 +322,7 @@ class MAGNUM_GL_EXPORT TransformFeedback: public AbstractObject { /** * @brief Attach ranges of buffers * @return Reference to self (for method chaining) + * @m_since_latest * * Attches first buffer in the list to @p firstIndex, second to * `firstIndex + 1` etc. Second parameter is offset, third is size. If @@ -332,7 +334,7 @@ class MAGNUM_GL_EXPORT TransformFeedback: public AbstractObject { * @gl_extension{ARB,direct_state_access} (part of OpenGL 4.5) is not * available, the transform feedback object is bound (if not already) * and the operation is then done equivalently to - * @ref Buffer::bind(Buffer::Target, UnsignedInt, std::initializer_list>). + * @ref Buffer::bind(Buffer::Target, UnsignedInt, Containers::ArrayView>). * @note This function is meant to be used only internally from * @ref AbstractShaderProgram subclasses. See its documentation * for more information. @@ -342,12 +344,16 @@ class MAGNUM_GL_EXPORT TransformFeedback: public AbstractObject { */ TransformFeedback& attachBuffers(UnsignedInt firstIndex, Containers::ArrayView> buffers); - /** @overload */ + /** + * @overload + * @m_since_latest + */ TransformFeedback& attachBuffers(UnsignedInt firstIndex, std::initializer_list> buffers); /** * @brief Attach buffers * @return Reference to self (for method chaining) + * @m_since_latest * * Attches first buffer in the list to @p firstIndex, second to * `firstIndex + 1` etc. If any buffer is @cpp nullptr @ce, given index