gl.Rotate(angle, x, y, z)
gl.Rotate()
produces a rotation of angle degrees around the vector (x,y,z). The current matrix (See gl.MatrixMode for details.) is
multiplied by a rotation matrix with the product replacing the current matrix.
If the matrix mode is either #GL_MODELVIEW
or #GL_PROJECTION
, all objects drawn after gl.Rotate()
is called are rotated.
Use gl.PushMatrix() and gl.PopMatrix() to save and restore the unscaled coordinate system.
This rotation follows the right-hand rule, so if the vector (x,y,z) points toward the user, the rotation will be counterclockwise.
Please consult an OpenGL reference manual for more information.
#GL_INVALID_OPERATION
is generated if gl.Rotate()
is executed between the execution of gl.Begin() and the corresponding execution of gl.End().
#GL_MATRIX_MODE
gl.Get() with argument #GL_MODELVIEW_MATRIX
gl.Get() with argument #GL_PROJECTION_MATRIX
gl.Get() with argument #GL_TEXTURE_MATRIX