'\" e '\"! eqn | mmdoc '\"macro stdmacro .ds Vn Version 1.2 .ds Dt 24 September 1999 .ds Re Release 1.2.1 .ds Dp Jan 14 18:30 .ds Dm 01 scale.gl .ds Xs 39478 4 scale.gl .TH GLSCALE 3G .SH NAME .B "glScaled, glScalef \- multiply the current matrix by a general scaling matrix .SH C SPECIFICATION void \f3glScaled\fP( GLdouble \fIx\fP, .nf .ta \w'\f3void \fPglScaled( 'u GLdouble \fIy\fP, GLdouble \fIz\fP ) .fi void \f3glScalef\fP( GLfloat \fIx\fP, .nf .ta \w'\f3void \fPglScalef( 'u GLfloat \fIy\fP, GLfloat \fIz\fP ) .fi .EQ delim $$ .EN .SH PARAMETERS .TP \w'\f2x\fP\ \f2y\fP\ \f2z\fP\ \ 'u \f2x\fP, \f2y\fP, \f2z\fP Specify scale factors along the \f2x\fP, \f2y\fP, and \f2z\fP axes, respectively. .SH DESCRIPTION \%\f3glScale\fP produces a nonuniform scaling along the \f2x\fP, \f2y\fP, and \f2z\fP axes. The three parameters indicate the desired scale factor along each of the three axes. .P The current matrix (see \%\f3glMatrixMode\fP) is multiplied by this scale matrix, and the product replaces the current matrix as if \%\f3glScale\fP were called with the following matrix as its argument: .P .ce .EQ left ( ~ down 20 matrix { ccol { ~"x" above ~0 above ~0 above ~0 } ccol { ~0 above ~"y" above ~0 above ~0 } ccol { ~0 above ~0 above ~"z" above ~0 } ccol { ~0 above ~0 above ~0 above ~1} } ~~ right ) .EN .sp If the matrix mode is either \%\f3GL_MODELVIEW\fP or \%\f3GL_PROJECTION\fP, all objects drawn after \%\f3glScale\fP is called are scaled. .P Use \%\f3glPushMatrix\fP and \%\f3glPopMatrix\fP to save and restore the unscaled coordinate system. .SH NOTES If scale factors other than 1 are applied to the modelview matrix and lighting is enabled, lighting often appears wrong. In that case, enable automatic normalization of normals by calling \%\f3glEnable\fP with the argument \%\f3GL_NORMALIZE\fP. .SH ERRORS \%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glScale\fP is executed between the execution of \%\f3glBegin\fP and the corresponding execution of \%\f3glEnd\fP. .SH ASSOCIATED GETS \%\f3glGet\fP with argument \%\f3GL_MATRIX_MODE\fP .br \%\f3glGet\fP with argument \%\f3GL_COLOR_MATRIX\fP .br \%\f3glGet\fP with argument \%\f3GL_MODELVIEW_MATRIX\fP .br \%\f3glGet\fP with argument \%\f3GL_PROJECTION_MATRIX\fP .br \%\f3glGet\fP with argument \%\f3GL_TEXTURE_MATRIX\fP .SH SEE ALSO \%\f3glMatrixMode(3G)\fP, \%\f3glMultMatrix(3G)\fP, \%\f3glPushMatrix(3G)\fP, \%\f3glRotate(3G)\fP, \%\f3glTranslate(3G)\fP