Browse Source

Depth/stencil can be stored only in renderbuffer in OpenGL ES 2.0.

Moreover only sized version is permitted.
vectorfields
Vladimír Vondruš 14 years ago
parent
commit
9cb27a4dc3
  1. 19
      src/AbstractImage.h
  2. 18
      src/AbstractTexture.h
  3. 4
      src/Renderbuffer.h

19
src/AbstractImage.h

@ -72,9 +72,11 @@ class MAGNUM_EXPORT AbstractImage {
#endif #endif
RGB = GL_RGB, /**< Three-component RGB */ RGB = GL_RGB, /**< Three-component RGB */
RGBA = GL_RGBA, /**< Four-component RGBA */ RGBA = GL_RGBA /**< Four-component RGBA */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
,
/** /**
* Three-component BGR * Three-component BGR
* @requires_gl * @requires_gl
@ -86,16 +88,19 @@ class MAGNUM_EXPORT AbstractImage {
* @requires_gl * @requires_gl
*/ */
BGRA = GL_BGRA, BGRA = GL_BGRA,
#endif
/** Depth component. For framebuffer reading only. */ /**
* Depth component. For framebuffer reading only.
* @requires_gl
*/
Depth = GL_DEPTH_COMPONENT, Depth = GL_DEPTH_COMPONENT,
/** Stencil index. For framebuffer reading only. */ /**
StencilIndex = GL_STENCIL_INDEX * Stencil index. For framebuffer reading only.
* @requires_gl
*/
StencilIndex = GL_STENCIL_INDEX,
#ifndef MAGNUM_TARGET_GLES
,
/** /**
* Depth and stencil component. For framebuffer reading only. * Depth and stencil component. For framebuffer reading only.
* @requires_gl * @requires_gl

18
src/AbstractTexture.h

@ -344,10 +344,12 @@ class MAGNUM_EXPORT AbstractTexture {
* Three-component RGB, unsigned normalized, red and blue 5bit, * Three-component RGB, unsigned normalized, red and blue 5bit,
* green 6bit, 16bit total. * green 6bit, 16bit total.
*/ */
RGB565 = GL_RGB565, RGB565 = GL_RGB565
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
,
/** /**
* Three-component RGB, unsigned with exponent, each component * Three-component RGB, unsigned with exponent, each component
* 9bit, exponent 5bit, 32bit total. * 9bit, exponent 5bit, 32bit total.
@ -407,7 +409,6 @@ class MAGNUM_EXPORT AbstractTexture {
* @requires_gl30 Extension @extension{EXT,texture_compression_rgtc} * @requires_gl30 Extension @extension{EXT,texture_compression_rgtc}
*/ */
CompressedRtgcSignedRedGreen = GL_COMPRESSED_SIGNED_RG_RGTC2, CompressedRtgcSignedRedGreen = GL_COMPRESSED_SIGNED_RG_RGTC2,
#endif
#if defined(GL_COMPRESSED_RGBA_BPTC_UNORM) || defined(DOXYGEN_GENERATING_OUTPUT) #if defined(GL_COMPRESSED_RGBA_BPTC_UNORM) || defined(DOXYGEN_GENERATING_OUTPUT)
/** /**
@ -444,10 +445,10 @@ class MAGNUM_EXPORT AbstractTexture {
* *
* Prefer to use the exactly specified version of this format, in * Prefer to use the exactly specified version of this format, in
* this case e.g. `Format::Depth16`. * this case e.g. `Format::Depth16`.
* @requires_gl
*/ */
Depth = GL_DEPTH_COMPONENT, Depth = GL_DEPTH_COMPONENT,
#ifndef MAGNUM_TARGET_GLES
/** /**
* Depth and stencil component, at least 24bit depth and 8bit * Depth and stencil component, at least 24bit depth and 8bit
* stencil. * stencil.
@ -457,13 +458,12 @@ class MAGNUM_EXPORT AbstractTexture {
* @requires_gl * @requires_gl
*/ */
DepthStencil = GL_DEPTH_STENCIL, DepthStencil = GL_DEPTH_STENCIL,
#endif
/** 16bit depth component. */ /**
Depth16 = GL_DEPTH_COMPONENT16 * 16bit depth component.
* @requires_gl
#ifndef MAGNUM_TARGET_GLES */
, Depth16 = GL_DEPTH_COMPONENT16,
/** /**
* 24bit depth component. * 24bit depth component.

4
src/Renderbuffer.h

@ -92,10 +92,8 @@ class Renderbuffer {
RGB565 = GL_RGB565, RGB565 = GL_RGB565,
#endif #endif
Depth = GL_DEPTH_COMPONENT,
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
DepthStencil = GL_DEPTH_STENCIL, Depth = GL_DEPTH_COMPONENT, DepthStencil = GL_DEPTH_STENCIL,
#endif #endif
Depth16 = GL_DEPTH_COMPONENT16 Depth16 = GL_DEPTH_COMPONENT16

Loading…
Cancel
Save