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.

Description

glClearColor specifies the red, green, blue, and alpha values used by glClear to clear the color buffers. Values specified by glClearColor are clamped to the range 0 1 .

Notes

The type of the red , green , blue , and alpha parameters was changed from GLclampf to GLfloat. This change is transparent to user code and is described in detail on the removedTypes page.

Associated Gets

glGet with argument GL_COLOR_CLEAR_VALUE

Version Support

glClearColor

See Also

glClear , removedTypes

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 .

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 OpenGLContext/browser/passes.py Lines: 53
OpenGLContext OpenGLContext/passes/flatcompat.py Lines: 116, 218
OpenGLContext OpenGLContext/passes/flatcore.py Lines: 105, 205
OpenGLContext OpenGLContext/passes/_flat.py Lines: 370, 483
OpenGLContext OpenGLContext/passes/rendervisitor.py Lines: 225
OpenGLContext tests/gldrawpixelssynth.py Lines: 36
OpenGLContext tests/_bitmap_font.py Lines: 46
OpenGLContext tests/glutmousewheel.py Lines: 17
OpenGLContext tests/redbook_alpha3D.py Lines: 116
OpenGLContext tests/redbook_surface.py Lines: 60
OpenGLContext tests/glut_font.py Lines: 29
OpenGLContext tests/wgl_font.py Lines: 44
OpenGLContext tests/gldrawpixels.py Lines: 51
OpenGLContext tests/wx_font.py Lines: 31
OpenGLContext tests/redbook_trim.py Lines: 88
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 34
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 110
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 86
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 182
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 51, 82
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 60
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson5.py Lines: 64
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson4.py Lines: 61
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 55
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 37
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson3.py Lines: 51
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson13.py Lines: 113
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson1.py Lines: 51
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 90
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 164
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson2.py Lines: 51
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6-multi.py Lines: 121
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson45.py Lines: 341
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 169
OpenGL-Demo PyOpenGL-Demo/dek/texturesurf.py Lines: 46
OpenGL-Demo PyOpenGL-Demo/dek/tile.py Lines: 32
OpenGL-Demo PyOpenGL-Demo/da/dots.py Lines: 42
OpenGL-Demo PyOpenGL-Demo/GLE/maintest.py Lines: 48
OpenGL-Demo PyOpenGL-Demo/GLUT/shader_test.py Lines: 25
OpenGL-Demo PyOpenGL-Demo/GLUT/glutplane.py Lines: 241
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 56
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/lorentz.py Lines: 66
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/arraytest.py Lines: 56
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 49
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 58
OpenGL-Demo PyOpenGL-Demo/redbook/hello.py Lines: 81
OpenGL-Demo PyOpenGL-Demo/redbook/drawf.py Lines: 74
OpenGL-Demo PyOpenGL-Demo/redbook/lines.py Lines: 74
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 81
OpenGL-Demo PyOpenGL-Demo/redbook/smooth.py Lines: 65
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 95
OpenGL-Demo PyOpenGL-Demo/redbook/double.py Lines: 83
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 129
OpenGL-Demo PyOpenGL-Demo/redbook/cube.py Lines: 65
OpenGL-Demo PyOpenGL-Demo/tom/demo.py Lines: 49, 69, 77
OpenGL-Demo PyOpenGL-Demo/tom/first.py Lines: 7
OpenGL-Demo PyOpenGL-Demo/tom/conechecker.py Lines: 10
OpenGL-Demo PyOpenGL-Demo/tom/checker.py Lines: 10
OpenGL-Demo PyOpenGL-Demo/tom/fog.py Lines: 53
OpenGL-Demo PyOpenGL-Demo/tom/Line.py Lines: 7
OpenGL-Demo PyOpenGL-Demo/tom/poly.py Lines: 38
OpenGL-Demo PyOpenGL-Demo/tom/lorentz.py Lines: 52
OpenGL-Demo PyOpenGL-Demo/tom/arraytest.py Lines: 26
OpenGL-Demo py2exe-example/shader_test.py Lines: 26
{Artistic License} PymmLib pymmlib/mmLib/OpenGLDriver.py Lines: 168
{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/3Ddrawing/3Ddrawing.py Lines: 80, 122, 154
{LGPL} PyMT examples/apps/paint/paint.py Lines: 116, 118
{LGPL} PyMT pymt/tools/designerapp/qtmtwindow.py Lines: 50
{LGPL} PyMT pymt/ui/window/__init__.py Lines: 18, 323
{LGPL} PyMT pymt/graphx/fbo.py Lines: 19, 110
{LGPL} Pyggel pyggel/view.py Lines: 196
{LGPL} Pyggel pyggel/data.py Lines: 544, 559, 606, 608
{LGPL} pygl2d pygl2d/display.py Lines: 39
{GPL} Scocca scocca/graphics/opengl/color.py Lines: 26
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 459
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 78
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 58
{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: 32
{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/MPS/Old/SoC/simplecube.py Lines: 61
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube_controlled.py Lines: 84
{LGPL or GPL or MPL} Kamaelia Sketches/THF/simplecube/simplecube.py Lines: 32
{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
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: 836, 852

MathML Rendering

Powered by MathJax