]> git.tdb.fi Git - libs/gl.git/blob - source/matrix.h
Style update: add spaces around assignment operators
[libs/gl.git] / source / matrix.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_MATRIX_H_
9 #define MSP_GL_MATRIX_H_
10
11 #include "gl.h"
12
13 namespace Msp {
14 namespace GL {
15
16 enum MatrixMode
17 {
18         MODELVIEW = GL_MODELVIEW,
19         PROJECTION = GL_PROJECTION,
20         TEXTURE = GL_TEXTURE
21 };
22
23 void matrix_mode(MatrixMode);
24 void load_identity();
25 void load_matrix(const float *);
26 void load_matrix(const double *);
27 void mult_matrix(const float *);
28 void mult_matrix(const double *);
29 void push_matrix();
30 void pop_matrix();
31
32 /// RAII object - pushes matrix when constructed and pops when destroyed
33 struct PushMatrix
34 {
35         PushMatrix() { push_matrix(); }
36         ~PushMatrix() { pop_matrix(); }
37 };
38
39 void translate(float, float, float);
40 void rotate(float, float, float, float);
41 void scale(float, float, float);
42 void scale_uniform(float);
43
44 } // namespace GL
45 } // namespace Msp
46
47 #endif