From 946c3cdac9a5a18c6f8545df90d6562f6d8158ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 22 Feb 2020 21:22:07 +0100 Subject: [PATCH] GL: rename PixelType::HalfFloat and Attribute::DataType::HalfFloat to Half. For consistency with the Half type we use elsewhere. The old enums are still available, but deprecated and scheduled for removal. --- doc/changelog.dox | 8 ++- src/Magnum/GL/AbstractTexture.cpp | 2 +- src/Magnum/GL/Attribute.cpp | 14 ++--- src/Magnum/GL/Attribute.h | 51 +++++++++++++++---- .../GL/Implementation/pixelFormatMapping.hpp | 16 +++--- src/Magnum/GL/PixelFormat.cpp | 4 +- src/Magnum/GL/PixelFormat.h | 13 ++++- src/Magnum/GL/Test/AttributeTest.cpp | 6 +-- src/Magnum/GL/Test/FramebufferGLTest.cpp | 2 +- src/Magnum/GL/Test/MeshGLTest.cpp | 10 ++-- src/Magnum/GL/TextureFormat.h | 28 +++++----- src/Magnum/PixelFormat.h | 17 +++---- 12 files changed, 108 insertions(+), 63 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index ff66ce5ce..85054f5bc 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -307,6 +307,12 @@ See also: @subsection changelog-latest-deprecated Deprecated APIs +- @cpp GL::Attribute::DataType::HalfFloat @ce, + @cpp GL::DynamicAttribute::DataType::HalfFloat @ce and + @cpp GL::PixelType::HalfFloat @ce is deprecated in favor of + @ref GL::Attribute::DataType::Half, + @ref GL::DynamicAttribute::DataType::Half and @ref GL::PixelType::Half that + are consistent with the @ref Half type used elsewhere. - @cpp Platform::GlfwApplication::Configuration::setCursorMode() @ce and related enum & getter are deprecated in favor of the new extended and more flexible @ref Platform::GlfwApplication::setCursor(). The setting didn't @@ -2166,7 +2172,7 @@ Released 2018-05-01, tagged as strings. See the @cpp "emscripten-pthreads-broken-unicode-shader-sources" @ce workaround description and [mosra/magnum#239](https://github.com/mosra/magnum/issues/239) for details. -- @ref GL::Attribute::DataType::HalfFloat was not available on WebGL 2 by +- @cpp GL::Attribute::DataType::HalfFloat @ce was not available on WebGL 2 by mistake - A wrong code path for @ref GL::Framebuffer::checkStatus() was selected on WebGL 1 by mistake diff --git a/src/Magnum/GL/AbstractTexture.cpp b/src/Magnum/GL/AbstractTexture.cpp index fa3a645ef..675ded8f2 100644 --- a/src/Magnum/GL/AbstractTexture.cpp +++ b/src/Magnum/GL/AbstractTexture.cpp @@ -1075,7 +1075,7 @@ PixelType pixelTypeForInternalFormat(const TextureFormat internalFormat) { case TextureFormat::RG16F: case TextureFormat::RGB16F: case TextureFormat::RGBA16F: - return PixelType::HalfFloat; + return PixelType::Half; case TextureFormat::R32UI: case TextureFormat::RG32UI: diff --git a/src/Magnum/GL/Attribute.cpp b/src/Magnum/GL/Attribute.cpp index f19e7c402..8fc5b39b2 100644 --- a/src/Magnum/GL/Attribute.cpp +++ b/src/Magnum/GL/Attribute.cpp @@ -84,7 +84,7 @@ Debug& operator<<(Debug& debug, const DynamicAttribute::DataType value) { _c(UnsignedInt) _c(Int) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - _c(HalfFloat) + _c(Half) #endif _c(Float) #ifndef MAGNUM_TARGET_GLES @@ -112,7 +112,7 @@ UnsignedInt FloatAttribute::size(GLint components, DataType dataType) { case DataType::UnsignedShort: case DataType::Short: #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - case DataType::HalfFloat: + case DataType::Half: #endif return 2*components; case DataType::UnsignedInt: @@ -165,7 +165,7 @@ UnsignedInt Attribute>::size(GLint components, DataType d case DataType::UnsignedShort: case DataType::Short: #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - case DataType::HalfFloat: + case DataType::Half: #endif return 2*components; case DataType::UnsignedInt: @@ -196,7 +196,7 @@ UnsignedInt Attribute>::size(GLint components, DataType d case DataType::UnsignedShort: case DataType::Short: #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - case DataType::HalfFloat: + case DataType::Half: #endif return 2*components; case DataType::UnsignedInt: @@ -358,7 +358,7 @@ Debug& operator<<(Debug& debug, const FloatAttribute::DataType value) { _c(UnsignedInt) _c(Int) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - _c(HalfFloat) + _c(Half) #endif _c(Float) #ifndef MAGNUM_TARGET_GLES @@ -421,7 +421,7 @@ Debug& operator<<(Debug& debug, const Attribute>::DataTyp _c(UnsignedInt) _c(Int) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - _c(HalfFloat) + _c(Half) #endif _c(Float) #ifndef MAGNUM_TARGET_GLES @@ -448,7 +448,7 @@ Debug& operator<<(Debug& debug, const Attribute>::DataTyp _c(UnsignedInt) _c(Int) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - _c(HalfFloat) + _c(Half) #endif _c(Float) #ifndef MAGNUM_TARGET_GLES diff --git a/src/Magnum/GL/Attribute.h b/src/Magnum/GL/Attribute.h index eed949037..c6f37c277 100644 --- a/src/Magnum/GL/Attribute.h +++ b/src/Magnum/GL/Attribute.h @@ -36,6 +36,10 @@ #include "Magnum/GL/visibility.h" #include "Magnum/Math/TypeTraits.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { namespace GL { namespace Implementation { template struct Attribute; } @@ -181,6 +185,7 @@ template class Attribute { #ifndef MAGNUM_TARGET_WEBGL /** * Half float. Only for float attribute types. + * @m_since_latest * @requires_gl30 Extension @gl_extension{ARB,half_float_vertex} * @requires_gles30 Extension @gl_extension{OES,vertex_half_float} * in OpenGL ES 2.0 @@ -188,9 +193,17 @@ template class Attribute { * in WebGL 1.0. */ #ifndef MAGNUM_TARGET_GLES2 - HalfFloat = GL_HALF_FLOAT, + Half = GL_HALF_FLOAT, #else - HalfFloat = GL_HALF_FLOAT_OES, + Half = GL_HALF_FLOAT_OES, + #endif + + #ifdef MAGNUM_BUILD_DEPRECATED + /** + * Half float. + * @m_deprecated_since_latest Use @ref DataType::Half instead. + */ + HalfFloat CORRADE_DEPRECATED_ENUM("use Half instead") = Half, #endif #endif @@ -445,6 +458,7 @@ class DynamicAttribute { #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) /** * Half float. Only for float attribute types. + * @m_since_latest * @requires_gl30 Extension @gl_extension{ARB,half_float_vertex} * @requires_gles30 Extension @gl_extension{OES,vertex_half_float} * in OpenGL ES 2.0 @@ -452,9 +466,17 @@ class DynamicAttribute { * in WebGL 1.0. */ #ifndef MAGNUM_TARGET_GLES2 - HalfFloat = GL_HALF_FLOAT, + Half = GL_HALF_FLOAT, #else - HalfFloat = GL_HALF_FLOAT_OES, + Half = GL_HALF_FLOAT_OES, + #endif + + #ifdef MAGNUM_BUILD_DEPRECATED + /** + * Half float. + * @m_deprecated_since_latest Use @ref Half instead. + */ + HalfFloat CORRADE_DEPRECATED_ENUM("use Half instead") = Half, #endif #endif @@ -641,9 +663,12 @@ struct FloatAttribute { Int = GL_INT, #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #ifndef MAGNUM_TARGET_GLES2 - HalfFloat = GL_HALF_FLOAT, + Half = GL_HALF_FLOAT, #else - HalfFloat = GL_HALF_FLOAT_OES, + Half = GL_HALF_FLOAT_OES, + #endif + #ifdef MAGNUM_BUILD_DEPRECATED + HalfFloat CORRADE_DEPRECATED_ENUM("use Half instead") = Half, #endif #endif Float = GL_FLOAT @@ -741,9 +766,12 @@ template<> struct Attribute>: SizedAttribute<1, 3> { Int = GL_INT, #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #ifndef MAGNUM_TARGET_GLES2 - HalfFloat = GL_HALF_FLOAT, + Half = GL_HALF_FLOAT, #else - HalfFloat = GL_HALF_FLOAT_OES, + Half = GL_HALF_FLOAT_OES, + #endif + #ifdef MAGNUM_BUILD_DEPRECATED + HalfFloat CORRADE_DEPRECATED_ENUM("use Half instead") = Half, #endif #endif Float = GL_FLOAT @@ -789,9 +817,12 @@ template<> struct Attribute> { Int = GL_INT, #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #ifndef MAGNUM_TARGET_GLES2 - HalfFloat = GL_HALF_FLOAT, + Half = GL_HALF_FLOAT, #else - HalfFloat = GL_HALF_FLOAT_OES, + Half = GL_HALF_FLOAT_OES, + #endif + #ifdef MAGNUM_BUILD_DEPRECATED + HalfFloat CORRADE_DEPRECATED_ENUM("use Half instead") = Half, #endif #endif Float = GL_FLOAT diff --git a/src/Magnum/GL/Implementation/pixelFormatMapping.hpp b/src/Magnum/GL/Implementation/pixelFormatMapping.hpp index 90bd738e6..babc1b3da 100644 --- a/src/Magnum/GL/Implementation/pixelFormatMapping.hpp +++ b/src/Magnum/GL/Implementation/pixelFormatMapping.hpp @@ -162,15 +162,15 @@ _s(RGB32I) _s(RGBA32I) #endif #ifndef MAGNUM_TARGET_GLES2 -_c(R16F, Red, HalfFloat, R16F) -_c(RG16F, RG, HalfFloat, RG16F) -_c(RGB16F, RGB, HalfFloat, RGB16F) -_c(RGBA16F, RGBA, HalfFloat, RGBA16F) +_c(R16F, Red, Half, R16F) +_c(RG16F, RG, Half, RG16F) +_c(RGB16F, RGB, Half, RGB16F) +_c(RGBA16F, RGBA, Half, RGBA16F) #else -_n(R16F, Luminance, HalfFloat) -_n(RG16F, LuminanceAlpha, HalfFloat) -_n(RGB16F, RGB, HalfFloat) -_n(RGBA16F, RGBA, HalfFloat) +_n(R16F, Luminance, Half) +_n(RG16F, LuminanceAlpha, Half) +_n(RGB16F, RGB, Half) +_n(RGBA16F, RGBA, Half) #endif #ifndef MAGNUM_TARGET_GLES2 _c(R32F, Red, Float, R32F) diff --git a/src/Magnum/GL/PixelFormat.cpp b/src/Magnum/GL/PixelFormat.cpp index fb45118f0..0d67c0793 100644 --- a/src/Magnum/GL/PixelFormat.cpp +++ b/src/Magnum/GL/PixelFormat.cpp @@ -138,7 +138,7 @@ UnsignedInt pixelSize(const PixelFormat format, const PixelType type) { #ifndef MAGNUM_TARGET_GLES2 case PixelType::Short: #endif - case PixelType::HalfFloat: + case PixelType::Half: size = 2; break; case PixelType::UnsignedInt: #ifndef MAGNUM_TARGET_GLES2 @@ -351,7 +351,7 @@ Debug& operator<<(Debug& debug, const PixelType value) { #ifndef MAGNUM_TARGET_GLES2 _c(Int) #endif - _c(HalfFloat) + _c(Half) _c(Float) #ifndef MAGNUM_TARGET_GLES _c(UnsignedByte332) diff --git a/src/Magnum/GL/PixelFormat.h b/src/Magnum/GL/PixelFormat.h index a5b1feb16..93adddbcb 100644 --- a/src/Magnum/GL/PixelFormat.h +++ b/src/Magnum/GL/PixelFormat.h @@ -410,6 +410,7 @@ enum class PixelType: GLenum { /** * Each component half float. * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() + * @m_since_latest * @requires_gl30 Extension @gl_extension{ARB,half_float_pixel} * @requires_gles30 Extension @gl_extension2{OES,texture_half_float,OES_texture_float} * to use for texture reading in OpenGL ES 2.0. @@ -425,9 +426,17 @@ enum class PixelType: GLenum { * to use the texture as a render target. */ #ifndef MAGNUM_TARGET_GLES2 - HalfFloat = GL_HALF_FLOAT, + Half = GL_HALF_FLOAT, #else - HalfFloat = GL_HALF_FLOAT_OES, + Half = GL_HALF_FLOAT_OES, + #endif + + #ifdef MAGNUM_BUILD_DEPRECATED + /** + * Half float. + * @m_deprecated_since_latest Use @ref PixelFormat::Half instead. + */ + HalfFloat CORRADE_DEPRECATED_ENUM("use Half instead") = Half, #endif /** diff --git a/src/Magnum/GL/Test/AttributeTest.cpp b/src/Magnum/GL/Test/AttributeTest.cpp index 8933d5041..3cc14a565 100644 --- a/src/Magnum/GL/Test/AttributeTest.cpp +++ b/src/Magnum/GL/Test/AttributeTest.cpp @@ -381,7 +381,7 @@ void AttributeTest::attributeVector4() { CORRADE_COMPARE(da.components(), DynamicAttribute::Components::Four); CORRADE_COMPARE(da.dataType(), DynamicAttribute::DataType::UnsignedInt2101010Rev); #elif !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - Attribute a(Attribute::DataType::HalfFloat); + Attribute a(Attribute::DataType::Half); CORRADE_COMPARE(a.vectorSize(), 8); #else Attribute a(Attribute::DataType::Float); @@ -562,8 +562,8 @@ void AttributeTest::debugDataTypeFloat() { std::ostringstream out; #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - Debug{&out} << Attribute::DataType::HalfFloat << Attribute::DataType(0xdead); - CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::HalfFloat GL::Attribute::DataType(0xdead)\n"); + Debug{&out} << Attribute::DataType::Half << Attribute::DataType(0xdead); + CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::Half GL::Attribute::DataType(0xdead)\n"); #else Debug{&out} << Attribute::DataType::Float << Attribute::DataType(0xdead); CORRADE_COMPARE(out.str(), "GL::Attribute::DataType::Float GL::Attribute::DataType(0xdead)\n"); diff --git a/src/Magnum/GL/Test/FramebufferGLTest.cpp b/src/Magnum/GL/Test/FramebufferGLTest.cpp index e53112296..e0c17596f 100644 --- a/src/Magnum/GL/Test/FramebufferGLTest.cpp +++ b/src/Magnum/GL/Test/FramebufferGLTest.cpp @@ -195,7 +195,7 @@ constexpr struct { }, #ifndef MAGNUM_TARGET_GLES2 {"integer", RenderbufferFormat::RG32UI, PixelFormat::RGInteger, PixelType::UnsignedInt}, - {"float", RenderbufferFormat::RGBA16F, PixelFormat::RGBA, PixelType::HalfFloat} + {"float", RenderbufferFormat::RGBA16F, PixelFormat::RGBA, PixelType::Half} #endif }; diff --git a/src/Magnum/GL/Test/MeshGLTest.cpp b/src/Magnum/GL/Test/MeshGLTest.cpp index 351e6c697..cc52cf637 100644 --- a/src/Magnum/GL/Test/MeshGLTest.cpp +++ b/src/Magnum/GL/Test/MeshGLTest.cpp @@ -97,7 +97,7 @@ struct MeshGLTest: OpenGLTester { #endif #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) /* Other Float types omitted (covered by addVertexBufferNormalized()) */ - void addVertexBufferFloatWithHalfFloat(); + void addVertexBufferFloatWithHalf(); #endif #ifndef MAGNUM_TARGET_GLES void addVertexBufferFloatWithDouble(); @@ -214,7 +214,7 @@ MeshGLTest::MeshGLTest() { &MeshGLTest::addVertexBufferIntWithShort, #endif #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) - &MeshGLTest::addVertexBufferFloatWithHalfFloat, + &MeshGLTest::addVertexBufferFloatWithHalf, #endif #ifndef MAGNUM_TARGET_GLES &MeshGLTest::addVertexBufferFloatWithDouble, @@ -1339,7 +1339,7 @@ void MeshGLTest::addVertexBufferIntWithShort() { #endif #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) -void MeshGLTest::addVertexBufferFloatWithHalfFloat() { +void MeshGLTest::addVertexBufferFloatWithHalf() { #ifndef MAGNUM_TARGET_GLES if(!Context::current().isExtensionSupported()) CORRADE_SKIP(Extensions::ARB::half_float_vertex::string() + std::string(" is not supported.")); @@ -1357,13 +1357,13 @@ void MeshGLTest::addVertexBufferFloatWithHalfFloat() { if(testCaseInstanceId() == 0) { setTestCaseDescription("Attribute"); - mesh.addVertexBuffer(buffer, 2, Attribute<0, Float>{Attribute<0, Float>::DataType::HalfFloat}); + mesh.addVertexBuffer(buffer, 2, Attribute<0, Float>{Attribute<0, Float>::DataType::Half}); } else if(testCaseInstanceId() == 1) { setTestCaseDescription("DynamicAttribute"); mesh.addVertexBuffer(buffer, 2, 2, DynamicAttribute{ DynamicAttribute::Kind::Generic, 0, DynamicAttribute::Components::One, - DynamicAttribute::DataType::HalfFloat}); + DynamicAttribute::DataType::Half}); } else CORRADE_ASSERT_UNREACHABLE(); MAGNUM_VERIFY_NO_GL_ERROR(); diff --git a/src/Magnum/GL/TextureFormat.h b/src/Magnum/GL/TextureFormat.h index cbc5f6c8a..cb9ee93a9 100644 --- a/src/Magnum/GL/TextureFormat.h +++ b/src/Magnum/GL/TextureFormat.h @@ -137,7 +137,7 @@ enum class TextureFormat: GLenum { * @deprecated_gl Prefer to use the exactly specified version of this * format, e.g. @ref TextureFormat::RGB8. * @requires_webgl20 Extension @webgl_extension{OES,texture_half_float_linear} - * for filtering @ref PixelType::HalfFloat textures using + * for filtering @ref PixelType::Half textures using * @ref SamplerFilter::Linear in WebGL 1.0. */ RGB = GL_RGB, @@ -170,7 +170,7 @@ enum class TextureFormat: GLenum { * @deprecated_gl Prefer to use the exactly specified version of this * format, e.g. @ref TextureFormat::RGBA8. * @requires_webgl20 Extension @webgl_extension{OES,texture_half_float_linear} - * for filtering @ref PixelType::HalfFloat textures using + * for filtering @ref PixelType::Half textures using * @ref SamplerFilter::Linear in WebGL 1.0. */ RGBA = GL_RGBA, @@ -665,7 +665,7 @@ enum class TextureFormat: GLenum { * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() * @requires_gl30 Extension @gl_extension{ARB,texture_rg} and @gl_extension{ARB,texture_float} * @requires_gles30 Use @ref TextureFormat::Red / @ref TextureFormat::Luminance - * in combination with @ref PixelType::HalfFloat + * in combination with @ref PixelType::Half * (@gl_extension2{OES,texture_half_float,OES_texture_float}) in OpenGL * ES 2.0 instead. * @requires_gles30 Extension @gl_extension2{OES,texture_half_float_linear,OES_texture_float_linear} @@ -674,7 +674,7 @@ enum class TextureFormat: GLenum { * use as a render target. Use @ref TextureFormat::R16UI or * @ref TextureFormat::R16I instead if not available. * @requires_webgl20 Use @ref TextureFormat::Red / @ref TextureFormat::Luminance - * in combination with @ref PixelType::HalfFloat (@webgl_extension{OES,texture_half_float}) + * in combination with @ref PixelType::Half (@webgl_extension{OES,texture_half_float}) * in WebGL 1.0. * @requires_webgl20 Extension @webgl_extension{OES,texture_half_float_linear} * for filtering using @ref SamplerFilter::Linear in WebGL 1.0. @@ -692,7 +692,7 @@ enum class TextureFormat: GLenum { * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() * @requires_gl30 Extension @gl_extension{ARB,texture_rg} and @gl_extension{ARB,texture_float} * @requires_gles30 Use @ref TextureFormat::RG / @ref TextureFormat::LuminanceAlpha - * in combination with @ref PixelType::HalfFloat + * in combination with @ref PixelType::Half * (@gl_extension2{OES,texture_half_float,OES_texture_float}) in OpenGL * ES 2.0 instead. * @requires_gles30 Extension @gl_extension2{OES,texture_half_float_linear,OES_texture_float_linear} @@ -701,7 +701,7 @@ enum class TextureFormat: GLenum { * use as a render target in OpenGL ES. Use @ref TextureFormat::RG16UI * or @ref TextureFormat::RG16I instead if not available. * @requires_webgl20 Use @ref TextureFormat::RG / @ref TextureFormat::LuminanceAlpha - * in combination with @ref PixelType::HalfFloat (@webgl_extension{OES,texture_half_float}) + * in combination with @ref PixelType::Half (@webgl_extension{OES,texture_half_float}) * in WebGL 1.0 instead. * @requires_webgl20 Extension @webgl_extension{OES,texture_half_float_linear} * for filtering using @ref SamplerFilter::Linear in WebGL 1.0. @@ -719,16 +719,16 @@ enum class TextureFormat: GLenum { * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() * @requires_gl30 Extension @gl_extension{ARB,texture_float} * @requires_gles30 Use @ref TextureFormat::RGB in combination with - * @ref PixelType::HalfFloat (@gl_extension2{OES,texture_half_float,OES_texture_float}) + * @ref PixelType::Half (@gl_extension2{OES,texture_half_float,OES_texture_float}) * in OpenGL ES 2.0 instead. * @requires_gles30 Extension @gl_extension2{OES,texture_half_float_linear,OES_texture_float_linear} * for filtering using @ref SamplerFilter::Linear in OpenGL ES 2.0. * @requires_webgl20 Use @ref TextureFormat::RGB in combination with - * @ref PixelType::HalfFloat (@webgl_extension{OES,texture_half_float}) - * in WebGL 1.0 instead. + * @ref PixelType::Half (@webgl_extension{OES,texture_half_float}) in + * WebGL 1.0 instead. * @requires_gl Can't be used as a render target in OpenGL ES or WebGL 2.0. * Use @ref TextureFormat::RGBA16F instead. Use @ref TextureFormat::RGB - * in combination with @ref PixelType::HalfFloat + * in combination with @ref PixelType::Half * (@webgl_extension{EXT,color_buffer_half_float}) in WebGL 1.0 * instead. */ @@ -739,7 +739,7 @@ enum class TextureFormat: GLenum { * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() * @requires_gl30 Extension @gl_extension{ARB,texture_float} * @requires_gles30 Use @ref TextureFormat::RGBA in combination with - * @ref PixelType::HalfFloat (@gl_extension2{OES,texture_half_float,OES_texture_float}) + * @ref PixelType::Half (@gl_extension2{OES,texture_half_float,OES_texture_float}) * in OpenGL ES 2.0 instead. * @requires_gles30 Extension @gl_extension2{OES,texture_half_float_linear,OES_texture_float_linear} * for filtering using @ref SamplerFilter::Linear. @@ -747,12 +747,12 @@ enum class TextureFormat: GLenum { * use as a render target in OpenGL ES. Use @ref TextureFormat::RGBA16UI * or @ref TextureFormat::RGBA16I instead if not available. * @requires_webgl20 Use @ref TextureFormat::RGBA in combination with - * @ref PixelType::HalfFloat (@webgl_extension{OES,texture_half_float}) - * in WebGL 1.0 instead. + * @ref PixelType::Half (@webgl_extension{OES,texture_half_float}) in + * WebGL 1.0 instead. * @requires_webgl_extension Extension @webgl_extension{EXT,color_buffer_float} * to use as a render target in WebGL 2.0. Use @ref TextureFormat::RGBA16UI * or @ref TextureFormat::RGBA16I instead if not available. Use - * @ref TextureFormat::RGBA in combination with @ref PixelType::HalfFloat + * @ref TextureFormat::RGBA in combination with @ref PixelType::Half * (@webgl_extension{EXT,color_buffer_half_float}) in WebGL 1.0 instead. */ RGBA16F = GL_RGBA16F, diff --git a/src/Magnum/PixelFormat.h b/src/Magnum/PixelFormat.h index dc42e4bfc..58c4d756b 100644 --- a/src/Magnum/PixelFormat.h +++ b/src/Magnum/PixelFormat.h @@ -581,9 +581,8 @@ enum class PixelFormat: UnsignedInt { /** * Red component, half float. * - * Corresponds to @ref GL::PixelFormat::Red and - * @ref GL::PixelType::HalfFloat, @ref GL::TextureFormat::R16F; - * @def_vk_keyword{FORMAT_R16_SFLOAT,Format}; + * Corresponds to @ref GL::PixelFormat::Red and @ref GL::PixelType::Half, + * @ref GL::TextureFormat::R16F; @def_vk_keyword{FORMAT_R16_SFLOAT,Format}; * @m_class{m-doc-external} [DXGI_FORMAT_R16_FLOAT](https://docs.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format) * or @m_class{m-doc-external} [MTLPixelFormatR16Float](https://developer.apple.com/documentation/metal/mtlpixelformat/mtlpixelformatr16float?language=objc). * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() @@ -594,8 +593,8 @@ enum class PixelFormat: UnsignedInt { /** * Red and green component, half float. * - * Corresponds to @ref GL::PixelFormat::RG and - * @ref GL::PixelType::HalfFloat, @ref GL::TextureFormat::RG16F; + * Corresponds to @ref GL::PixelFormat::RG and @ref GL::PixelType::Half, + * @ref GL::TextureFormat::RG16F; * @def_vk_keyword{FORMAT_R16G16_SFLOAT,Format}; * @m_class{m-doc-external} [DXGI_FORMAT_R16G16_FLOAT](https://docs.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format) * or @m_class{m-doc-external} [MTLPixelFormatRG16Float](https://developer.apple.com/documentation/metal/mtlpixelformat/mtlpixelformatrg16float?language=objc). @@ -607,8 +606,8 @@ enum class PixelFormat: UnsignedInt { /** * RGB, half float. * - * Corresponds to @ref GL::PixelFormat::RGB and - * @ref GL::PixelType::HalfFloat, @ref GL::TextureFormat::RGB16F; + * Corresponds to @ref GL::PixelFormat::RGB and @ref GL::PixelType::Half, + * @ref GL::TextureFormat::RGB16F; * @def_vk_keyword{FORMAT_R16G16B16_SFLOAT,Format}. No 48-bit D3D or Metal * equivalent. * @see @ref Half, @ref Math::packHalf(), @ref Math::unpackHalf() @@ -618,8 +617,8 @@ enum class PixelFormat: UnsignedInt { /** * RGBA, half float. * - * Corresponds to @ref GL::PixelFormat::RGBA and - * @ref GL::PixelType::HalfFloat, @ref GL::TextureFormat::RGBA16F; + * Corresponds to @ref GL::PixelFormat::RGBA and @ref GL::PixelType::Half, + * @ref GL::TextureFormat::RGBA16F; * @def_vk_keyword{FORMAT_R16G16B16A16_SFLOAT,Format}; * @m_class{m-doc-external} [DXGI_FORMAT_R16G16B16A16_FLOAT](https://docs.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format) * or @m_class{m-doc-external} [MTLPixelFormatRGBA16Float](https://developer.apple.com/documentation/metal/mtlpixelformat/mtlpixelformatrgba16float?language=objc).