From b57979150e0a87ae19ee5ae7d5c78acc3d1032c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 6 Oct 2023 22:42:33 +0200 Subject: [PATCH] GL: document that Luminance formats can't be used in framebuffers. --- src/Magnum/GL/PixelFormat.h | 5 +++-- src/Magnum/GL/TextureFormat.h | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/PixelFormat.h b/src/Magnum/GL/PixelFormat.h index e782a1ea4..f69016464 100644 --- a/src/Magnum/GL/PixelFormat.h +++ b/src/Magnum/GL/PixelFormat.h @@ -97,7 +97,7 @@ enum class PixelFormat: GLenum { #if defined(MAGNUM_TARGET_GLES2) || defined(DOXYGEN_GENERATING_OUTPUT) /** * Floating-point luminance channel. The value is used for all RGB - * channels. + * channels. Can't be used for framebuffer reading. * @requires_gles20_only Not available in ES 3.0, WebGL 2.0 or desktop * OpenGL. Use @ref PixelFormat::Red instead. * @deprecated_gl Included for compatibility reasons only, use @@ -127,7 +127,8 @@ enum class PixelFormat: GLenum { #if defined(MAGNUM_TARGET_GLES2) || defined(DOXYGEN_GENERATING_OUTPUT) /** * Floating-point luminance and alpha channel. First value is used for all - * RGB channels, second value is used for alpha channel. + * RGB channels, second value is used for alpha channel. Can't be used for + * framebuffer reading. * @requires_gles20_only Not available in ES 3.0, WebGL 2.0 or desktop * OpenGL. Use @ref PixelFormat::RG instead. * @deprecated_gl Included for compatibility reasons only, use diff --git a/src/Magnum/GL/TextureFormat.h b/src/Magnum/GL/TextureFormat.h index 424245c17..fa508e159 100644 --- a/src/Magnum/GL/TextureFormat.h +++ b/src/Magnum/GL/TextureFormat.h @@ -922,7 +922,8 @@ enum class TextureFormat: GLenum { /** * Luminance, normalized unsigned, single value used for all RGB channels. * Size implementation-dependent. Not allowed in unemulated - * @ref Texture::setStorage() "*Texture::setStorage()" calls. + * @ref Texture::setStorage() "*Texture::setStorage()" calls. Can't be used + * for framebuffer attachments. * @requires_gles20_only Not available in OpenGL ES 3.0, WebGL 2.0 or * desktop OpenGL. Use @ref TextureFormat::R8 instead. * @deprecated_gl Included for compatibility reasons only, use @@ -934,7 +935,8 @@ enum class TextureFormat: GLenum { * Floating-point luminance and alpha channel. First value is used for all * RGB channels, second value is used for alpha channel. Size * implementation-dependent. Not allowed in unemulated - * @ref Texture::setStorage() "*Texture::setStorage()" calls. + * @ref Texture::setStorage() "*Texture::setStorage()" calls. Can't be used + * for framebuffer attachments. * @requires_gles20_only Not available in OpenGL ES 3.0, WebGL 2.0 or * desktop OpenGL. Use @ref TextureFormat::RG8 instead. * @deprecated_gl Included for compatibility reasons only, use