Browse Source

Added separate stencil formats to Renderbuffer.

vectorfields
Vladimír Vondruš 14 years ago
parent
commit
26b6d40a8b
  1. 57
      src/Renderbuffer.h

57
src/Renderbuffer.h

@ -68,7 +68,7 @@ class Renderbuffer {
* *
* Like AbstractTexture::Format without * Like AbstractTexture::Format without
* AbstractTexture::Format::RGB9Intensity5, three-component and * AbstractTexture::Format::RGB9Intensity5, three-component and
* compressed formats. * compressed formats, but with added separate stencil index.
*/ */
enum class Format: GLenum { enum class Format: GLenum {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -93,21 +93,64 @@ class Renderbuffer {
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Depth = GL_DEPTH_COMPONENT, DepthStencil = GL_DEPTH_STENCIL, /**
* Depth component, at least 16bit.
*
* Prefer to use the exactly specified version of this format, in
* this case e.g. `Format::%Depth16`.
* @requires_gl Use exactly specified format <tt>Format::%Depth16</tt> instead.
*/
Depth = GL_DEPTH_COMPONENT,
DepthStencil = GL_DEPTH_STENCIL,
#endif #endif
Depth16 = GL_DEPTH_COMPONENT16 Depth16 = GL_DEPTH_COMPONENT16,
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
,
Depth24 = GL_DEPTH_COMPONENT24, Depth24 = GL_DEPTH_COMPONENT24,
DepthFloat = GL_DEPTH_COMPONENT32F, DepthFloat = GL_DEPTH_COMPONENT32F,
/**
* Stencil index (unspecified size).
*
* Prefer to use the exactly specified version of this format, in
* this case e.g. `Format::%Stencil8`.
* @requires_gl Use exactly specified format <tt>Format::%Stencil8</tt> instead.
*/
Stencil = GL_STENCIL_INDEX,
/**
* 1-bit stencil index.
*
* @requires_gl Use <tt>Format::%Stencil8</tt> instead.
*/
Stencil1 = GL_STENCIL_INDEX1,
/**
* 4-bit stencil index.
*
* @requires_gl Use <tt>Format::%Stencil8</tt> instead.
*/
Stencil4 = GL_STENCIL_INDEX4,
#endif
/** 8-bit stencil index. */
Stencil8 = GL_STENCIL_INDEX8
#ifndef MAGNUM_TARGET_GLES
,
/**
* 16-bit stencil index.
*
* @requires_gl Use <tt>Format::%Stencil8</tt> instead.
*/
Stencil16 = GL_STENCIL_INDEX1,
Depth24Stencil8 = GL_DEPTH24_STENCIL8, Depth24Stencil8 = GL_DEPTH24_STENCIL8,
DepthFloatStencil8 = GL_DEPTH32F_STENCIL8 DepthFloatStencil8 = GL_DEPTH32F_STENCIL8
#endif #endif
/** @todo GL_STENCIL_INDEX1 - GL_STENCIL_INDEX16 (renderbuffer only) */
}; };
/** @copydoc AbstractTexture::InternalFormat */ /** @copydoc AbstractTexture::InternalFormat */

Loading…
Cancel
Save