Browse Source

Implemented OES_texture_stencil8 AEP extension.

pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
c4b74f72a8
  1. 2
      doc/opengl-support.dox
  2. 4
      src/Magnum/AbstractTexture.cpp
  3. 5
      src/Magnum/ColorFormat.h
  4. 7
      src/Magnum/TextureFormat.h

2
doc/opengl-support.dox

@ -392,7 +392,7 @@ Extension | Status
@es_extension{OES,sample_variables} | done (shading language only)
@es_extension{OES,shader_image_atomic} | done (shading language only)
@es_extension{OES,shader_multisample_interpolation} | |
@es_extension{OES,texture_stencil8} | |
@es_extension{OES,texture_stencil8} | done
@es_extension{OES,texture_storage_multisample_2d_array} | done
@subsection opengl-support-webgl10 WebGL 1.0

4
src/Magnum/AbstractTexture.cpp

@ -643,7 +643,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
#endif
return ColorFormat::DepthComponent;
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_WEBGL
case TextureFormat::StencilIndex8:
return ColorFormat::StencilIndex;
#endif
@ -840,7 +840,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
return ColorType::Float;
#endif
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_WEBGL
case TextureFormat::StencilIndex8:
return ColorType::UnsignedByte;
#endif

5
src/Magnum/ColorFormat.h

@ -265,13 +265,14 @@ enum class ColorFormat: GLenum {
* data, otherwise for framebuffer reading only.
* @requires_es_extension Extension @es_extension2{NV,read_stencil,GL_NV_read_depth_stencil},
* for framebuffer reading only.
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{OES,texture_stencil8}, for texture data only.
* @requires_gles Stencil index is not available in WebGL.
* @todo Where to get GL_STENCIL_INDEX in ES?
*/
#ifndef MAGNUM_TARGET_GLES
StencilIndex = GL_STENCIL_INDEX,
#else
StencilIndex = 0x1901,
StencilIndex = GL_STENCIL_INDEX_OES,
#endif
#endif

7
src/Magnum/TextureFormat.h

@ -998,12 +998,13 @@ enum class TextureFormat: GLenum {
DepthComponent32F = GL_DEPTH_COMPONENT32F,
#endif
#ifndef MAGNUM_TARGET_GLES
#ifndef MAGNUM_TARGET_WEBGL
/**
* Stencil index, 8bit. Not supported in 3D textures.
* @requires_gl44 Extension @extension{ARB,texture_stencil8}
* @requires_gl Only available as renderbuffer format in OpenGL ES and
* WebGL.
* @requires_es_extension Extension @es_extension{ANDROID,extension_pack_es31a}/
* @es_extension{OES,texture_stencil8}
* @requires_gles Only available as renderbuffer format in WebGL.
*/
StencilIndex8 = GL_STENCIL_INDEX8,
#endif

Loading…
Cancel
Save