Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The glRotatef function multiplies the current matrix by a rotation matrix.
void WINAPI glRotatef(
GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z
);
angle
The angle of rotation, in degrees.
x
The x coordinate of a vector.
y
The y coordinate of a vector.
z
The z coordinate of a vector.
This function does not return a value.
The following error code can be retrieved by the glGetError function.
Name | Meaning |
---|---|
|
The function was called between a call to glBegin and the corresponding call to glEnd. |
The glRotatef function computes a matrix that performs a counterclockwise rotation of angle degrees about the vector from the origin through the point (x, y, z).
The current matrix (see glMatrixMode) is multiplied by this rotation matrix, with the product replacing the current matrix. That is, if M is the current matrix and R is the translation matrix, then M is replaced with M R.
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects drawn after glRotatef is called are rotated. Use glPushMatrix and glPopMatrix to save and restore the unrotated coordinate system.
The following functions retrieve information related to glRotatef:
glGet with argument GL_RENDER_MODE
glGet with argument GL_MATRIX_MODE
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
Library |
|
DLL |
|
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today