Browse Source

Support for EXT_texture_sRGB_decode.

pull/59/head
Vladimír Vondruš 12 years ago
parent
commit
4b6ae7afe6
  1. 2
      doc/opengl-mapping.dox
  2. 1
      doc/opengl-support.dox
  3. 5
      src/Magnum/AbstractTexture.cpp
  4. 1
      src/Magnum/AbstractTexture.h
  5. 2
      src/Magnum/Context.cpp
  6. 6
      src/Magnum/CubeMapTexture.h
  7. 6
      src/Magnum/CubeMapTextureArray.h
  8. 2
      src/Magnum/Extensions.h
  9. 17
      src/Magnum/RectangleTexture.h
  10. 14
      src/Magnum/Test/CubeMapTextureArrayGLTest.cpp
  11. 16
      src/Magnum/Test/CubeMapTextureGLTest.cpp
  12. 14
      src/Magnum/Test/RectangleTextureGLTest.cpp
  13. 36
      src/Magnum/Test/TextureArrayGLTest.cpp
  14. 52
      src/Magnum/Test/TextureGLTest.cpp
  15. 20
      src/Magnum/Texture.h
  16. 6
      src/Magnum/TextureArray.h

2
doc/opengl-mapping.dox

@ -232,7 +232,7 @@ OpenGL function | Matching API
@fn_gl{TexBuffer}, \n @fn_gl_extension{TextureBuffer,EXT,direct_state_access}, \n @fn_gl{TexBufferRange}, \n @fn_gl_extension{TextureBufferRange,EXT,direct_state_access} | @ref BufferTexture::setBuffer()
@fn_gl{TexImage1D}, \n @fn_gl_extension{TextureImage1D,EXT,direct_state_access} \n @fn_gl{TexImage2D}, \n @fn_gl_extension{TextureImage2D,EXT,direct_state_access}, \n @fn_gl{TexImage3D}, \n @fn_gl_extension{TextureImage3D,EXT,direct_state_access} | @ref Texture::setImage(), \n @ref TextureArray::setImage(), \n @ref CubeMapTexture::setImage(), \n @ref CubeMapTextureArray::setImage(), \n @ref RectangleTexture::setImage()
@fn_gl{TexImage2DMultisample}, \n @fn_gl{TexImage3DMultisample} | @ref MultisampleTexture::setStorage()
@fn_gl{TexParameter}, \n @fn_gl_extension{TextureParameter,EXT,direct_state_access} | @ref Texture::setBaseLevel() "*Texture::setBaseLevel()", \n @ref Texture::setMaxLevel() "*Texture::setMaxLevel()", \n @ref Texture::setMinificationFilter() "*Texture::setMinificationFilter()", \n @ref Texture::setMagnificationFilter() "*Texture::setMagnificationFilter()", \n @ref Texture::setMinLod() "*Texture::setMinLod()", \n @ref Texture::setMaxLod() "*Texture::setMaxLod()", \n @ref Texture::setLodBias() "*Texture::setLodBias()", \n @ref Texture::setWrapping() "*Texture::setWrapping()", \n @ref Texture::setBorderColor() "*Texture::setBorderColor()", \n @ref Texture::setMaxAnisotropy() "*Texture::setMaxAnisotropy()", \n @ref Texture::setSwizzle() "*Texture::setSwizzle()", \n @ref Texture::setCompareMode() "*Texture::setCompareMode()", \n @ref Texture::setCompareFunction() "*Texture::setCompareFunction()", \n @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
@fn_gl{TexParameter}, \n @fn_gl_extension{TextureParameter,EXT,direct_state_access} | @ref Texture::setBaseLevel() "*Texture::setBaseLevel()", \n @ref Texture::setMaxLevel() "*Texture::setMaxLevel()", \n @ref Texture::setMinificationFilter() "*Texture::setMinificationFilter()", \n @ref Texture::setMagnificationFilter() "*Texture::setMagnificationFilter()", \n @ref Texture::setMinLod() "*Texture::setMinLod()", \n @ref Texture::setMaxLod() "*Texture::setMaxLod()", \n @ref Texture::setLodBias() "*Texture::setLodBias()", \n @ref Texture::setWrapping() "*Texture::setWrapping()", \n @ref Texture::setBorderColor() "*Texture::setBorderColor()", \n @ref Texture::setMaxAnisotropy() "*Texture::setMaxAnisotropy()", \n @ref Texture::setSRGBDecode() "*Texture::setSRGBDecode()", \n @ref Texture::setSwizzle() "*Texture::setSwizzle()", \n @ref Texture::setCompareMode() "*Texture::setCompareMode()", \n @ref Texture::setCompareFunction() "*Texture::setCompareFunction()", \n @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
@fn_gl{TexStorage1D}, \n @fn_gl_extension{TextureStorage1D,EXT,direct_state_access}, \n @fn_gl{TexStorage2D}, \n @fn_gl_extension{TextureStorage2D,EXT,direct_state_access}, \n @fn_gl{TexStorage3D}, \n @fn_gl_extension{TextureStorage3D,EXT,direct_state_access} | @ref Texture::setStorage(), \n @ref TextureArray::setStorage(), \n @ref CubeMapTexture::setStorage(), \n @ref CubeMapTextureArray::setStorage(), \n @ref RectangleTexture::setStorage()
@fn_gl{TexStorage2DMultisample}, \n @fn_gl_extension{TextureStorage2DMultisample,EXT,direct_state_access}, \n @fn_gl{TexStorage3DMultisample}, \n @fn_gl_extension{TextureStorage3DMultisample,EXT,direct_state_access} | @ref MultisampleTexture::setStorage()
@fn_gl{TexSubImage1D}, \n @fn_gl_extension{TextureSubImage1D,EXT,direct_state_access}, \n @fn_gl{TexSubImage2D}, \n @fn_gl_extension{TextureSubImage2D,EXT,direct_state_access}, \n @fn_gl{TexSubImage3D}, \n @fn_gl_extension{TextureSubImage3D,EXT,direct_state_access} | @ref Texture::setSubImage(), \n @ref TextureArray::setSubImage(), \n @ref CubeMapTexture::setSubImage(), \n @ref CubeMapTextureArray::setSubImage(), \n @ref RectangleTexture::setSubImage()

