Browse Source

Implementation of ARB_stencil_texturing.

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

2
doc/opengl-mapping.dox

@ -241,7 +241,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()"
@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::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()

2
doc/opengl-support.dox

@ -184,7 +184,7 @@ following:
@extension{ARB,robust_buffer_access_behavior} | done (nothing to do)
@extension{ARB,shader_image_size} | done (shading language only)
@extension{ARB,shader_storage_buffer_object} | only limit queries
@extension{ARB,stencil_texturing} | |
@extension{ARB,stencil_texturing} | done
@extension{ARB,texture_buffer_range} | done
@extension{ARB,texture_query_levels} | done (shading language only)
@extension{ARB,texture_storage_multisample} | done

6
src/Magnum/AbstractTexture.cpp

@ -286,6 +286,12 @@ void AbstractTexture::setMaxAnisotropy(const Float anisotropy) {
(this->*Context::current()->state().texture->setMaxAnisotropyImplementation)(anisotropy);
}
#ifndef MAGNUM_TARGET_GLES
void AbstractTexture::setDepthStencilMode(const Sampler::DepthStencilMode mode) {
(this->*Context::current()->state().texture->parameteriImplementation)(GL_DEPTH_STENCIL_TEXTURE_MODE, GLenum(mode));
}
#endif
void AbstractTexture::invalidateImage(const Int level) {
(this->*Context::current()->state().texture->invalidateImageImplementation)(level);
}

3
src/Magnum/AbstractTexture.h

