diff --git a/doc/changelog.dox b/doc/changelog.dox index b9be41ac8..572bc78cd 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -54,6 +54,10 @@ See also: @ref CompressedPixelFormat as well as their conversion to corresponding GL/Vulkan formats in @ref GL::compressedPixelFormat() and @ref Vk::vkFormat(Magnum::CompressedPixelFormat) +- New @ref PixelFormat::R8Srgb, @ref PixelFormat::RG8Srgb, + @ref PixelFormat::RGB8Srgb and @ref PixelFormat::RGBA8Srgb sRGB pixel + formats as well as their conversion to corresponding GL/Vulkan formats in + @ref GL::pixelFormat() and @ref Vk::vkFormat(Magnum::PixelFormat) @subsubsection changelog-latest-new-audio Audio library @@ -107,6 +111,10 @@ See also: - PVRTC formats defined by the @gl_extension{IMG,texture_compression_pvrtc} / @gl_extension{IMG,pvrtc_sRGB} OpenGL ES and @webgl_extension{WEBGL,compressed_texture_pvrtc} WebGL extensions +- Implemented @gl_extension{EXT,texture_sRGB_R8} and + @gl_extension{EXT,texture_sRGB_RG8} extensions adding + @ref GL::TextureFormat::SR8 and @ref GL::TextureFormat::SRG8 formats to + complement new sRGB formats in @ref GL::PixelFormat - New @ref GL::AbstractFramebuffer::implementationColorReadFormat() and @ref GL::AbstractFramebuffer::implementationColorReadType() queries for more robust checks when doing framebuffer readbacks; together with three diff --git a/doc/opengl-support.dox b/doc/opengl-support.dox index 765308e26..34d9e615e 100644 --- a/doc/opengl-support.dox +++ b/doc/opengl-support.dox @@ -319,6 +319,7 @@ Extension | Status @gl_extension{EXT,shader_integer_mix} | done (shading language only) @gl_extension{EXT,debug_label} | missing pipeline and sampler label @gl_extension{EXT,debug_marker} | done +@gl_extension{EXT,sRGB_R8} | done @gl_extension{GREMEDY,string_marker} | done @subsection opengl-support-es20 OpenGL ES 2.0 @@ -461,6 +462,8 @@ Extension | Status @gl_extension{EXT,texture_compression_s3tc} | done @gl_extension{EXT,pvrtc_sRGB} | done @gl_extension{EXT,shader_integer_mix} | done (shading language only) +@gl_extension{EXT,sRGB_R8} | done +@gl_extension{EXT,sRGB_RG8} | done @gl_extension{EXT,polygon_offset_clamp} | | @gl_extension{EXT,texture_compression_rgtc} | done @gl_extension{EXT,texture_compression_bptc} | done diff --git a/src/Magnum/DebugTools/CompareImage.cpp b/src/Magnum/DebugTools/CompareImage.cpp index d5599737e..777743af9 100644 --- a/src/Magnum/DebugTools/CompareImage.cpp +++ b/src/Magnum/DebugTools/CompareImage.cpp @@ -121,11 +121,19 @@ std::tuple, Float, Float> calculateImageDelta(const Pix Containers::arrayCast<2, const Math::Vector>(actualPixels), \ expected.pixels>(), delta); \ break; + #define _e(first, second, third, size, T) \ + case PixelFormat::first: \ + case PixelFormat::second: \ + case PixelFormat::third: \ + max = calculateImageDelta( \ + Containers::arrayCast<2, const Math::Vector>(actualPixels), \ + expected.pixels>(), delta); \ + break; /* LCOV_EXCL_START */ - _d(R8Unorm, R8UI, 1, UnsignedByte) - _d(RG8Unorm, RG8UI, 2, UnsignedByte) - _d(RGB8Unorm, RGB8UI, 3, UnsignedByte) - _d(RGBA8Unorm, RGBA8UI, 4, UnsignedByte) + _e(R8Unorm, R8Srgb, R8UI, 1, UnsignedByte) + _e(RG8Unorm, RG8Srgb, RG8UI, 2, UnsignedByte) + _e(RGB8Unorm, RGB8Srgb, RGB8UI, 3, UnsignedByte) + _e(RGBA8Unorm, RGBA8Srgb, RGBA8UI, 4, UnsignedByte) _d(R8Snorm, R8I, 1, Byte) _d(RG8Snorm, RG8I, 2, Byte) _d(RGB8Snorm, RGB8I, 3, Byte) @@ -151,6 +159,7 @@ std::tuple, Float, Float> calculateImageDelta(const Pix _c(RGB32F, 3, Float) _c(RGBA32F, 4, Float) /* LCOV_EXCL_STOP */ + #undef _e #undef _d #undef _c @@ -246,12 +255,18 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D& case PixelFormat::second: \ out << *reinterpret_cast*>(pixel); \ break; + #define _e(first, second, third, size, T) \ + case PixelFormat::first: \ + case PixelFormat::second: \ + case PixelFormat::third: \ + out << *reinterpret_cast*>(pixel); \ + break; /* LCOV_EXCL_START */ - _d(R8Unorm, R8UI, 1, UnsignedByte) - _d(RG8Unorm, RG8UI, 2, UnsignedByte) + _e(R8Unorm, R8Srgb, R8UI, 1, UnsignedByte) + _e(RG8Unorm, RG8Srgb, RG8UI, 2, UnsignedByte) _c(RGB8UI, 3, UnsignedByte) _c(RGBA8UI, 4, UnsignedByte) - /* RGB8Unorm, RGBA8Unorm handled below */ + /* RGB8Unorm, RGBA8Unorm, RGB8Srgb, RGBA8Srgb handled below */ _d(R8Snorm, R8I, 1, Byte) _d(RG8Snorm, RG8I, 2, Byte) _d(RGB8Snorm, RGB8I, 3, Byte) @@ -277,14 +292,17 @@ void printPixelAt(Debug& out, const Containers::StridedArrayView3D& _c(RGB32F, 3, Float) _c(RGBA32F, 4, Float) /* LCOV_EXCL_STOP */ + #undef _e #undef _d #undef _c /* Take the opportunity and print 8-bit colors in hex */ case PixelFormat::RGB8Unorm: + case PixelFormat::RGB8Srgb: out << *reinterpret_cast(pixel); break; case PixelFormat::RGBA8Unorm: + case PixelFormat::RGBA8Srgb: out << *reinterpret_cast(pixel); break; diff --git a/src/Magnum/GL/AbstractTexture.cpp b/src/Magnum/GL/AbstractTexture.cpp index f80579c9d..9f437cf6f 100644 --- a/src/Magnum/GL/AbstractTexture.cpp +++ b/src/Magnum/GL/AbstractTexture.cpp @@ -550,6 +550,9 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) { #ifndef MAGNUM_TARGET_GLES2 case TextureFormat::R8Snorm: #endif + #ifndef MAGNUM_TARGET_WEBGL + case TextureFormat::SR8: + #endif #ifndef MAGNUM_TARGET_GLES case TextureFormat::R16: case TextureFormat::R16Snorm: @@ -597,6 +600,9 @@ PixelFormat pixelFormatForInternalFormat(const TextureFormat internalFormat) { #ifndef MAGNUM_TARGET_GLES2 case TextureFormat::RG8Snorm: #endif + #ifdef MAGNUM_TARGET_GLES + case TextureFormat::SRG8: + #endif #ifndef MAGNUM_TARGET_GLES case TextureFormat::RG16: case TextureFormat::RG16Snorm: @@ -895,6 +901,12 @@ PixelType pixelTypeForInternalFormat(const TextureFormat internalFormat) { case TextureFormat::Luminance: case TextureFormat::LuminanceAlpha: #endif + #ifndef MAGNUM_TARGET_WEBGL + case TextureFormat::SR8: + #ifdef MAGNUM_TARGET_GLES + case TextureFormat::SRG8: + #endif + #endif #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_GLES2) case TextureFormat::SRGB: case TextureFormat::SRGBAlpha: diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index 96243b816..593c9fe3b 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -95,6 +95,7 @@ constexpr Extension ExtensionList[]{ _extension(EXT,shader_integer_mix), _extension(EXT,debug_label), _extension(EXT,debug_marker), + _extension(EXT,texture_sRGB_R8), _extension(GREMEDY,string_marker), _extension(KHR,texture_compression_astc_ldr), _extension(KHR,texture_compression_astc_hdr), @@ -310,6 +311,8 @@ constexpr Extension ExtensionList[]{ _extension(EXT,pvrtc_sRGB), #ifndef MAGNUM_TARGET_GLES2 _extension(EXT,shader_integer_mix), + _extension(EXT,texture_sRGB_R8), + _extension(EXT,texture_sRGB_RG8), #endif _extension(EXT,polygon_offset_clamp), _extension(EXT,texture_compression_s3tc_srgb), diff --git a/src/Magnum/GL/Extensions.h b/src/Magnum/GL/Extensions.h index 9d328cc7c..2bdb4c6c7 100644 --- a/src/Magnum/GL/Extensions.h +++ b/src/Magnum/GL/Extensions.h @@ -238,6 +238,7 @@ namespace AMD { _extension(153,EXT,shader_integer_mix, GL300, None) // #437 _extension(154,EXT,debug_label, GL210, None) // #439 _extension(155,EXT,debug_marker, GL210, None) // #440 + _extension(156,EXT,texture_sRGB_R8, GL210, None) // #534 } namespace GREMEDY { _extension(157,GREMEDY,string_marker, GL210, None) // #311 } namespace KHR { @@ -413,15 +414,17 @@ namespace ANDROID { _extension( 59,EXT,texture_buffer, GLES310, GLES320) // #183 _extension( 60,EXT,texture_cube_map_array, GLES310, GLES320) // #184 _extension( 61,EXT,primitive_bounding_box, GLES310, GLES320) // #186 + _extension( 62,EXT,texture_sRGB_R8, GLES300, None) // #221 + _extension( 63,EXT,texture_sRGB_RG8, GLES300, None) // #223 #endif - _extension( 62,EXT,polygon_offset_clamp, GLES200, None) // #252 + _extension( 64,EXT,polygon_offset_clamp, GLES200, None) // #252 #ifndef MAGNUM_TARGET_GLES2 - _extension( 63,EXT,texture_compression_rgtc, GLES300, None) // #286 - _extension( 64,EXT,texture_compression_bptc, GLES300, None) // #287 + _extension( 65,EXT,texture_compression_rgtc, GLES300, None) // #286 + _extension( 66,EXT,texture_compression_bptc, GLES300, None) // #287 #endif - _extension( 65,EXT,texture_compression_s3tc_srgb, GLES200, None) // #289 + _extension( 67,EXT,texture_compression_s3tc_srgb, GLES200, None) // #289 } namespace IMG { - _extension( 66,IMG,texture_compression_pvrtc, GLES200, None) // #54 + _extension( 68,IMG,texture_compression_pvrtc, GLES200, None) // #54 } namespace KHR { _extension( 70,KHR,texture_compression_astc_ldr,GLES200, GLES320) // #117 _extension( 71,KHR,texture_compression_astc_hdr,GLES200, None) // #117 diff --git a/src/Magnum/GL/Implementation/pixelFormatMapping.hpp b/src/Magnum/GL/Implementation/pixelFormatMapping.hpp index 39bc93ce3..28163e76d 100644 --- a/src/Magnum/GL/Implementation/pixelFormatMapping.hpp +++ b/src/Magnum/GL/Implementation/pixelFormatMapping.hpp @@ -47,6 +47,17 @@ _s(RG8Snorm) _s(RGB8Snorm) _s(RGBA8Snorm) #endif +/* Yes, GL's pixel format doesn't distinguish between linear and sRGB, so + mapping is the same as in case of the Unorm types. */ +#ifndef MAGNUM_TARGET_GLES2 +_c(R8Srgb, Red, UnsignedByte) +_c(RG8Srgb, RG, UnsignedByte) +#else +_c(R8Srgb, Luminance, UnsignedByte) +_c(RG8Srgb, LuminanceAlpha, UnsignedByte) +#endif +_c(RGB8Srgb, RGB, UnsignedByte) +_c(RGBA8Srgb, RGBA, UnsignedByte) #ifndef MAGNUM_TARGET_GLES2 _c(R8UI, RedInteger, UnsignedByte) _c(RG8UI, RGInteger, UnsignedByte) diff --git a/src/Magnum/GL/TextureFormat.h b/src/Magnum/GL/TextureFormat.h index 9cb88fb64..2df5f7b4e 100644 --- a/src/Magnum/GL/TextureFormat.h +++ b/src/Magnum/GL/TextureFormat.h @@ -767,6 +767,31 @@ enum class TextureFormat: GLenum { LuminanceAlpha = GL_LUMINANCE_ALPHA, #endif + #ifndef MAGNUM_TARGET_WEBGL + /** + * sRGB-encoded red component, normalized unsigned byte. + * @requires_extension Extension @gl_extension{EXT,texture_sRGB_R8} + * @requires_es_extension Extension @gl_extension{EXT,texture_sRGB_R8} + * @requires_gles One- and two-component sRGB texture formats are not + * available in WebGL, use @ref TextureFormat::SRGB8 or + * @ref TextureFormat::SRGB8Alpha8 + */ + SR8 = GL_SR8_EXT, + + #if defined(MAGNUM_TARGET_GLES) || defined(DOXYGEN_GENERATING_OUTPUT) + /** + * sRGB-encoded red and green component, normalized unsigned byte. + * @requires_es_extension Extension @gl_extension{EXT,texture_sRGB_RG8} + * @requires_gles One- and two-component sRGB texture formats are not + * available in WebGL, use @ref TextureFormat::SRGB8 or + * @ref TextureFormat::SRGB8Alpha8 instead. Only + * @ref TextureFormat::SR8, @ref TextureFormat::SRGB8 or + * @ref TextureFormat::SRGB8Alpha8 is available in desktop OpenGL. + */ + SRG8 = GL_SRG8_EXT, + #endif + #endif + #ifndef MAGNUM_TARGET_GLES /** * RGB, normalized unsigned, red and green component 3bit, blue 2bit. diff --git a/src/Magnum/PixelFormat.cpp b/src/Magnum/PixelFormat.cpp index 905b89717..d5234385a 100644 --- a/src/Magnum/PixelFormat.cpp +++ b/src/Magnum/PixelFormat.cpp @@ -41,11 +41,13 @@ UnsignedInt pixelSize(const PixelFormat format) { switch(format) { case PixelFormat::R8Unorm: case PixelFormat::R8Snorm: + case PixelFormat::R8Srgb: case PixelFormat::R8UI: case PixelFormat::R8I: return 1; case PixelFormat::RG8Unorm: case PixelFormat::RG8Snorm: + case PixelFormat::RG8Srgb: case PixelFormat::RG8UI: case PixelFormat::RG8I: case PixelFormat::R16Unorm: @@ -56,11 +58,13 @@ UnsignedInt pixelSize(const PixelFormat format) { return 2; case PixelFormat::RGB8Unorm: case PixelFormat::RGB8Snorm: + case PixelFormat::RGB8Srgb: case PixelFormat::RGB8UI: case PixelFormat::RGB8I: return 3; case PixelFormat::RGBA8Unorm: case PixelFormat::RGBA8Snorm: + case PixelFormat::RGBA8Srgb: case PixelFormat::RGBA8UI: case PixelFormat::RGBA8I: case PixelFormat::RG16Unorm: @@ -124,6 +128,10 @@ Debug& operator<<(Debug& debug, const PixelFormat value) { _c(RG8Snorm) _c(RGB8Snorm) _c(RGBA8Snorm) + _c(R8Srgb) + _c(RG8Srgb) + _c(RGB8Srgb) + _c(RGBA8Srgb) _c(R8UI) _c(RG8UI) _c(RGB8UI) diff --git a/src/Magnum/PixelFormat.h b/src/Magnum/PixelFormat.h index 9992eb133..672ef7843 100644 --- a/src/Magnum/PixelFormat.h +++ b/src/Magnum/PixelFormat.h @@ -130,6 +130,42 @@ enum class PixelFormat: UnsignedInt { */ RGBA8Snorm, + /** + * sRGB-encoded red component, normalized unsigned byte. + * + * Corresponds to @ref GL::PixelFormat::Red and + * @ref GL::PixelType::UnsignedByte, @ref GL::TextureFormat::SR8 / + * @def_vk_keyword{FORMAT_R8_SRGB,Format}. + */ + R8Srgb, + + /** + * sRGB-encoded red and green component, normalized unsigned byte. + * + * Corresponds to @ref GL::PixelFormat::RG and + * @ref GL::PixelType::UnsignedByte, @ref GL::TextureFormat::SRG8 / + * @def_vk_keyword{FORMAT_R8G8_SRGB,Format}. + */ + RG8Srgb, + + /** + * sRGB, normalized unsigned byte. + * + * Corresponds to @ref GL::PixelFormat::RGB and + * @ref GL::PixelType::UnsignedByte, @ref GL::TextureFormat::SRGB8 / + * @def_vk_keyword{FORMAT_R8G8B8_SRGB,Format}. + */ + RGB8Srgb, + + /** + * sRGB + linear alpha, normalized unsigned byte. + * + * Corresponds to @ref GL::PixelFormat::RGBA and + * @ref GL::PixelType::UnsignedByte, @ref GL::TextureFormat::SRGB8Alpha8 / + * @def_vk_keyword{FORMAT_R8G8B8A8_SRGB,Format}. + */ + RGBA8Srgb, + /** * Red component, integral unsigned byte. * diff --git a/src/Magnum/Vk/Implementation/formatMapping.hpp b/src/Magnum/Vk/Implementation/formatMapping.hpp index 743e17b93..8543a5793 100644 --- a/src/Magnum/Vk/Implementation/formatMapping.hpp +++ b/src/Magnum/Vk/Implementation/formatMapping.hpp @@ -33,6 +33,10 @@ _c(R8Snorm, R8_SNORM) _c(RG8Snorm, R8G8_SNORM) _c(RGB8Snorm, R8G8B8_SNORM) _c(RGBA8Snorm, R8G8B8A8_SNORM) +_c(R8Srgb, R8_SRGB) +_c(RG8Srgb, R8G8_SRGB) +_c(RGB8Srgb, R8G8B8_SRGB) +_c(RGBA8Srgb, R8G8B8A8_SRGB) _c(R8UI, R8_UINT) _c(RG8UI, R8G8_UINT) _c(RGB8UI, R8G8B8_UINT) diff --git a/src/MagnumExternal/OpenGL/GL/extensions.txt b/src/MagnumExternal/OpenGL/GL/extensions.txt index 283de26c9..9390200e8 100644 --- a/src/MagnumExternal/OpenGL/GL/extensions.txt +++ b/src/MagnumExternal/OpenGL/GL/extensions.txt @@ -30,6 +30,7 @@ extension EXT_texture_sRGB_decode optional extension EXT_shader_integer_mix optional extension EXT_debug_label optional extension EXT_debug_marker optional +extension EXT_texture_sRGB_R8 optional extension GREMEDY_string_marker optional extension KHR_texture_compression_astc_ldr optional # extension KHR_texture_compression_astc_hdr optional diff --git a/src/MagnumExternal/OpenGL/GL/flextGL.h b/src/MagnumExternal/OpenGL/GL/flextGL.h index ae3bc86dd..c7ac4cf53 100644 --- a/src/MagnumExternal/OpenGL/GL/flextGL.h +++ b/src/MagnumExternal/OpenGL/GL/flextGL.h @@ -1701,6 +1701,10 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum #define GL_SAMPLER 0x82E6 #define GL_TRANSFORM_FEEDBACK 0x8E22 +/* GL_EXT_texture_sRGB_R8 */ + +#define GL_SR8_EXT 0x8FBD + /* GL_KHR_texture_compression_astc_ldr */ #define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 diff --git a/src/MagnumExternal/OpenGL/GLES2/extensions.txt b/src/MagnumExternal/OpenGL/GLES2/extensions.txt index 7ce996b1c..7e4ca5ee5 100644 --- a/src/MagnumExternal/OpenGL/GLES2/extensions.txt +++ b/src/MagnumExternal/OpenGL/GLES2/extensions.txt @@ -86,6 +86,8 @@ extension EXT_texture_sRGB_decode optional extension EXT_sRGB_write_control optional extension EXT_texture_compression_s3tc optional extension EXT_pvrtc_sRGB optional +extension EXT_texture_sRGB_R8 optional +extension EXT_texture_sRGB_RG8 optional extension EXT_polygon_offset_clamp optional extension EXT_texture_compression_s3tc_srgb optional extension IMG_texture_compression_pvrtc optional diff --git a/src/MagnumExternal/OpenGL/GLES2/flextGL.h b/src/MagnumExternal/OpenGL/GLES2/flextGL.h index 14176edf3..9d9914cd2 100644 --- a/src/MagnumExternal/OpenGL/GLES2/flextGL.h +++ b/src/MagnumExternal/OpenGL/GLES2/flextGL.h @@ -976,6 +976,14 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 +/* GL_EXT_texture_sRGB_R8 */ + +#define GL_SR8_EXT 0x8FBD + +/* GL_EXT_texture_sRGB_RG8 */ + +#define GL_SRG8_EXT 0x8FBE + /* GL_EXT_polygon_offset_clamp */ #define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B diff --git a/src/MagnumExternal/OpenGL/GLES2/flextGLWindowsDesktop.h b/src/MagnumExternal/OpenGL/GLES2/flextGLWindowsDesktop.h index ec932705a..a860acacb 100644 --- a/src/MagnumExternal/OpenGL/GLES2/flextGLWindowsDesktop.h +++ b/src/MagnumExternal/OpenGL/GLES2/flextGLWindowsDesktop.h @@ -971,6 +971,14 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 +/* GL_EXT_texture_sRGB_R8 */ + +#define GL_SR8_EXT 0x8FBD + +/* GL_EXT_texture_sRGB_RG8 */ + +#define GL_SRG8_EXT 0x8FBE + /* GL_EXT_polygon_offset_clamp */ #define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B diff --git a/src/MagnumExternal/OpenGL/GLES3/extensions.txt b/src/MagnumExternal/OpenGL/GLES3/extensions.txt index 344cda9d5..c8ec51765 100644 --- a/src/MagnumExternal/OpenGL/GLES3/extensions.txt +++ b/src/MagnumExternal/OpenGL/GLES3/extensions.txt @@ -53,6 +53,8 @@ extension EXT_sRGB_write_control optional extension EXT_texture_compression_s3tc optional extension EXT_pvrtc_sRGB optional extension EXT_shader_integer_mix optional +extension EXT_texture_sRGB_R8 optional +extension EXT_texture_sRGB_RG8 optional extension EXT_polygon_offset_clamp optional extension EXT_texture_compression_rgtc optional extension EXT_texture_compression_bptc optional diff --git a/src/MagnumExternal/OpenGL/GLES3/flextGL.h b/src/MagnumExternal/OpenGL/GLES3/flextGL.h index a431e3bfd..6ac68c17c 100644 --- a/src/MagnumExternal/OpenGL/GLES3/flextGL.h +++ b/src/MagnumExternal/OpenGL/GLES3/flextGL.h @@ -1504,6 +1504,14 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 +/* GL_EXT_texture_sRGB_R8 */ + +#define GL_SR8_EXT 0x8FBD + +/* GL_EXT_texture_sRGB_RG8 */ + +#define GL_SRG8_EXT 0x8FBE + /* GL_EXT_polygon_offset_clamp */ #define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B diff --git a/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h b/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h index e6f7665f9..950d4c43b 100644 --- a/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h +++ b/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h @@ -1496,6 +1496,14 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 #define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 +/* GL_EXT_texture_sRGB_R8 */ + +#define GL_SR8_EXT 0x8FBD + +/* GL_EXT_texture_sRGB_RG8 */ + +#define GL_SRG8_EXT 0x8FBE + /* GL_EXT_polygon_offset_clamp */ #define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B