1
doc/opengl-support.dox

@ -222,6 +222,7 @@ following:
@extension{EXT,texture_filter_anisotropic} (also in ES) | done
@extension{EXT,texture_mirror_clamp} | only GL 4.4 subset
@extension{EXT,direct_state_access} | done for implemented functionality
@extension{EXT,texture_sRGB_decode} (also in ES) | done
@extension{EXT,shader_integer_mix} (also in ES) | done (shading language only)
@extension2{EXT,debug_label} (also in ES) | missing pipeline, transform feedback and sampler label
@extension2{EXT,debug_marker} (also in ES) | missing marker groups

5
src/Magnum/AbstractTexture.cpp

@ -287,6 +287,11 @@ void AbstractTexture::setMaxAnisotropy(const Float anisotropy) {
(this->*Context::current()->state().texture->setMaxAnisotropyImplementation)(anisotropy);
}
void AbstractTexture::setSRGBDecode(bool decode) {
(this->*Context::current()->state().texture->parameteriImplementation)(GL_TEXTURE_SRGB_DECODE_EXT,
decode ? GL_DECODE_EXT : GL_SKIP_DECODE_EXT);
}
#ifndef MAGNUM_TARGET_GLES2
void AbstractTexture::setSwizzleInternal(const GLint r, const GLint g, const GLint b, const GLint a) {
#ifndef MAGNUM_TARGET_GLES

1
src/Magnum/AbstractTexture.h

@ -309,6 +309,7 @@ class MAGNUM_EXPORT AbstractTexture: public AbstractObject {
void setBorderColor(const Vector4ui& color);
#endif
void setMaxAnisotropy(Float anisotropy);
void setSRGBDecode(bool decode);
#ifndef MAGNUM_TARGET_GLES2
template<char r, char g, char b, char a> void setSwizzle() {

2
src/Magnum/Context.cpp

@ -66,6 +66,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension(GL,EXT,texture_filter_anisotropic),
_extension(GL,EXT,texture_mirror_clamp),
_extension(GL,EXT,direct_state_access),
_extension(GL,EXT,texture_sRGB_decode),
_extension(GL,EXT,shader_integer_mix),
_extension(GL,EXT,debug_label),
_extension(GL,EXT,debug_marker),
@ -199,6 +200,7 @@ const std::vector<Extension>& Extension::extensions(Version version) {
_extension(GL,EXT,debug_label),
_extension(GL,EXT,debug_marker),
_extension(GL,EXT,disjoint_timer_query),
_extension(GL,EXT,texture_sRGB_decode),
_extension(GL,EXT,separate_shader_objects),
_extension(GL,EXT,sRGB),
_extension(GL,EXT,multisampled_render_to_texture),

6
src/Magnum/CubeMapTexture.h

@ -188,6 +188,12 @@ class MAGNUM_EXPORT CubeMapTexture: public AbstractTexture {
return *this;
}
/** @copydoc Texture::setSRGBDecode() */
CubeMapTexture& setSRGBDecode(bool decode) {
AbstractTexture::setSRGBDecode(decode);
return *this;
}
#ifndef MAGNUM_TARGET_GLES2
/** @copydoc Texture::setSwizzle() */
template<char r, char g, char b, char a> CubeMapTexture& setSwizzle() {

6
src/Magnum/CubeMapTextureArray.h

@ -218,6 +218,12 @@ class CubeMapTextureArray: public AbstractTexture {
return *this;
}
/** @copydoc RectangleTexture::setSRGBDecode() */
CubeMapTextureArray& setSRGBDecode(bool decode) {
AbstractTexture::setSRGBDecode(decode);
return *this;
}
/**
* @copybrief Texture::setSwizzle()
* @return Reference to self (for method chaining)

2
src/Magnum/Extensions.h

@ -187,6 +187,7 @@ namespace GL {
_extension(GL,EXT,transform_feedback, GL210, GL300) // #352
_extension(GL,EXT,direct_state_access, GL210, None) // #353
_extension(GL,EXT,texture_snorm, GL300, GL310) // #365
_extension(GL,EXT,texture_sRGB_decode, GL210, None) // #402
_extension(GL,EXT,shader_integer_mix, GL300, None) // #437
_extension(GL,EXT,debug_label, GL210, None) // #439
_extension(GL,EXT,debug_marker, GL210, None) // #440
@ -259,6 +260,7 @@ namespace GL {
_extension(GL,EXT,map_buffer_range, GLES200, GLES300) // #121
#endif
_extension(GL,EXT,disjoint_timer_query, GLES200, None) // #150
_extension(GL,EXT,texture_sRGB_decode, GLES200, None) // #152
#ifdef MAGNUM_TARGET_GLES2
_extension(GL,EXT,instanced_arrays, GLES200, GLES300) // #156
_extension(GL,EXT,draw_instanced, GLES200, GLES300) // #157

17
src/Magnum/RectangleTexture.h

@ -190,6 +190,23 @@ class MAGNUM_EXPORT RectangleTexture: public AbstractTexture {
return *this;
}
/**
* @brief Set sRGB decoding
* @return Reference to self (for method chaining)
*
* Disables or reenables decoding of sRGB values. Initial value is
* `true`.
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and
* @fn_gl{TexParameter} or
* @fn_gl_extension{TextureParameter,EXT,direct_state_access} with
* @def_gl{TEXTURE_SRGB_DECODE_EXT}
* @requires_extension %Extension @extension{EXT,texture_sRGB_decode}
*/
RectangleTexture& setSRGBDecode(bool decode) {
AbstractTexture::setSRGBDecode(decode);
return *this;
}
/**
* @copybrief Texture::setSwizzle()
* @return Reference to self (for method chaining)

14
src/Magnum/Test/CubeMapTextureArrayGLTest.cpp

@ -43,6 +43,7 @@ class CubeMapTextureArrayGLTest: public AbstractOpenGLTester {
void bind();
void sampling();
void samplingSRGBDecode();
void samplingBorderInteger();
void samplingSwizzle();
void samplingDepthStencilMode();
@ -65,6 +66,7 @@ CubeMapTextureArrayGLTest::CubeMapTextureArrayGLTest() {
&CubeMapTextureArrayGLTest::bind,
&CubeMapTextureArrayGLTest::sampling,
&CubeMapTextureArrayGLTest::samplingSRGBDecode,
&CubeMapTextureArrayGLTest::samplingBorderInteger,
&CubeMapTextureArrayGLTest::samplingSwizzle,
&CubeMapTextureArrayGLTest::samplingDepthStencilMode,
@ -141,6 +143,18 @@ void CubeMapTextureArrayGLTest::sampling() {
MAGNUM_VERIFY_NO_ERROR();
}
void CubeMapTextureArrayGLTest::samplingSRGBDecode() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_cube_map_array>())
CORRADE_SKIP(Extensions::GL::ARB::texture_cube_map_array::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
CubeMapTextureArray texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
void CubeMapTextureArrayGLTest::samplingBorderInteger() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_cube_map_array>())
CORRADE_SKIP(Extensions::GL::ARB::texture_cube_map_array::string() + std::string(" is not supported."));

16
src/Magnum/Test/CubeMapTextureGLTest.cpp

@ -46,6 +46,7 @@ class CubeMapTextureGLTest: public AbstractOpenGLTester {
void bind();
void sampling();
void samplingSRGBDecode();
#ifndef MAGNUM_TARGET_GLES2
void samplingSwizzle();
#else
@ -80,6 +81,7 @@ CubeMapTextureGLTest::CubeMapTextureGLTest() {
&CubeMapTextureGLTest::bind,
&CubeMapTextureGLTest::sampling,
&CubeMapTextureGLTest::samplingSRGBDecode,
#ifndef MAGNUM_TARGET_GLES2
&CubeMapTextureGLTest::samplingSwizzle,
#else
@ -169,6 +171,20 @@ void CubeMapTextureGLTest::sampling() {
MAGNUM_VERIFY_NO_ERROR();
}
void CubeMapTextureGLTest::samplingSRGBDecode() {
#ifdef MAGNUM_TARGET_GLES2
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::sRGB>())
CORRADE_SKIP(Extensions::GL::EXT::sRGB::string() + std::string(" is not supported."));
#endif
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
CubeMapTexture texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
#ifndef MAGNUM_TARGET_GLES2
void CubeMapTextureGLTest::samplingSwizzle() {
#ifndef MAGNUM_TARGET_GLES

14
src/Magnum/Test/RectangleTextureGLTest.cpp

@ -44,6 +44,7 @@ class RectangleTextureGLTest: public AbstractOpenGLTester {
void bind();
void sampling();
void samplingSRGBDecode();
void samplingBorderInteger();
void samplingSwizzle();
void samplingDepthStencilMode();
@ -64,6 +65,7 @@ RectangleTextureGLTest::RectangleTextureGLTest() {
&RectangleTextureGLTest::bind,
&RectangleTextureGLTest::sampling,
&RectangleTextureGLTest::samplingSRGBDecode,
&RectangleTextureGLTest::samplingBorderInteger,
&RectangleTextureGLTest::samplingSwizzle,
&RectangleTextureGLTest::samplingDepthStencilMode,
@ -137,6 +139,18 @@ void RectangleTextureGLTest::sampling() {
MAGNUM_VERIFY_NO_ERROR();
}
void RectangleTextureGLTest::samplingSRGBDecode() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
RectangleTexture texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
void RectangleTextureGLTest::samplingBorderInteger() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));

36
src/Magnum/Test/TextureArrayGLTest.cpp

@ -55,6 +55,11 @@ class TextureArrayGLTest: public AbstractOpenGLTester {
#endif
void sampling2D();
#ifndef MAGNUM_TARGET_GLES
void samplingSRGBDecode1D();
#endif
void samplingSRGBDecode2D();
#ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES
void samplingSwizzle1D();
@ -128,6 +133,11 @@ TextureArrayGLTest::TextureArrayGLTest() {
#endif
&TextureArrayGLTest::sampling2D,
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingSRGBDecode1D,
#endif
&TextureArrayGLTest::samplingSRGBDecode2D,
#ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingSwizzle1D,
@ -292,6 +302,18 @@ void TextureArrayGLTest::sampling1D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureArrayGLTest::samplingSRGBDecode1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
Texture1DArray texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
void TextureArrayGLTest::samplingSwizzle1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_swizzle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_swizzle::string() + std::string(" is not supported."));
@ -361,6 +383,20 @@ void TextureArrayGLTest::sampling2D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureArrayGLTest::samplingSRGBDecode2D() {
#ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_array>())
CORRADE_SKIP(Extensions::GL::EXT::texture_array::string() + std::string(" is not supported."));
#endif
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
Texture2DArray texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
#ifndef MAGNUM_TARGET_GLES2
void TextureArrayGLTest::samplingSwizzle2D() {
#ifndef MAGNUM_TARGET_GLES

52
src/Magnum/Test/TextureGLTest.cpp

@ -60,6 +60,12 @@ class TextureGLTest: public AbstractOpenGLTester {
void sampling2D();
void sampling3D();
#ifndef MAGNUM_TARGET_GLES
void samplingSRGBDecode1D();
#endif
void samplingSRGBDecode2D();
void samplingSRGBDecode3D();
#ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES
void samplingSwizzle1D();
@ -156,6 +162,12 @@ TextureGLTest::TextureGLTest() {
&TextureGLTest::sampling2D,
&TextureGLTest::sampling3D,
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::samplingSRGBDecode1D,
#endif
&TextureGLTest::samplingSRGBDecode2D,
&TextureGLTest::samplingSRGBDecode3D,
#ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::samplingSwizzle1D,
@ -367,6 +379,16 @@ void TextureGLTest::sampling1D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingSRGBDecode1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
Texture1D texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingSwizzle1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_swizzle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_swizzle::string() + std::string(" is not supported."));
@ -414,6 +436,20 @@ void TextureGLTest::sampling2D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingSRGBDecode2D() {
#ifdef MAGNUM_TARGET_GLES2
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::sRGB>())
CORRADE_SKIP(Extensions::GL::EXT::sRGB::string() + std::string(" is not supported."));
#endif
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
Texture2D texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
#ifndef MAGNUM_TARGET_GLES2
void TextureGLTest::samplingSwizzle2D() {
#ifndef MAGNUM_TARGET_GLES
@ -515,6 +551,22 @@ void TextureGLTest::sampling3D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingSRGBDecode3D() {
#ifdef MAGNUM_TARGET_GLES2
if(!Context::current()->isExtensionSupported<Extensions::GL::OES::texture_3D>())
CORRADE_SKIP(Extensions::GL::OES::texture_3D::string() + std::string(" is not supported."));
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::sRGB>())
CORRADE_SKIP(Extensions::GL::EXT::sRGB::string() + std::string(" is not supported."));
#endif
if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::texture_sRGB_decode>())
CORRADE_SKIP(Extensions::GL::EXT::texture_sRGB_decode::string() + std::string(" is not supported."));
Texture3D texture;
texture.setSRGBDecode(false);
MAGNUM_VERIFY_NO_ERROR();
}
#ifndef MAGNUM_TARGET_GLES2
void TextureGLTest::samplingSwizzle3D() {
#ifndef MAGNUM_TARGET_GLES

20
src/Magnum/Texture.h

@ -442,6 +442,26 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
return *this;
}
/**
* @brief Set sRGB decoding
* @return Reference to self (for method chaining)
*
* Disables or reenables decoding of sRGB values. Initial value is
* `true`.
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and
* @fn_gl{TexParameter} or
* @fn_gl_extension{TextureParameter,EXT,direct_state_access} with
* @def_gl{TEXTURE_SRGB_DECODE_EXT}
* @requires_extension %Extension @extension{EXT,texture_sRGB_decode}
* @requires_es_extension OpenGL ES 3.0 or extension
* @es_extension{EXT,sRGB} and
* @es_extension2{EXT,texture_sRGB_decode,texture_sRGB_decode}
*/
Texture<dimensions>& setSRGBDecode(bool decode) {
AbstractTexture::setSRGBDecode(decode);
return *this;
}
#ifndef MAGNUM_TARGET_GLES2
/**
* @brief Set component swizzle

6
src/Magnum/TextureArray.h

@ -196,6 +196,12 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
return *this;
}
/** @copydoc Texture::setSRGBDecode() */
TextureArray<dimensions>& setSRGBDecode(bool decode) {
AbstractTexture::setSRGBDecode(decode);
return *this;
}
#ifndef MAGNUM_TARGET_GLES2
/** @copydoc Texture::setSwizzle() */
template<char r, char g, char b, char a> TextureArray<dimensions>& setSwizzle() {

Loading…
Cancel
Save