glBlendFunc

specify pixel arithmetic

Signature

glBlendFunc( GLenum ( sfactor ) , GLenum ( dfactor ) )-> void
glBlendFunc( sfactor , dfactor )
glBlendFunci( GLuint ( buf ) , GLenum ( sfactor ) , GLenum ( dfactor ) )-> void
glBlendFunci( buf , src , dst )

Parameters

VariablesDescription
buf
For glBlendFunci , specifies the index of the draw buffer for which to set the blend function.
sfactor
Specifies how the red, green, blue, and alpha source blending factors are computed. The initial value is GL_ONE .
dfactor
Specifies how the red, green, blue, and alpha destination blending factors are computed. The following symbolic constants are accepted: GL_ZERO , GL_ONE , GL_SRC_COLOR , GL_ONE_MINUS_SRC_COLOR , GL_DST_COLOR , GL_ONE_MINUS_DST_COLOR , GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA , GL_DST_ALPHA , GL_ONE_MINUS_DST_ALPHA . GL_CONSTANT_COLOR , GL_ONE_MINUS_CONSTANT_COLOR , GL_CONSTANT_ALPHA , and GL_ONE_MINUS_CONSTANT_ALPHA . The initial value is GL_ZERO .

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.

glBlendFunc
OpenGLContext tests/shadow_1.py Lines: 270
OpenGLContext tests/nehe8.py Lines: 116
OpenGLContext tests/wx_font.py Lines: 28
OpenGLContext tests/redbook_alpha3D.py Lines: 140
OpenGLContext tests/redbook_alpha.py Lines: 79
OpenGLContext tests/glut_font.py Lines: 27
OpenGLContext tests/_bitmap_font.py Lines: 43
OpenGLContext OpenGLContext/passes/renderpass.py Lines: 334, 340
OpenGLContext OpenGLContext/passes/flatcore.py Lines: 163
OpenGLContext OpenGLContext/passes/_flat.py Lines: 439
OpenGLContext OpenGLContext/passes/flatcompat.py Lines: 177
OpenGLContext OpenGLContext/scenegraph/text/font.py Lines: 322
OpenGLContext OpenGLContext/shadow/passes.py Lines: 137, 236, 324
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 94
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 103, 181
Glinter Widget.py Lines: 572, 650
{Artistic License} PymmLib applications/glutviewer.py Lines: 189
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 204
{LGPL} PyUI pyui/renderers/openglBase.py Lines: 320
{LGPL} PyUI2 renderers/openglBase.py Lines: 320
{LGPL} PyUI2 system/openglgraphics.py Lines: 198
{LGPL} VisionEgg VisionEgg/Dots.py Lines: 185, 360
{LGPL} VisionEgg VisionEgg/SphereMap.py Lines: 284, 523, 1202
{LGPL} VisionEgg VisionEgg/MoreStimuli.py Lines: 122, 160, 326, 369, 507
{LGPL} VisionEgg VisionEgg/Textures.py Lines: 1458, 1601, 1777
{LGPL} VisionEgg VisionEgg/Text.py Lines: 493
{LGPL} VisionEgg VisionEgg/Gratings.py Lines: 346, 652
{LGPL} PyMT pymt/lib/squirtle.py Lines: 17, 45
{LGPL} PyMT pymt/graphx/statement.py Lines: 54, 153
{LGPL} PyMT pymt/graphx/colors.py Lines: 8, 49, 54
{LGPL} Pyggel pyggel/view.py Lines: 169
{LGPL} pygl2d pygl2d/window.py Lines: 56
{GPL} Scocca scocca/graphics/opengl/decorators.py Lines: 24
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 76
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 142
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/ProgressBar.py Lines: 140
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 142
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/ProgressBar.py Lines: 140
Gloopy gloopy/view/render.py Lines: 77
Visvis utils/cropper.py Lines: 385, 416
Visvis core/line.py Lines: 669, 672, 698, 720, 723, 806
Visvis core/baseFigure.py Lines: 838