]> git.tdb.fi Git - libs/gl.git/blobdiff - source/matrix.h
Move transform functions to matrix.h
[libs/gl.git] / source / matrix.h
index 66848b2d3f9dfe552bceb0ba4d90de758458f8fe..13de6c8f4542030eb22e35647c443e6e473640fb 100644 (file)
@@ -1,7 +1,14 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+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 {
@@ -15,9 +22,23 @@ enum MatrixMode
 
 void matrix_mode(MatrixMode);
 void load_identity();
+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