diff --git a/doc/changelog.dox b/doc/changelog.dox index a27d26d1d..7e4fbc0e3 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -54,7 +54,9 @@ See also: @ref GL::TextureFormat and @ref Vk::PixelFormat and (partial) support in @ref DebugTools::CompareImage - New @ref pixelFormatChannelFormat(), @ref pixelFormatChannelCount(), - @ref isPixelFormatSrgb() and @ref isPixelFormatDepthOrStencil() helpers + @ref isPixelFormatNormalized(), @ref isPixelFormatIntegral(), + @ref isPixelFormatFloatingPoint(), @ref isPixelFormatSrgb() and + @ref isPixelFormatDepthOrStencil() helpers - New @ref Degh, @ref Radh, @ref Range1Dh, @ref Range2Dh and @ref Range3Dh typedefs for half-float angles and ranges - New @ref Range1Dui, @ref Range2Dui and @ref Range3Dui typedefs for unsigned diff --git a/src/Magnum/PixelFormat.cpp b/src/Magnum/PixelFormat.cpp index 52d5fa2dc..1600a1a13 100644 --- a/src/Magnum/PixelFormat.cpp +++ b/src/Magnum/PixelFormat.cpp @@ -290,6 +290,243 @@ UnsignedInt pixelFormatChannelCount(const PixelFormat format) { CORRADE_ASSERT_UNREACHABLE("pixelFormatChannelCount(): invalid format" << format, {}); } +bool isPixelFormatNormalized(const PixelFormat format) { + CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), + "isPixelFormatNormalized(): can't determine type of an implementation-specific format" << reinterpret_cast(pixelFormatUnwrap(format)), {}); + + #ifdef CORRADE_TARGET_GCC + #pragma GCC diagnostic push + #pragma GCC diagnostic error "-Wswitch" + #endif + switch(format) { + case PixelFormat::R8Unorm: + case PixelFormat::RG8Unorm: + case PixelFormat::RGB8Unorm: + case PixelFormat::RGBA8Unorm: + case PixelFormat::R8Snorm: + case PixelFormat::RG8Snorm: + case PixelFormat::RGB8Snorm: + case PixelFormat::RGBA8Snorm: + case PixelFormat::R8Srgb: + case PixelFormat::RG8Srgb: + case PixelFormat::RGB8Srgb: + case PixelFormat::RGBA8Srgb: + case PixelFormat::R16Unorm: + case PixelFormat::RG16Unorm: + case PixelFormat::RGB16Unorm: + case PixelFormat::RGBA16Unorm: + case PixelFormat::R16Snorm: + case PixelFormat::RG16Snorm: + case PixelFormat::RGB16Snorm: + case PixelFormat::RGBA16Snorm: + return true; + case PixelFormat::R8UI: + case PixelFormat::RG8UI: + case PixelFormat::RGB8UI: + case PixelFormat::RGBA8UI: + case PixelFormat::R8I: + case PixelFormat::RG8I: + case PixelFormat::RGB8I: + case PixelFormat::RGBA8I: + case PixelFormat::R16UI: + case PixelFormat::RG16UI: + case PixelFormat::RGB16UI: + case PixelFormat::RGBA16UI: + case PixelFormat::R16I: + case PixelFormat::RG16I: + case PixelFormat::RGB16I: + case PixelFormat::RGBA16I: + case PixelFormat::R32UI: + case PixelFormat::RG32UI: + case PixelFormat::RGB32UI: + case PixelFormat::RGBA32UI: + case PixelFormat::R32I: + case PixelFormat::RG32I: + case PixelFormat::RGB32I: + case PixelFormat::RGBA32I: + case PixelFormat::R16F: + case PixelFormat::RG16F: + case PixelFormat::RGB16F: + case PixelFormat::RGBA16F: + case PixelFormat::R32F: + case PixelFormat::RG32F: + case PixelFormat::RGB32F: + case PixelFormat::RGBA32F: + return false; + case PixelFormat::Depth16Unorm: + case PixelFormat::Depth24Unorm: + case PixelFormat::Depth32F: + case PixelFormat::Stencil8UI: + case PixelFormat::Depth16UnormStencil8UI: + case PixelFormat::Depth24UnormStencil8UI: + case PixelFormat::Depth32FStencil8UI: + CORRADE_ASSERT_UNREACHABLE("isPixelFormatNormalized(): can't determine type of" << format, {}); + } + #ifdef CORRADE_TARGET_GCC + #pragma GCC diagnostic pop + #endif + + CORRADE_ASSERT_UNREACHABLE("isPixelFormatNormalized(): invalid format" << format, {}); +} + +bool isPixelFormatIntegral(const PixelFormat format) { + CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), + "isPixelFormatIntegral(): can't determine type of an implementation-specific format" << reinterpret_cast(pixelFormatUnwrap(format)), {}); + + #ifdef CORRADE_TARGET_GCC + #pragma GCC diagnostic push + #pragma GCC diagnostic error "-Wswitch" + #endif + switch(format) { + case PixelFormat::R8UI: + case PixelFormat::RG8UI: + case PixelFormat::RGB8UI: + case PixelFormat::RGBA8UI: + case PixelFormat::R8I: + case PixelFormat::RG8I: + case PixelFormat::RGB8I: + case PixelFormat::RGBA8I: + case PixelFormat::R16UI: + case PixelFormat::RG16UI: + case PixelFormat::RGB16UI: + case PixelFormat::RGBA16UI: + case PixelFormat::R16I: + case PixelFormat::RG16I: + case PixelFormat::RGB16I: + case PixelFormat::RGBA16I: + case PixelFormat::R32UI: + case PixelFormat::RG32UI: + case PixelFormat::RGB32UI: + case PixelFormat::RGBA32UI: + case PixelFormat::R32I: + case PixelFormat::RG32I: + case PixelFormat::RGB32I: + case PixelFormat::RGBA32I: + return true; + case PixelFormat::R8Unorm: + case PixelFormat::RG8Unorm: + case PixelFormat::RGB8Unorm: + case PixelFormat::RGBA8Unorm: + case PixelFormat::R8Snorm: + case PixelFormat::RG8Snorm: + case PixelFormat::RGB8Snorm: + case PixelFormat::RGBA8Snorm: + case PixelFormat::R8Srgb: + case PixelFormat::RG8Srgb: + case PixelFormat::RGB8Srgb: + case PixelFormat::RGBA8Srgb: + case PixelFormat::R16Unorm: + case PixelFormat::RG16Unorm: + case PixelFormat::RGB16Unorm: + case PixelFormat::RGBA16Unorm: + case PixelFormat::R16Snorm: + case PixelFormat::RG16Snorm: + case PixelFormat::RGB16Snorm: + case PixelFormat::RGBA16Snorm: + case PixelFormat::R16F: + case PixelFormat::RG16F: + case PixelFormat::RGB16F: + case PixelFormat::RGBA16F: + case PixelFormat::R32F: + case PixelFormat::RG32F: + case PixelFormat::RGB32F: + case PixelFormat::RGBA32F: + return false; + case PixelFormat::Depth16Unorm: + case PixelFormat::Depth24Unorm: + case PixelFormat::Depth32F: + case PixelFormat::Stencil8UI: + case PixelFormat::Depth16UnormStencil8UI: + case PixelFormat::Depth24UnormStencil8UI: + case PixelFormat::Depth32FStencil8UI: + CORRADE_ASSERT_UNREACHABLE("isPixelFormatIntegral(): can't determine type of" << format, {}); + } + #ifdef CORRADE_TARGET_GCC + #pragma GCC diagnostic pop + #endif + + CORRADE_ASSERT_UNREACHABLE("isPixelFormatIntegral(): invalid format" << format, {}); +} + +bool isPixelFormatFloatingPoint(const PixelFormat format) { + CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), + "isPixelFormatFloatingPoint(): can't determine type of an implementation-specific format" << reinterpret_cast(pixelFormatUnwrap(format)), {}); + + #ifdef CORRADE_TARGET_GCC + #pragma GCC diagnostic push + #pragma GCC diagnostic error "-Wswitch" + #endif + switch(format) { + case PixelFormat::R16F: + case PixelFormat::RG16F: + case PixelFormat::RGB16F: + case PixelFormat::RGBA16F: + case PixelFormat::R32F: + case PixelFormat::RG32F: + case PixelFormat::RGB32F: + case PixelFormat::RGBA32F: + return true; + case PixelFormat::R8Unorm: + case PixelFormat::RG8Unorm: + case PixelFormat::RGB8Unorm: + case PixelFormat::RGBA8Unorm: + case PixelFormat::R8Snorm: + case PixelFormat::RG8Snorm: + case PixelFormat::RGB8Snorm: + case PixelFormat::RGBA8Snorm: + case PixelFormat::R8Srgb: + case PixelFormat::RG8Srgb: + case PixelFormat::RGB8Srgb: + case PixelFormat::RGBA8Srgb: + case PixelFormat::R8UI: + case PixelFormat::RG8UI: + case PixelFormat::RGB8UI: + case PixelFormat::RGBA8UI: + case PixelFormat::R8I: + case PixelFormat::RG8I: + case PixelFormat::RGB8I: + case PixelFormat::RGBA8I: + case PixelFormat::R16Unorm: + case PixelFormat::RG16Unorm: + case PixelFormat::RGB16Unorm: + case PixelFormat::RGBA16Unorm: + case PixelFormat::R16Snorm: + case PixelFormat::RG16Snorm: + case PixelFormat::RGB16Snorm: + case PixelFormat::RGBA16Snorm: + case PixelFormat::R16UI: + case PixelFormat::RG16UI: + case PixelFormat::RGB16UI: + case PixelFormat::RGBA16UI: + case PixelFormat::R16I: + case PixelFormat::RG16I: + case PixelFormat::RGB16I: + case PixelFormat::RGBA16I: + case PixelFormat::R32UI: + case PixelFormat::RG32UI: + case PixelFormat::RGB32UI: + case PixelFormat::RGBA32UI: + case PixelFormat::R32I: + case PixelFormat::RG32I: + case PixelFormat::RGB32I: + case PixelFormat::RGBA32I: + return false; + case PixelFormat::Depth16Unorm: + case PixelFormat::Depth24Unorm: + case PixelFormat::Depth32F: + case PixelFormat::Stencil8UI: + case PixelFormat::Depth16UnormStencil8UI: + case PixelFormat::Depth24UnormStencil8UI: + case PixelFormat::Depth32FStencil8UI: + CORRADE_ASSERT_UNREACHABLE("isPixelFormatFloatingPoint(): can't determine type of" << format, {}); + } + #ifdef CORRADE_TARGET_GCC + #pragma GCC diagnostic pop + #endif + + CORRADE_ASSERT_UNREACHABLE("isPixelFormatFloatingPoint(): invalid format" << format, {}); +} + bool isPixelFormatSrgb(const PixelFormat format) { CORRADE_ASSERT(!isPixelFormatImplementationSpecific(format), "isPixelFormatSrgb(): can't determine colorspace of an implementation-specific format" << reinterpret_cast(pixelFormatUnwrap(format)), {}); diff --git a/src/Magnum/PixelFormat.h b/src/Magnum/PixelFormat.h index 70f9b1406..e2060ca0b 100644 --- a/src/Magnum/PixelFormat.h +++ b/src/Magnum/PixelFormat.h @@ -26,7 +26,7 @@ */ /** @file - * @brief Enum @ref Magnum::PixelFormat, @ref Magnum::CompressedPixelFormat, function @ref Magnum::pixelFormatSize(), @ref Magnum::pixelFormatChannelFormat(), @ref Magnum::pixelFormatChannelCount(), @ref Magnum::isPixelFormatSrgb(), @ref Magnum::isPixelFormatDepthOrStencil(), @ref Magnum::isPixelFormatImplementationSpecific(), @ref Magnum::pixelFormatWrap(), @ref Magnum::pixelFormatUnwrap(), @ref Magnum::compressedPixelFormatBlockSize(), @ref Magnum::compressedPixelFormatBlockDataSize(), @ref Magnum::isCompressedPixelFormatImplementationSpecific(), @ref Magnum::compressedPixelFormatWrap(), @ref Magnum::compressedPixelFormatUnwrap() + * @brief Enum @ref Magnum::PixelFormat, @ref Magnum::CompressedPixelFormat, function @ref Magnum::pixelFormatSize(), @ref Magnum::pixelFormatChannelFormat(), @ref Magnum::pixelFormatChannelCount(), @ref Magnum::isPixelFormatNormalized(), @ref Magnum::isPixelFormatNormalized(), @ref Magnum::isPixelFormatIntegral(), @ref Magnum::isPixelFormatFloatingPoint(), @ref Magnum::isPixelFormatSrgb(), @ref Magnum::isPixelFormatDepthOrStencil(), @ref Magnum::isPixelFormatImplementationSpecific(), @ref Magnum::pixelFormatWrap(), @ref Magnum::pixelFormatUnwrap(), @ref Magnum::compressedPixelFormatBlockSize(), @ref Magnum::compressedPixelFormatBlockDataSize(), @ref Magnum::isCompressedPixelFormatImplementationSpecific(), @ref Magnum::compressedPixelFormatWrap(), @ref Magnum::compressedPixelFormatUnwrap() */ #include @@ -64,10 +64,13 @@ For D3D, corresponds to @m_class{m-doc-external} [DXGI_FORMAT](https://docs.micr and import is provided by the @ref Trade::DdsImporter "DdsImporter" plugin; for Metal, corresponds to @m_class{m-doc-external} [MTLPixelFormat](https://developer.apple.com/documentation/metal/mtlpixelformat?language=objc). See documentation of each value for more information about the mapping. -@see @ref pixelFormatSize(), @ref pixelFormatChannelFormat(), - @ref pixelFormatChannelCount(), @ref isPixelFormatSrgb(), - @ref isPixelFormatDepthOrStencil(), @ref CompressedPixelFormat, @ref Image, - @ref ImageView, @ref VertexFormat + +See also @ref pixelFormatSize(), @ref pixelFormatChannelFormat(), +@ref pixelFormatChannelCount(), @ref isPixelFormatNormalized(), +@ref isPixelFormatIntegral(), @ref isPixelFormatFloatingPoint(), +@ref isPixelFormatSrgb() and @ref isPixelFormatDepthOrStencil() for querying +various aspects of a format. +@see @ref CompressedPixelFormat, @ref Image, @ref ImageView, @ref VertexFormat */ enum class PixelFormat: UnsignedInt { /* Zero reserved for an invalid format (but not being a named value) */ @@ -773,7 +776,7 @@ enum class PixelFormat: UnsignedInt { }; /** -@brief Pixel format size +@brief Size of given pixel format @m_since_latest Expects that the pixel format is *not* implementation-specific. @@ -809,12 +812,68 @@ implementation-specific and not a depth/stencil format. */ MAGNUM_EXPORT UnsignedInt pixelFormatChannelCount(PixelFormat format); +/** +@brief Whether given pixel format is normalized +@m_since_latest + +Returns @cpp true @ce for `*Unorm`, `*Snorm` and `*Srgb` formats, +@cpp false @ce otherwise. In particular, floating-point formats are *not* +treated as normalized, even though for example they might commonly have values +only in the @f$ [0.0, 1.0] @f$ range (or in the @f$ [-1.0, 1.0] @f$ signed +range). Expects that the pixel format is *not* implementation-specific and not +a depth/stencil format. + +For any pixel format, exactly one of @ref isPixelFormatNormalized(), +@ref isPixelFormatIntegral() and @ref isPixelFormatFloatingPoint() returns +@cpp true @ce. +@see @ref isPixelFormatImplementationSpecific(), + @ref isPixelFormatDepthOrStencil(), @ref isPixelFormatSrgb(), + @ref isVertexFormatNormalized() +*/ +MAGNUM_EXPORT bool isPixelFormatNormalized(PixelFormat format); + +/** +@brief Whether given pixel format is integral +@m_since_latest + +Returns @cpp true @ce for `*UI` and `*I` formats, @cpp false @ce otherwise. In +particular, normalized integer formats are *not* treated as integer. Expects +that the pixel format is *not* implementation-specific and not a depth/stencil +format. + +For any pixel format, exactly one of @ref isPixelFormatNormalized(), +@ref isPixelFormatIntegral() and @ref isPixelFormatFloatingPoint() returns +@cpp true @ce. +@see @ref isPixelFormatImplementationSpecific(), + @ref isPixelFormatDepthOrStencil(), @ref isPixelFormatSrgb() +*/ +MAGNUM_EXPORT bool isPixelFormatIntegral(PixelFormat format); + +/** +@brief Whether given pixel format is floating-point +@m_since_latest + +Returns @cpp true @ce for `*F` formats, @cpp false @ce otherwise. In +particular, normalized integer formats are *not* treated as floating-point, +even though they get expanded to the @f$ [0.0, 1.0] @f$ or @f$ [-1.0, 1.0] @f$ +floating-point range in shaders. Expects that the pixel format is *not* +implementation-specific and not a depth/stencil format. + +For any pixel format, exactly one of @ref isPixelFormatNormalized(), +@ref isPixelFormatIntegral() and @ref isPixelFormatFloatingPoint() returns +@cpp true @ce. +@see @ref isPixelFormatImplementationSpecific(), + @ref isPixelFormatDepthOrStencil(), @ref isPixelFormatSrgb() +*/ +MAGNUM_EXPORT bool isPixelFormatFloatingPoint(PixelFormat format); + /** @brief Whether given pixel format is sRGB @m_since_latest -Returns @cpp true @ce for `*Srgb` formats, @cpp false @ce otherwise. Expects -that the pixel format is *not* implementation-specific and not a +Returns @cpp true @ce for `*Srgb` formats, @cpp false @ce otherwise. If this +function returns true, @ref isPixelFormatNormalized() also returns true. +Expects that the pixel format is *not* implementation-specific and not a depth/stencil format. @see @ref isPixelFormatImplementationSpecific() */ diff --git a/src/Magnum/Test/PixelFormatTest.cpp b/src/Magnum/Test/PixelFormatTest.cpp index f4c0e9b92..45cf6551f 100644 --- a/src/Magnum/Test/PixelFormatTest.cpp +++ b/src/Magnum/Test/PixelFormatTest.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -48,6 +49,10 @@ struct PixelFormatTest: TestSuite::Tester { void channelFormatCountInvalid(); void channelFormatCountDepthStencilImplementationSpecific(); + void isNormalizedIntegralFloatingPoint(); + void isNormalizedIntegralFloatingPointInvalid(); + void isNormalizedIntegralFloatingPointDepthStencilImplementationSpecific(); + void isSrgb(); void isSrgbInvalid(); void isSrgbDepthStencilImplementationSpecific(); @@ -98,6 +103,10 @@ PixelFormatTest::PixelFormatTest() { &PixelFormatTest::channelFormatCountInvalid, &PixelFormatTest::channelFormatCountDepthStencilImplementationSpecific, + &PixelFormatTest::isNormalizedIntegralFloatingPoint, + &PixelFormatTest::isNormalizedIntegralFloatingPointInvalid, + &PixelFormatTest::isNormalizedIntegralFloatingPointDepthStencilImplementationSpecific, + &PixelFormatTest::isSrgb, &PixelFormatTest::isSrgbInvalid, &PixelFormatTest::isSrgbDepthStencilImplementationSpecific, @@ -159,8 +168,11 @@ void PixelFormatTest::mapping() { CORRADE_COMPARE(Utility::ConfigurationValue::toString(PixelFormat::format, {}), #format); \ CORRADE_COMPARE(nextHandled, i); \ CORRADE_COMPARE(firstUnhandled, 0xffff); \ - if(!isPixelFormatDepthOrStencil(PixelFormat::format)) \ + if(!isPixelFormatDepthOrStencil(PixelFormat::format)) { \ + CORRADE_COMPARE(Int(isPixelFormatIntegral(PixelFormat::format)) + Int(isPixelFormatNormalized(PixelFormat::format)) + Int(isPixelFormatFloatingPoint(PixelFormat::format)), 1); \ CORRADE_COMPARE(pixelFormatChannelCount(PixelFormat::format)*pixelFormatSize(pixelFormatChannelFormat(PixelFormat::format)), pixelFormatSize(PixelFormat::format)); \ + CORRADE_VERIFY(!isPixelFormatSrgb(PixelFormat::format) || isPixelFormatNormalized(PixelFormat::format)); \ + } \ ++nextHandled; \ continue; #include "Magnum/Implementation/pixelFormatMapping.hpp" @@ -317,6 +329,68 @@ void PixelFormatTest::channelFormatCountDepthStencilImplementationSpecific() { "pixelFormatChannelCount(): can't determine channel count of PixelFormat::Depth16Unorm\n"); } +void PixelFormatTest::isNormalizedIntegralFloatingPoint() { + /* Verification that exactly one of the tree returns true is done in + mapping() above */ + + CORRADE_VERIFY(isPixelFormatNormalized(PixelFormat::RG8Srgb)); + CORRADE_VERIFY(isPixelFormatNormalized(PixelFormat::RGBA8Snorm)); + CORRADE_VERIFY(isPixelFormatIntegral(PixelFormat::RG8UI)); + CORRADE_VERIFY(isPixelFormatIntegral(PixelFormat::RGBA16I)); + CORRADE_VERIFY(isPixelFormatFloatingPoint(PixelFormat::R32F)); + + /* Integer normalized aren't marked as integer */ + CORRADE_VERIFY(!isPixelFormatIntegral(PixelFormat::RG8Unorm)); + + /* Floating-point aren't marked as normalized */ + CORRADE_VERIFY(!isPixelFormatNormalized(PixelFormat::RG16F)); + + /* Normalized aren't marked as floating-point even though they're treated + like float values in calculations */ + CORRADE_VERIFY(!isPixelFormatFloatingPoint(PixelFormat::R16Unorm)); +} + +void PixelFormatTest::isNormalizedIntegralFloatingPointInvalid() { + CORRADE_SKIP_IF_NO_ASSERT(); + + std::ostringstream out; + Error redirectError{&out}; + isPixelFormatNormalized(PixelFormat{}); + isPixelFormatNormalized(PixelFormat(0xdead)); + isPixelFormatIntegral(PixelFormat{}); + isPixelFormatIntegral(PixelFormat(0xdead)); + isPixelFormatFloatingPoint(PixelFormat{}); + isPixelFormatFloatingPoint(PixelFormat(0xdead)); + CORRADE_COMPARE(out.str(), + "isPixelFormatNormalized(): invalid format PixelFormat(0x0)\n" + "isPixelFormatNormalized(): invalid format PixelFormat(0xdead)\n" + "isPixelFormatIntegral(): invalid format PixelFormat(0x0)\n" + "isPixelFormatIntegral(): invalid format PixelFormat(0xdead)\n" + "isPixelFormatFloatingPoint(): invalid format PixelFormat(0x0)\n" + "isPixelFormatFloatingPoint(): invalid format PixelFormat(0xdead)\n"); +} + +void PixelFormatTest::isNormalizedIntegralFloatingPointDepthStencilImplementationSpecific() { + CORRADE_SKIP_IF_NO_ASSERT(); + + std::ostringstream out; + Error redirectError{&out}; + isPixelFormatNormalized(pixelFormatWrap(0xdead)); + isPixelFormatNormalized(PixelFormat::Depth24UnormStencil8UI); + isPixelFormatIntegral(pixelFormatWrap(0xdead)); + isPixelFormatIntegral(PixelFormat::Stencil8UI); + isPixelFormatFloatingPoint(pixelFormatWrap(0xdead)); + isPixelFormatFloatingPoint(PixelFormat::Depth16UnormStencil8UI); + CORRADE_COMPARE_AS(out.str(), + "isPixelFormatNormalized(): can't determine type of an implementation-specific format 0xdead\n" + "isPixelFormatNormalized(): can't determine type of PixelFormat::Depth24UnormStencil8UI\n" + "isPixelFormatIntegral(): can't determine type of an implementation-specific format 0xdead\n" + "isPixelFormatIntegral(): can't determine type of PixelFormat::Stencil8UI\n" + "isPixelFormatFloatingPoint(): can't determine type of an implementation-specific format 0xdead\n" + "isPixelFormatFloatingPoint(): can't determine type of PixelFormat::Depth16UnormStencil8UI\n", + TestSuite::Compare::String); +} + void PixelFormatTest::isSrgb() { CORRADE_VERIFY(isPixelFormatSrgb(PixelFormat::RG8Srgb)); CORRADE_VERIFY(!isPixelFormatSrgb(PixelFormat::RG8Snorm)); diff --git a/src/Magnum/VertexFormat.h b/src/Magnum/VertexFormat.h index 69e9905a4..8f45978e9 100644 --- a/src/Magnum/VertexFormat.h +++ b/src/Magnum/VertexFormat.h @@ -1440,7 +1440,8 @@ for example colors might commonly have values only in the @f$ [0.0, 1.0] @f$ range (or normals in the @f$ [-1.0, 1.0] @f$ range). Expects that the vertex format is *not* implementation-specific. @see @ref isVertexFormatImplementationSpecific(), - @ref vertexFormat(VertexFormat, UnsignedInt, bool) + @ref vertexFormat(VertexFormat, UnsignedInt, bool), + @ref isPixelFormatNormalized() */ MAGNUM_EXPORT bool isVertexFormatNormalized(VertexFormat format);