The Blender.BGL submodule (the OpenGL wrapper).
This module wraps OpenGL constants and functions, making them
available from within Blender Python.
The complete list can be retrieved from the module itself, by
listing its contents: dir(Blender.BGL). A simple search on the net can
point to more than enough material to teach OpenGL programming, from
books to many collections of tutorials.
|
glAccum(op,
value)
Operate on the accumulation buffer |
|
|
|
|
|
|
|
glBegin(mode)
Delimit the vertices of a primitive or a group of like primatives |
|
|
|
glBindTexture(target,
texture)
Bind a named texture to a texturing target |
|
|
|
glBitmap(width,
height,
xorig,
yorig,
xmove,
ymove,
bitmap)
Draw a bitmap |
|
|
|
|
|
|
|
glCallLists(n,
type,
lists)
Execute a list of display lists |
|
|
|
glClear(mask)
Clear buffers to preset values |
|
|
|
glClearAccum(red,
green,
blue,
alpha)
Specify clear values for the accumulation buffer |
|
|
|
glClearColor(red,
green,
blue,
alpha)
Specify clear values for the color buffers |
|
|
|
glClearDepth(depth)
Specify the clear value for the depth buffer |
|
|
|
glClearIndex(c)
Specify the clear value for the color index buffers |
|
|
|
|
|
glClipPlane(plane,
equation)
Specify a plane against which all geometry is clipped |
|
|
|
glColor(red,
green,
blue,
alpha)
glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub,
glColor3ui, glColor3us, glColor4b, glColor4d, glColor4f, glColor4i,
glColor4s, glColor4ub, glColor4ui, glColor4us, glColor3bv,
glColor3dv, glColor3fv, glColor3iv, glColor3sv, glColor3ubv,
glColor3uiv, glColor3usv, glColor4bv, glColor4dv, glColor4fv,
glColor4iv, glColor4sv, glColor4ubv, glColor4uiv, glColor4usv |
|
|
|
glColorMask(red,
green,
blue,
alpha)
Enable and disable writing of frame buffer color components |
|
|
|
glColorMaterial(face,
mode)
Cause a material color to track the current color |
|
|
|
glCopyPixels(x,
y,
width,
height,
type)
Copy pixels in the frame buffer |
|
|
|
glCullFace(mode)
Specify whether front- or back-facing facets can be culled |
|
|
|
glDeleteLists(list,
range)
Delete a contiguous group of display lists |
|
|
|
|
|
glDepthFunc(func)
Specify the value used for depth buffer comparisons |
|
|
|
glDepthMask(flag)
Enable or disable writing into the depth buffer |
|
|
|
glDepthRange(zNear,
zFar)
Specify mapping of depth values from normalized device coordinates to
window coordinates |
|
|
|
glDisable(cap)
Disable server-side GL capabilities |
|
|
|
glDrawBuffer(mode)
Specify which color buffers are to be drawn into |
|
|
|
glDrawPixels(width,
height,
format,
type,
pixels)
Write a block of pixels to the frame buffer |
|
|
|
|
|
glEnable(cap)
Enable server-side GL capabilities |
|
|
|
glEnd()
Delimit the vertices of a primitive or group of like primitives |
|
|
|
|
|
glEvalCoord(u,
v)
glEvalCoord1d, glEvalCoord1f, glEvalCoord2d, glEvalCoord2f,
glEvalCoord1dv, glEvalCoord1fv, glEvalCoord2dv, glEvalCoord2fv |
|
|
|
glEvalMesh(mode,
i1,
i2)
glEvalMesh1 or glEvalMesh2 |
|
|
|
|
|
|
|
glFinish()
Block until all GL execution is complete |
|
|
|
glFlush()
Force Execution of GL commands in finite time |
|
|
|
glFog(pname,
param)
glFogf, glFogi, glFogfv, glFogiv |
|
|
|
glFrontFace(mode)
Define front- and back-facing polygons |
|
|
|
glFrustum(left,
right,
bottom,
top,
zNear,
zFar)
Multiply the current matrix by a perspective matrix |
|
|
|
glGenLists(range)
Generate a contiguous set of empty display lists |
|
|
|
|
|
glGet(pname,
param)
glGetBooleanv, glGetfloatv, glGetFloatv, glGetIntegerv |
|
|
|
glGetClipPlane(plane,
equation)
Return the coefficients of the specified clipping plane |
|
|
|
|
|
glGetLight(light,
pname,
params)
glGetLightfv and glGetLightiv |
|
|
|
glGetMap(target,
query,
v)
glGetMapdv, glGetMapfv, glGetMapiv |
|
|
|
glGetMaterial(face,
pname,
params)
glGetMaterialfv, glGetMaterialiv |
|
|
|
glGetPixelMap(map,
values)
glGetPixelMapfv, glGetPixelMapuiv, glGetPixelMapusv |
|
|
|
|
|
glGetString(name)
Return a string describing the current GL connection |
|
|
|
glGetTexEnv(target,
pname,
params)
glGetTexEnvfv, glGetTexEnviv |
|
|
|
glGetTexGen(coord,
pname,
params)
glGetTexGendv, glGetTexGenfv, glGetTexGeniv |
|
|
|
glGetTexImage(target,
level,
format,
type,
pixels)
Return a texture image |
|
|
|
|
|
|
|
glHint(target,
mode)
Specify implementation-specific hints |
|
|
|
glIndex(c)
glIndexd, glIndexf, glIndexi, glIndexs, glIndexdv, glIndexfv,
glIndexiv, glIndexsv |
|
|
|
|
|
|
|
glIsList(list)
Determine if a name corresponds to a display-list |
|
|
|
glIsTexture(texture)
Determine if a name corresponds to a texture |
|
|
|
glLight(light,
pname,
param)
glLightf,glLighti, glLightfv, glLightiv |
|
|
|
glLightModel(pname,
param)
glLightModelf, glLightModeli, glLightModelfv, glLightModeliv |
|
|
|
|
|
glLineWidth(width)
Specify the width of rasterized lines. |
|
|
|
glListBase(base)
Set the display-list base for glCallLists |
|
|
|
|
|
|
|
|
|
glLogicOp(opcode)
Specify a logical pixel operation for color index rendering |
|
|
|
glMap1(target,
u1,
u2,
stride,
order,
points)
glMap1d, glMap1f |
|
|
|
glMap2(target,
u1,
u2,
ustride,
uorder,
v1,
v2,
vstride,
vorder,
points)
glMap2d, glMap2f |
|
|
|
glMapGrid(un,
u1,
u2,
vn,
v1,
v2)
glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f |
|
|
|
glMaterial(face,
pname,
params)
Specify material parameters for the lighting model. |
|
|
|
glMatrixMode(mode)
Specify which matrix is the current matrix. |
|
|
|
|
|
glNewList(list,
mode)
Create or replace a display list |
|
|
|
glNormal3(nx,
ny,
nz,
v)
Normal3b, Normal3bv, Normal3d, Normal3dv, Normal3f, Normal3fv,
Normal3i, Normal3iv, Normal3s, Normal3sv |
|
|
|
glOrtho(left,
right,
bottom,
top,
zNear,
zFar)
Multiply the current matrix with an orthographic matrix |
|
|
|
|
|
glPixelMap(map,
mapsize,
values)
glPixelMapfv, glPixelMapuiv, glPixelMapusv |
|
|
|
|
|
|
|
glPixelZoom(xfactor,
yfactor)
Specify the pixel zoom factors |
|
|
|
glPointSize(size)
Specify the diameter of rasterized points |
|
|
|
|
|
glPolygonOffset(factor,
units)
Set the scale and units used to calculate depth values |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
glRasterPos(x,
y,
z,
w)
glRasterPos2d, glRasterPos2f, glRasterPos2i, glRasterPos2s,
glRasterPos3d, glRasterPos3f, glRasterPos3i, glRasterPos3s,
glRasterPos4d, glRasterPos4f, glRasterPos4i, glRasterPos4s,
glRasterPos2dv, glRasterPos2fv, glRasterPos2iv, glRasterPos2sv,
glRasterPos3dv, glRasterPos3fv, glRasterPos3iv, glRasterPos3sv,
glRasterPos4dv, glRasterPos4fv, glRasterPos4iv, glRasterPos4sv |
|
|
|
|
|
glReadPixels(x,
y,
width,
height,
format,
type,
pixels)
Read a block of pixels from the frame buffer |
|
|
|
glRect(x1,
y1,
x2,
y2,
v1,
v2)
glRectd, glRectf, glRecti, glRects, glRectdv, glRectfv, glRectiv,
glRectsv |
|
|
|
|
|
glRotate(angle,
x,
y,
z)
glRotated, glRotatef |
|
|
|
glScale(x,
y,
z)
glScaled, glScalef |
|
|
|
glScissor(x,
y,
width,
height)
Define the scissor box |
|
|
|
glSelectBuffer(size,
buffer)
Establish a buffer for selection mode values |
|
|
|
|
|
glStencilFuc(func,
ref,
mask)
Set function and reference value for stencil testing |
|
|
|
glStencilMask(mask)
Control the writing of individual bits in the stencil planes |
|
|
|
glStencilOp(fail,
zfail,
zpass)
Set stencil test actions |
|
|
|
glTexCoord(s,
t,
r,
q,
v)
glTexCoord1d, glTexCoord1f, glTexCoord1i, glTexCoord1s,
glTexCoord2d, glTexCoord2f, glTexCoord2i, glTexCoord2s, glTexCoord3d,
glTexCoord3f, glTexCoord3i, glTexCoord3s, glTexCoord4d, glTexCoord4f,
glTexCoord4i, glTexCoord4s, glTexCoord1dv, glTexCoord1fv,
glTexCoord1iv, glTexCoord1sv, glTexCoord2dv, glTexCoord2fv,
glTexCoord2iv, glTexCoord2sv, glTexCoord3dv, glTexCoord3fv,
glTexCoord3iv, glTexCoord3sv, glTexCoord4dv, glTexCoord4fv,
glTexCoord4iv, glTexCoord4sv |
|
|
|
glTexEnv(target,
pname,
param)
glTextEnvf, glTextEnvi, glTextEnvfv, glTextEnviv |
|
|
|
glTexGen(coord,
pname,
param)
glTexGend, glTexGenf, glTexGeni, glTexGendv, glTexGenfv,
glTexGeniv |
|
|
|
glTexImage1D(target,
level,
internalformat,
width,
border,
format,
type,
pixels)
Specify a one-dimensional texture image |
|
|
|
glTexImage2D(target,
level,
internalformat,
width,
height,
border,
format,
type,
pixels)
Specify a two-dimensional texture image |
|
|
|
glTexParameter(target,
pname,
param)
glTexParameterf, glTexParameteri, glTexParameterfv,
glTexParameteriv |
|
|
|
|
|
glVertex(x,
y,
z,
w,
v)
glVertex2d, glVertex2f, glVertex2i, glVertex2s, glVertex3d,
glVertex3f, glVertex3i, glVertex3s, glVertex4d, glVertex4f,
glVertex4i, glVertex4s, glVertex2dv, glVertex2fv, glVertex2iv,
glVertex2sv, glVertex3dv, glVertex3fv, glVertex3iv, glVertex3sv,
glVertex4dv, glVertex4fv, glVertex4iv, glVertex4sv |
|
|
|
|
|
gluPerspective(fovY,
aspect,
zNear,
zFar)
Set up a perspective projection matrix. |
|
|
|
gluLookAt(eyex,
eyey,
eyez,
centerx,
centery,
centerz,
upx,
upy,
upz)
Define a viewing transformation |
|
|
|
gluOrtho2D(left,
right,
bottom,
top)
Define a 2-D orthographic projection matrix |
|
|
|
gluPickMatrix(x,
y,
width,
height,
viewport)
Define a picking region |
|
|
|
gluProject(objx,
objy,
objz,
modelMatrix,
projMatrix,
viewport,
winx,
winy,
winz)
Map object coordinates to window coordinates. |
|
|
|
gluUnProject(winx,
winy,
winz,
modelMatrix,
projMatrix,
viewport,
objx,
objy,
objz)
Map object coordinates to window coordinates. |
|
|