glClearColor

specify clear values for the color buffers

Signature

glClearColor( GLfloat ( red ) , GLfloat ( green ) , GLfloat ( blue ) , GLfloat ( alpha ) )-> void
glClearColor( red , green , blue , alpha )

Parameters

VariablesDescription
red, green, blue, alpha
Specify the red, green, blue, and alpha values used when the color buffers are cleared. The initial values are all 0.

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.

glClearColor
OpenGLContext tests/redbook_trim.py Lines: 89
OpenGLContext tests/gldrawpixels.py Lines: 52
OpenGLContext tests/redbook_surface.py Lines: 62
OpenGLContext tests/wgl_font.py Lines: 44
OpenGLContext tests/gldrawpixelssynth.py Lines: 37
OpenGLContext tests/glutmousewheel.py Lines: 16
OpenGLContext tests/wx_font.py Lines: 31
OpenGLContext tests/redbook_alpha3D.py Lines: 116
OpenGLContext tests/glut_font.py Lines: 29
OpenGLContext tests/_bitmap_font.py Lines: 45
OpenGLContext OpenGLContext/passes/flatcore.py Lines: 105, 205
OpenGLContext OpenGLContext/passes/rendervisitor.py Lines: 230
OpenGLContext OpenGLContext/passes/_flat.py Lines: 370, 483
OpenGLContext OpenGLContext/passes/flatcompat.py Lines: 116, 219
OpenGLContext OpenGLContext/browser/passes.py Lines: 53
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 241
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 25
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 56
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 56
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 49
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 66
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 58
OpenGL-Demo PyOpenGL-Demo/GLE/maintest.py Lines: 48
OpenGL-Demo PyOpenGL-Demo/dek/tile.py Lines: 31
OpenGL-Demo PyOpenGL-Demo/dek/texturesurf.py Lines: 44
OpenGL-Demo PyOpenGL-Demo/tom/Line.py Lines: 11
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 28
OpenGL-Demo PyOpenGL-Demo/tom/demo.py Lines: 51, 71, 79
OpenGL-Demo PyOpenGL-Demo/tom/first.py Lines: 11
OpenGL-Demo PyOpenGL-Demo/tom/conechecker.py Lines: 13
OpenGL-Demo PyOpenGL-Demo/tom/checker.py Lines: 13
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 41
OpenGL-Demo PyOpenGL-Demo/tom/lorentz.py Lines: 54
OpenGL-Demo PyOpenGL-Demo/tom/fog.py Lines: 57
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 166
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 85
OpenGL-Demo PyOpenGL-Demo/redbook/lines.py Lines: 71
OpenGL-Demo PyOpenGL-Demo/redbook/cube.py Lines: 63
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 127
OpenGL-Demo PyOpenGL-Demo/redbook/smooth.py Lines: 66
OpenGL-Demo PyOpenGL-Demo/redbook/drawf.py Lines: 75
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 96
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 79
OpenGL-Demo PyOpenGL-Demo/redbook/hello.py Lines: 79
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 171
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 59
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 180
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 49
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 84
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 87
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 62
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 49
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 49
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 116
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 108
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 357
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 119
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 58
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 31
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 34
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 49, 80
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 53
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 42
OpenGL-Demo py2exe-example/shader_test.py Lines: 26
Glinter Widget.py Lines: 97
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 161
pyBzEdit pyBzEdit.py Lines: 403
{LGPL} PyUI pyui/renderers/openglBase.py Lines: 290
{LGPL} PyUI2 renderers/openglBase.py Lines: 290
{LGPL} PyUI2 system/openglgraphics.py Lines: 41
{LGPL} VisionEgg VisionEgg/Core.py Lines: 581, 583
{LGPL} PyMT examples/apps/paint/paint.py Lines: 116, 118
{LGPL} PyMT examples/apps/3Ddrawing/3Ddrawing.py Lines: 80, 122, 154
{LGPL} PyMT pymt/tools/designerapp/qtmtwindow.py Lines: 50
{LGPL} PyMT pymt/graphx/fbo.py Lines: 19, 110
{LGPL} PyMT pymt/ui/window/__init__.py Lines: 18, 323
{LGPL} Pyggel pyggel/data.py Lines: 544, 559, 606, 608
{LGPL} Pyggel pyggel/view.py Lines: 196
{LGPL} pygl2d pygl2d/window.py Lines: 60
{GPL} Scocca scocca/graphics/opengl/color.py Lines: 26
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/Old/SoC/simplecube.py Lines: 43
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 39
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 59
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 134
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Display3D.py Lines: 143
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 458
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube.py Lines: 15
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube.py Lines: 15
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube_controlled.py Lines: 67
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 134
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Display3D.py Lines: 143
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 458
Gloopy gloopy/view/render.py Lines: 103
OpenGL Tutorial (Python Translation) t02.playing-with-colors/FragPosition.py Lines: 82
OpenGL Tutorial (Python Translation) t02.playing-with-colors/VertexColors.py Lines: 85
OpenGL Tutorial (Python Translation) t01.hello-triangle/HelloTriangle.py Lines: 96
Visvis core/baseFigure.py Lines: 803, 819