Signature
Parameters
Variables | Description |
---|---|
x, y, z |
Specify the
x
,
y
, and
z
coordinates of a translation vector.
|
Description
glTranslate
produces a translation by
.
The current matrix
(see
glMatrixMode
)
is multiplied by this translation matrix,
with the product replacing the current matrix, as if
glMultMatrix
were called with the following matrix
for its argument:
If the matrix mode is either
GL_MODELVIEW
or
GL_PROJECTION
,
all objects drawn after a call to
glTranslate
are translated.
Use
glPushMatrix
and
glPopMatrix
to save and restore
the untranslated coordinate system.
Errors
GL_INVALID_OPERATION
is generated if
glTranslate
is executed between the execution of
glBegin
and the corresponding execution of
glEnd
.
Associated Gets
glGet
with argument
GL_MATRIX_MODE
glGet
with argument
GL_COLOR_MATRIX
glGet
with argument
GL_MODELVIEW_MATRIX
glGet
with argument
GL_PROJECTION_MATRIX
glGet
with argument
GL_TEXTURE_MATRIX
See Also
Copyright
Copyright
1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
http://oss.sgi.com/projects/FreeB/
.
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.
glTranslate
{LGPL or GPL or MPL} Kamaelia
Code/Python/Kamaelia/Examples/OpenGL/Checkers/CheckersPiece.py
Lines: 56
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube_controlled.py
Lines: 122
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube.py
Lines: 61
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/Checkers/CheckersPiece.py
Lines: 56
{LGPL or GPL or MPL} Kamaelia
Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/OpenGL/Checkers/CheckersPiece.py
Lines: 56
glTranslated
glTranslatef