void OpenGLContext::rotate( VGfloat angle ) { Matrix33* active = getActiveMatrix(); Matrix33 rotate; rotate.setRotation( radians( angle ) ); Matrix33 tmp; tmp.setIdentity(); Matrix33::multiply( tmp, rotate, *active ); active->copy( tmp ); loadGLMatrix(); }
void OpenGLContext::scale( VGfloat sx, VGfloat sy ) { Matrix33* active = getActiveMatrix(); Matrix33 scale; scale.setIdentity(); scale.setScale( sx, sy ); Matrix33 tmp; Matrix33::multiply( tmp, scale, *active ); active->copy( tmp ); loadGLMatrix(); }
void OpenGLContext::translate( VGfloat x, VGfloat y ) { Matrix33* active = getActiveMatrix(); Matrix33 translate; translate.setTranslate( x, y ); Matrix33 tmp; tmp.setIdentity(); Matrix33::multiply( tmp, translate, *active ); active->copy( tmp ); loadGLMatrix(); }
void OpenGLContext::setIdentity() { Matrix33* active = getActiveMatrix(); active->setIdentity(); loadGLMatrix(); }