GLCLEAR(3G)
πΈ NAME πΈ
okay bestie, welcome to the GLCLEAR(3G) page β manual name is literally [FIXME: manual], no cap. The NAME is glClear β clear buffers to preset values. periodt. π
β¨ C SPECIFICATION β¨
void glClear(GLbitfield mask);
π PARAMETERS π
maskβ a bitwise OR of masks that tell it which buffers to clear. The three masks areGL_COLOR_BUFFER_BIT,GL_DEPTH_BUFFER_BIT, andGL_STENCIL_BUFFER_BIT. that's the whole vibe check. π«Ά
π DESCRIPTION π
glClear sets the bitplane area of the window to values previously selected by glClearColor, glClearDepth, and glClearStencil. Multiple color buffers can be cleared simultaneously by selecting more than one buffer at a time using glDrawBuffer(). it's giving "one call, many buffers" energy fr fr. π₯
okay so the pixel ownership test, the scissor test, dithering, and the buffer writemasks affect the operation of glClear. The scissor box bounds the cleared region. Alpha function, blend function, logical operation, stenciling, texture mapping, and depth-buffering are ignored by glClear. lowkey important: it's not doing allat. π
glClear takes a single argument that is the bitwise OR of several values indicating which buffer is to be cleared. the values are as follows:
GL_COLOR_BUFFER_BITβ indicates the buffers currently enabled for color writing. πGL_DEPTH_BUFFER_BITβ indicates the depth buffer. π¦GL_STENCIL_BUFFER_BITβ indicates the stencil buffer. π
The value to which each buffer is cleared depends on the setting of the clear value for that buffer. iykyk. π
π§ NOTES π§
If a buffer is not present, then a glClear directed at that buffer has no effect. literally no effect, bestie β it's not gonna fake it. π
π ERRORS π
GL_INVALID_VALUE is generated if any bit other than the three defined bits is set in mask. so bestie, do NOT sneak extra bits in there β that's the warning. π
the three defined bits areGL_COLOR_BUFFER_BIT,GL_DEPTH_BUFFER_BIT, andGL_STENCIL_BUFFER_BIT. keep it cute and keep it valid. π
π ASSOCIATED GETS π
glGet()with argumentGL_DEPTH_CLEAR_VALUEglGet()with argumentGL_COLOR_CLEAR_VALUEglGet()with argumentGL_STENCIL_CLEAR_VALUE
π VERSION SUPPORT π
Function / Feature Name: glClear β and she is supported in every listed OpenGL Version, no skips: 2.0 β, 2.1 β, 3.0 β, 3.1 β, 3.2 β, 3.3 β, 4.0 β, 4.1 β, 4.2 β, 4.3 β, 4.4 β, 4.5 β. she ate and left no crumbs. πβ¨
π¦ SEE ALSO π¦
glClearColorglClearDepthglClearStencilglColorMask()glDepthMask()glDrawBuffer()glScissor()glStencilMask()
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. yes bestie, the URL is exactly that β don't tweak it. π
π COPYRIGHT (the encore) π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. that's the second copyright block, and we are NOT skipping it. periodt. π
okay that's the whole page bestie! source: [FIXME: source], date: 08/09/2021, page: GLCLEAR(3G). bye and slay π
β¨π«Ά
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms