X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmatrix.h;h=79d330a30ca99e3c34348eca271c56f7d7be3404;hb=927a1aa0a3a27e463ec0efc08bd08e7c4e969909;hp=7dd08f23007dcfd47e315b35a81b65e095245042;hpb=f098a871fc6dc7b61a5aca5581fa327e4124c036;p=libs%2Fgl.git diff --git a/source/matrix.h b/source/matrix.h index 7dd08f23..79d330a3 100644 --- a/source/matrix.h +++ b/source/matrix.h @@ -8,7 +8,7 @@ Distributed under the LGPL #ifndef MSP_GL_MATRIX_H_ #define MSP_GL_MATRIX_H_ -#include +#include "gl.h" namespace Msp { namespace GL { @@ -22,9 +22,25 @@ enum MatrixMode void matrix_mode(MatrixMode); void load_identity(); +void load_matrix(const float *); +void load_matrix(const double *); +void mult_matrix(const float *); +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