X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fmatrix.h;h=13de6c8f4542030eb22e35647c443e6e473640fb;hb=2316272b57cf9bea26d2c35b9451910c169efafa;hp=fe67ad7e4bf749693eedae982a2cbb0d10b40884;hpb=652cb91c2b6008c4407c16054085f20bf5888c4d;p=libs%2Fgl.git diff --git a/source/matrix.h b/source/matrix.h index fe67ad7e..13de6c8f 100644 --- a/source/matrix.h +++ b/source/matrix.h @@ -27,6 +27,18 @@ void mult_matrix(const double *); void push_matrix(); void pop_matrix(); +/// RAII object - pushes matrix when constructed and pops when destroyed +struct PushMatrix +{ + PushMatrix() { push_matrix(); } + ~PushMatrix() { pop_matrix(); } +}; + +void translate(float, float, float); +void rotate(float, float, float, float); +void scale(float, float, float); +void scale_uniform(float); + } // namespace GL } // namespace Msp