13 #ifndef OGLPLUS_CONTEXT_BUFFER_MASKING_1201040722_HPP
14 #define OGLPLUS_CONTEXT_BUFFER_MASKING_1201040722_HPP
31 return _v[0] == GL_TRUE;
37 return _v[1] == GL_TRUE;
43 return _v[2] == GL_TRUE;
49 return _v[3] == GL_TRUE;
65 static void ColorMask(
bool r,
bool g,
bool b,
bool a)
68 r ? GL_TRUE : GL_FALSE,
69 g ? GL_TRUE : GL_FALSE,
70 b ? GL_TRUE : GL_FALSE,
71 a ? GL_TRUE : GL_FALSE
76 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
82 static void ColorMask(GLuint buffer,
bool r,
bool g,
bool b,
bool a)
84 OGLPLUS_GLFUNC(ColorMaski)(
86 r ? GL_TRUE : GL_FALSE,
87 g ? GL_TRUE : GL_FALSE,
88 b ? GL_TRUE : GL_FALSE,
89 a ? GL_TRUE : GL_FALSE
106 OGLPLUS_GLFUNC(
DepthMask)(mask ? GL_TRUE : GL_FALSE);
141 OGLPLUS_GLFUNC(GetIntegeri_v)(
163 OGLPLUS_GLFUNC(GetIntegerv)(GL_DEPTH_WRITEMASK, &result);
164 OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
165 return result == GL_TRUE;
178 OGLPLUS_GLFUNC(GetIntegerv)(
180 GL_STENCIL_BACK_WRITEMASK:
181 GL_STENCIL_WRITEMASK,
184 OGLPLUS_VERIFY_SIMPLE(GetIntegerv);
185 return GLuint(result);
197 #endif // include guard
bool Blue(void) const
The blue component mask.
Definition: buffer_masking.hpp:41
static void DepthMask(bool mask)
Sets the depth mask.
Definition: buffer_masking.hpp:104
static oglplus::context::RGBAMask ColorWriteMask(GLuint buffer=0)
Returns the value of color buffer write mask.
Definition: buffer_masking.hpp:138
static GLuint StencilWriteMask(bool backface=false)
Returns the value of stencil write mask.
Definition: buffer_masking.hpp:175
static void ColorMask(bool r, bool g, bool b, bool a)
Sets the color mask.
Definition: buffer_masking.hpp:65
static void StencilMaskSeparate(Face face, GLuint mask)
Sets the stencil mask separately for front and back faces.
Definition: buffer_masking.hpp:126
bool Alpha(void) const
The alpha component mask.
Definition: buffer_masking.hpp:47
Face
Polygon facing enumeration.
Definition: face_mode.hpp:34
OpenGL face type-related enumeration.
Helper macro for optional checking of availability of GL function.
bool Red(void) const
The red component mask.
Definition: buffer_masking.hpp:29
static bool DepthWriteMask(void)
Returns the value of depth buffer write mask.
Definition: buffer_masking.hpp:160
bool Green(void) const
The green component mask.
Definition: buffer_masking.hpp:35
Wrappers for operations for fine control of buffer updates.
Definition: buffer_masking.hpp:57
Exception class for general OpenGL errors.
Definition: basic.hpp:43
Helper structure storing the clear color component mask.
Definition: buffer_masking.hpp:23
static void StencilMask(GLuint mask)
Sets the stencil mask.
Definition: buffer_masking.hpp:115
static void ColorMask(GLuint buffer, bool r, bool g, bool b, bool a)
Sets the color mask for a particular buffer.
Definition: buffer_masking.hpp:82