@ -298,6 +298,9 @@ class MAGNUM_EXPORT AbstractTexture: public AbstractObject {
void setBorderColor(const Vector4ui& color);
#endif
void setMaxAnisotropy(Float anisotropy);
#ifndef MAGNUM_TARGET_GLES
void setDepthStencilMode(Sampler::DepthStencilMode mode);
#endif
void invalidateImage(Int level);
void generateMipmap();

8
src/Magnum/CubeMapTexture.h

@ -179,6 +179,14 @@ class CubeMapTexture: public AbstractTexture {
return *this;
}
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::setDepthStencilMode() */
CubeMapTexture& setDepthStencilMode(Sampler::DepthStencilMode mode) {
AbstractTexture::setDepthStencilMode(mode);
return *this;
}
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* @brief %Image size in given mip level

8
src/Magnum/CubeMapTextureArray.h

@ -207,6 +207,14 @@ class CubeMapTextureArray: public AbstractTexture {
return *this;
}
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::setDepthStencilMode() */
CubeMapTextureArray& setDepthStencilMode(Sampler::DepthStencilMode mode) {
AbstractTexture::setDepthStencilMode(mode);
return *this;
}
#endif
/**
* @brief %Image size in given mip level
* @param level Mip level

8
src/Magnum/RectangleTexture.h

@ -180,6 +180,14 @@ class RectangleTexture: public AbstractTexture {
return *this;
}
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::setDepthStencilMode() */
RectangleTexture& setDepthStencilMode(Sampler::DepthStencilMode mode) {
AbstractTexture::setDepthStencilMode(mode);
return *this;
}
#endif
/**
* @brief Set storage
* @param internalFormat Internal format

13
src/Magnum/Sampler.cpp

@ -99,6 +99,19 @@ Debug operator<<(Debug debug, const Sampler::Wrapping value) {
return debug << "Sampler::Wrapping::(invalid)";
}
#ifndef MAGNUM_TARGET_GLES
Debug operator<<(Debug debug, const Sampler::DepthStencilMode value) {
switch(value) {
#define _c(value) case Sampler::DepthStencilMode::value: return debug << "Sampler::DepthStencilMode::" #value;
_c(DepthComponent)
_c(StencilIndex)
#undef _c
}
return debug << "Sampler::DepthStencilMode::(invalid)";
}
#endif
#endif
}

22
src/Magnum/Sampler.h

@ -136,6 +136,23 @@ class MAGNUM_EXPORT Sampler {
#endif
};
#ifndef MAGNUM_TARGET_GLES
/**
* @brief Depth/stencil texture mode
*
* @see @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
* @requires_gl43 %Extension @extension{ARB,stencil_texturing}
* @requires_gl Stencil texturing is not available in OpenGL ES.
*/
enum class DepthStencilMode: GLenum {
/** Sample depth component */
DepthComponent = GL_DEPTH_COMPONENT,
/** Sample stencil index (as unsigned integer texture) */
StencilIndex = GL_STENCIL_INDEX
};
#endif
/**
* @brief Max supported max anisotropy
*
@ -165,6 +182,11 @@ Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Mipmap value);
/** @debugoperator{Magnum::Sampler} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Wrapping value);
#ifndef MAGNUM_TARGET_GLES
/** @debugoperator{Magnum::Sampler} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::DepthStencilMode value);
#endif
}
#endif

14
src/Magnum/Test/CubeMapTextureArrayGLTest.cpp

@ -44,6 +44,7 @@ class CubeMapTextureArrayGLTest: public AbstractOpenGLTester {
void sampling();
void samplingBorderInteger();
void samplingDepthStencilMode();
void storage();
@ -64,6 +65,7 @@ CubeMapTextureArrayGLTest::CubeMapTextureArrayGLTest() {
&CubeMapTextureArrayGLTest::sampling,
&CubeMapTextureArrayGLTest::samplingBorderInteger,
&CubeMapTextureArrayGLTest::samplingDepthStencilMode,
&CubeMapTextureArrayGLTest::storage,
@ -151,6 +153,18 @@ void CubeMapTextureArrayGLTest::samplingBorderInteger() {
MAGNUM_VERIFY_NO_ERROR();
}
void CubeMapTextureArrayGLTest::samplingDepthStencilMode() {
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::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
CubeMapTextureArray texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
void CubeMapTextureArrayGLTest::storage() {
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."));

12
src/Magnum/Test/CubeMapTextureGLTest.cpp

@ -51,6 +51,7 @@ class CubeMapTextureGLTest: public AbstractOpenGLTester {
#endif
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger();
void samplingDepthStencilMode();
#endif
void storage();
@ -81,6 +82,7 @@ CubeMapTextureGLTest::CubeMapTextureGLTest() {
#endif
#ifndef MAGNUM_TARGET_GLES
&CubeMapTextureGLTest::samplingBorderInteger,
&CubeMapTextureGLTest::samplingDepthStencilMode,
#endif
&CubeMapTextureGLTest::storage,
@ -182,6 +184,16 @@ void CubeMapTextureGLTest::samplingBorderInteger() {
MAGNUM_VERIFY_NO_ERROR();
}
void CubeMapTextureGLTest::samplingDepthStencilMode() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
CubeMapTexture texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
#endif
void CubeMapTextureGLTest::storage() {

14
src/Magnum/Test/RectangleTextureGLTest.cpp

@ -45,6 +45,7 @@ class RectangleTextureGLTest: public AbstractOpenGLTester {
void sampling();
void samplingBorderInteger();
void samplingDepthStencilMode();
void storage();
@ -63,6 +64,7 @@ RectangleTextureGLTest::RectangleTextureGLTest() {
&RectangleTextureGLTest::sampling,
&RectangleTextureGLTest::samplingBorderInteger,
&RectangleTextureGLTest::samplingDepthStencilMode,
&RectangleTextureGLTest::storage,
@ -147,6 +149,18 @@ void RectangleTextureGLTest::samplingBorderInteger() {
MAGNUM_VERIFY_NO_ERROR();
}
void RectangleTextureGLTest::samplingDepthStencilMode() {
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::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
RectangleTexture texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
void RectangleTextureGLTest::storage() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::texture_rectangle>())
CORRADE_SKIP(Extensions::GL::ARB::texture_rectangle::string() + std::string(" is not supported."));

18
src/Magnum/Test/SamplerTest.cpp

@ -37,12 +37,19 @@ class SamplerTest: public TestSuite::Tester {
void debugFilter();
void debugMipmap();
void debugWrapping();
#ifndef MAGNUM_TARGET_GLES
void debugDepthStencilMode();
#endif
};
SamplerTest::SamplerTest() {
addTests({&SamplerTest::debugFilter,
&SamplerTest::debugMipmap,
&SamplerTest::debugWrapping});
&SamplerTest::debugWrapping,
#ifndef MAGNUM_TARGET_GLES
&SamplerTest::debugDepthStencilMode
#endif
});
}
void SamplerTest::debugFilter() {
@ -66,6 +73,15 @@ void SamplerTest::debugWrapping() {
CORRADE_COMPARE(out.str(), "Sampler::Wrapping::ClampToEdge\n");
}
#ifndef MAGNUM_TARGET_GLES
void SamplerTest::debugDepthStencilMode() {
std::ostringstream out;
Debug(&out) << Sampler::DepthStencilMode::StencilIndex;
CORRADE_COMPARE(out.str(), "Sampler::DepthStencilMode::StencilIndex\n");
}
#endif
}}
CORRADE_TEST_MAIN(Magnum::Test::SamplerTest)

24
src/Magnum/Test/TextureArrayGLTest.cpp

@ -62,6 +62,8 @@ class TextureArrayGLTest: public AbstractOpenGLTester {
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger1D();
void samplingBorderInteger2D();
void samplingDepthStencilMode1D();
void samplingDepthStencilMode2D();
#else
void samplingBorder2D();
#endif
@ -127,6 +129,8 @@ TextureArrayGLTest::TextureArrayGLTest() {
#ifndef MAGNUM_TARGET_GLES
&TextureArrayGLTest::samplingBorderInteger1D,
&TextureArrayGLTest::samplingBorderInteger2D,
&TextureArrayGLTest::samplingDepthStencilMode1D,
&TextureArrayGLTest::samplingDepthStencilMode2D,
#else
&TextureArrayGLTest::samplingBorder2D,
#endif
@ -288,6 +292,16 @@ void TextureArrayGLTest::samplingBorderInteger1D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureArrayGLTest::samplingDepthStencilMode1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
Texture1DArray texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
#endif
void TextureArrayGLTest::sampling2D() {
@ -345,6 +359,16 @@ void TextureArrayGLTest::samplingBorderInteger2D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureArrayGLTest::samplingDepthStencilMode2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
Texture2DArray texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
#else
void TextureArrayGLTest::samplingBorder2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())

36
src/Magnum/Test/TextureGLTest.cpp

@ -68,6 +68,9 @@ class TextureGLTest: public AbstractOpenGLTester {
#ifndef MAGNUM_TARGET_GLES
void samplingBorderInteger2D();
void samplingBorderInteger3D();
void samplingDepthStencilMode1D();
void samplingDepthStencilMode2D();
void samplingDepthStencilMode3D();
#else
void samplingBorder2D();
void samplingBorder3D();
@ -154,6 +157,9 @@ TextureGLTest::TextureGLTest() {
#ifndef MAGNUM_TARGET_GLES
&TextureGLTest::samplingBorderInteger2D,
&TextureGLTest::samplingBorderInteger3D,
&TextureGLTest::samplingDepthStencilMode1D,
&TextureGLTest::samplingDepthStencilMode2D,
&TextureGLTest::samplingDepthStencilMode3D,
#else
&TextureGLTest::samplingBorder2D,
&TextureGLTest::samplingBorder3D,
@ -344,6 +350,16 @@ void TextureGLTest::sampling1D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingDepthStencilMode1D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
Texture1D texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
#endif
void TextureGLTest::sampling2D() {
@ -396,6 +412,16 @@ void TextureGLTest::samplingBorderInteger2D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingDepthStencilMode2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
Texture2D texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
#else
void TextureGLTest::samplingBorder2D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::NV::texture_border_clamp>())
@ -466,6 +492,16 @@ void TextureGLTest::samplingBorderInteger3D() {
MAGNUM_VERIFY_NO_ERROR();
}
void TextureGLTest::samplingDepthStencilMode3D() {
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::stencil_texturing>())
CORRADE_SKIP(Extensions::GL::ARB::stencil_texturing::string() + std::string(" is not supported."));
Texture3D texture;
texture.setDepthStencilMode(Sampler::DepthStencilMode::StencilIndex);
MAGNUM_VERIFY_NO_ERROR();
}
#else
void TextureGLTest::samplingBorder3D() {
#ifdef MAGNUM_TARGET_GLES2

20
src/Magnum/Texture.h

@ -425,6 +425,26 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
return *this;
}
#ifndef MAGNUM_TARGET_GLES
/**
* @brief Set depth/stencil texture mode
*
* Selects which component of packed depth/stencil texture is used for
* texturing. If @extension{EXT,direct_state_access} is not available,
* the texture is bound to some texture unit before the operation.
* Initial value is @ref Sampler::DepthStencilMode::DepthComponent.
* @see @fn_gl{ActiveTexture}, @fn_gl{BindTexture} and @fn_gl{TexParameter}
* or @fn_gl_extension{TextureParameter,EXT,direct_state_access}
* with @def_gl{DEPTH_STENCIL_TEXTURE_MODE}
* @requires_gl43 %Extension @extension{ARB,stencil_texturing}
* @requires_gl Stencil texturing is not available in OpenGL ES.
*/
Texture<dimensions>& setDepthStencilMode(Sampler::DepthStencilMode mode) {
AbstractTexture::setDepthStencilMode(mode);
return *this;
}
#endif
/**
* @brief Set storage
* @param levels Mip level count

8
src/Magnum/TextureArray.h

@ -184,6 +184,14 @@ template<UnsignedInt dimensions> class TextureArray: public AbstractTexture {
return *this;
}
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::setDepthStencilMode() */
TextureArray<dimensions>& setDepthStencilMode(Sampler::DepthStencilMode mode) {
AbstractTexture::setDepthStencilMode(mode);
return *this;
}
#endif
#ifndef MAGNUM_TARGET_GLES
/** @copydoc Texture::imageSize() */
typename DimensionTraits<dimensions+1, Int>::VectorType imageSize(Int level) {

3
src/Magnum/TextureFormat.h

@ -834,6 +834,7 @@ enum class TextureFormat: GLenum {
* Depth and stencil component, size implementation-dependent. Not
* supported in 3D textures, not allowed in unemulated
* @ref Texture::setStorage() "*Texture::setStorage()" calls.
* @see @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
* @deprecated_gl Prefer to use exactly specified version of this format,
* e.g. @ref Magnum::TextureFormat::Depth24Stencil8 "TextureFormat::Depth24Stencil8".
* @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} or
@ -847,6 +848,7 @@ enum class TextureFormat: GLenum {
/**
* 24bit depth and 8bit stencil component. Not supported in 3D textures.
* @see @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
* @requires_gl30 %Extension @extension{ARB,framebuffer_object}
* @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} and
* (@es_extension{OES,required_internalformat} or
@ -863,6 +865,7 @@ enum class TextureFormat: GLenum {
/**
* 32bit float depth component and 8bit stencil component. Not supported in
* 3D textures.
* @see @ref Texture::setDepthStencilMode() "*Texture::setDepthStencilMode()"
* @requires_gl30 %Extension @extension{ARB,depth_buffer_float}
* @requires_gles30 Only integral depth textures are available in OpenGL ES
* 2.0.

Loading…
Cancel
Save