]> git.tdb.fi Git - libs/gl.git/blobdiff - source/matrix.h
Style update: add spaces around assignment operators
[libs/gl.git] / source / matrix.h
index b4cc339ceccd3a46601e3529c4e21bcd563150b0..b574c7359506bf05e9cecc46fd9f4593f721bab2 100644 (file)
@@ -8,25 +8,39 @@ Distributed under the LGPL
 #ifndef MSP_GL_MATRIX_H_
 #define MSP_GL_MATRIX_H_
 
-#include <GL/gl.h>
+#include "gl.h"
 
 namespace Msp {
 namespace GL {
 
 enum MatrixMode
 {
-       MODELVIEW=GL_MODELVIEW,
-       PROJECTION=GL_PROJECTION,
-       TEXTURE=GL_TEXTURE
+       MODELVIEW = GL_MODELVIEW,
+       PROJECTION = GL_PROJECTION,
+       TEXTURE = GL_TEXTURE
 };
 
 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