/** * Multiply the current matrix with a general scaling matrix. * * \param x x axis scale factor. * \param y y axis scale factor. * \param z z axis scale factor. * * \sa glScalef(). * * Flushes the vertices and calls _math_matrix_scale() with the top-most * matrix in the current stack and the given parameters. Marks * __GLcontextRec::NewState with the dirty stack flag. */ void GLAPIENTRY _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); _math_matrix_scale( ctx->CurrentStack->Top, x, y, z); ctx->NewState |= ctx->CurrentStack->DirtyFlag; }
/** * Multiply the current matrix with a general scaling matrix. * * \param x x axis scale factor. * \param y y axis scale factor. * \param z z axis scale factor. * * \sa glScalef(). * * Flushes the vertices and calls _math_matrix_scale() with the top-most * matrix in the current stack and the given parameters. Marks * __struct gl_contextRec::NewState with the dirty stack flag. */ void GLAPIENTRY _mesa_Scalef( GLfloat x, GLfloat y, GLfloat z ) { GET_CURRENT_CONTEXT(ctx); FLUSH_VERTICES(ctx, 0); _math_matrix_scale( ctx->CurrentStack->Top, x, y, z); ctx->NewState |= ctx->CurrentStack->DirtyFlag; }
void cogl_matrix_scale (CoglMatrix *matrix, float sx, float sy, float sz) { #ifndef USE_MESA_MATRIX_API matrix->xx *= sx; matrix->xy *= sy; matrix->xz *= sz; matrix->yx *= sx; matrix->yy *= sy; matrix->yz *= sz; matrix->zx *= sx; matrix->zy *= sy; matrix->zz *= sz; matrix->wx *= sx; matrix->wy *= sy; matrix->wz *= sz; #else _math_matrix_scale (matrix, sx, sy, sz); #endif _COGL_MATRIX_DEBUG_PRINT (matrix); }