glClear

clear buffers to preset values

Signature

glClear( GLbitfield ( mask ) )-> void
glClear( mask )

Parameters

VariablesDescription
mask
Bitwise OR of masks that indicate the buffers to be cleared. The three masks are GL_COLOR_BUFFER_BIT , GL_DEPTH_BUFFER_BIT , and GL_STENCIL_BUFFER_BIT .

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glClear
OpenGLContext tests/gldrawpixels.py Lines: 53
OpenGLContext tests/wgl_font.py Lines: 45
OpenGLContext tests/shadow_1.py Lines: 247
OpenGLContext tests/gldrawpixelssynth.py Lines: 38
OpenGLContext tests/shadow_2.py Lines: 154
OpenGLContext tests/glutmousewheel.py Lines: 17
OpenGLContext tests/wx_font.py Lines: 32
OpenGLContext tests/redbook_alpha3D.py Lines: 117
OpenGLContext tests/glut_font.py Lines: 30
OpenGLContext tests/_bitmap_font.py Lines: 46
OpenGLContext OpenGLContext/passes/flatcore.py Lines: 106, 206
OpenGLContext OpenGLContext/passes/rendervisitor.py Lines: 231
OpenGLContext OpenGLContext/passes/_flat.py Lines: 371, 484
OpenGLContext OpenGLContext/passes/flatcompat.py Lines: 117, 220
OpenGLContext OpenGLContext/browser/passes.py Lines: 54
OpenGLContext OpenGLContext/scenegraph/spherebackground.py Lines: 61, 143
OpenGLContext OpenGLContext/shadow/passes.py Lines: 239
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 47
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 81
OpenGL-Demo PyOpenGL-Demo/GLUT/molehill.py Lines: 41
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 137
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 57
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 57
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 50
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 67
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 59
OpenGL-Demo PyOpenGL-Demo/GLE/texas.py Lines: 42
OpenGL-Demo PyOpenGL-Demo/GLE/helix.py Lines: 12
OpenGL-Demo PyOpenGL-Demo/GLE/cone.py Lines: 16
OpenGL-Demo PyOpenGL-Demo/dek/tile.py Lines: 32
OpenGL-Demo PyOpenGL-Demo/dek/texturesurf.py Lines: 45
OpenGL-Demo PyOpenGL-Demo/tom/Line.py Lines: 12
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 29
OpenGL-Demo PyOpenGL-Demo/tom/demo.py Lines: 52, 72, 80
OpenGL-Demo PyOpenGL-Demo/tom/first.py Lines: 12
OpenGL-Demo PyOpenGL-Demo/tom/conechecker.py Lines: 14, 50
OpenGL-Demo PyOpenGL-Demo/tom/checker.py Lines: 14
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 42
OpenGL-Demo PyOpenGL-Demo/tom/conesave.py Lines: 31
OpenGL-Demo PyOpenGL-Demo/tom/lorentz.py Lines: 55
OpenGL-Demo PyOpenGL-Demo/tom/fog.py Lines: 70
OpenGL-Demo PyOpenGL-Demo/tom/cone.py Lines: 29
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 139
OpenGL-Demo PyOpenGL-Demo/proesch/stereo/stereoDemo.py Lines: 74, 79, 82, 86, 89, 96
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 69
OpenGL-Demo PyOpenGL-Demo/redbook/lines.py Lines: 75
OpenGL-Demo PyOpenGL-Demo/redbook/cube.py Lines: 67
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 128
OpenGL-Demo PyOpenGL-Demo/redbook/scene.py Lines: 83
OpenGL-Demo PyOpenGL-Demo/redbook/smooth.py Lines: 80
OpenGL-Demo PyOpenGL-Demo/redbook/drawf.py Lines: 79
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 107
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 92
OpenGL-Demo PyOpenGL-Demo/redbook/hello.py Lines: 61
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 265, 305
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 88
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 221
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 76
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 112
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 139
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 90
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 76
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 76
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 150
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 186
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 390
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 149
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 142
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 75
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 67
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 77
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 139
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 43
OpenGL-Demo py2exe-example/shader_test.py Lines: 82
Glinter Widget.py Lines: 98
{Artistic License} PymmLib applications/glutviewer.py Lines: 178
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 162
pyBzEdit pyBzEdit.py Lines: 438
{LGPL} PyUI pyui/renderers/openglBase.py Lines: 291
{LGPL} PyUI2 renderers/openglBase.py Lines: 291
{LGPL} PyUI2 system/openglgraphics.py Lines: 43
{LGPL} VisionEgg VisionEgg/Core.py Lines: 584
{LGPL} PyMT examples/apps/paint/paint.py Lines: 117
{LGPL} PyMT examples/apps/3Dviewer/3Dviewer.py Lines: 39
{LGPL} PyMT examples/apps/3Ddrawing/3Ddrawing.py Lines: 81, 123, 155
{LGPL} PyMT pymt/tools/designerapp/qtmtwindow.py Lines: 51
{LGPL} PyMT pymt/graphx/stencil.py Lines: 22, 42, 78
{LGPL} PyMT pymt/graphx/fbo.py Lines: 19, 112, 114
{LGPL} PyMT pymt/ui/window/__init__.py Lines: 18, 324
{LGPL} Pyggel pyggel/data.py Lines: 545, 607, 623
{LGPL} Pyggel pyggel/misc.py Lines: 25
{LGPL} Pyggel pyggel/scene.py Lines: 171
{LGPL} Pyggel pyggel/view.py Lines: 331, 333
{LGPL} pygl2d pygl2d/window.py Lines: 32
{GPL} Scocca scocca/graphics/opengl/color.py Lines: 27
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/Old/SoC/simplecube.py Lines: 69
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 96
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 157
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 523
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Display3D.py Lines: 425
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 578
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube.py Lines: 38
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube.py Lines: 38
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube_controlled.py Lines: 93
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 523
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Display3D.py Lines: 425
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 578
Gloopy gloopy/view/render.py Lines: 104
OpenGL Tutorial (Python Translation) t02.playing-with-colors/FragPosition.py Lines: 83
OpenGL Tutorial (Python Translation) t02.playing-with-colors/VertexColors.py Lines: 86
OpenGL Tutorial (Python Translation) t01.hello-triangle/HelloTriangle.py Lines: 97
Visvis core/baseFigure.py Lines: 804, 820
{GPL3} OpenGL-Programmable 01-direct.py Lines: 136
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 240
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 294
{GPL3} OpenGL-Programmable 03-array.py Lines: 147
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 304
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 273
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 145
{GPL3} OpenGL-Programmable 05-shader.py Lines: 232
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 251
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 166