]> git.tdb.fi Git - libs/gl.git/blob - source/misc.cpp
Drop Id tags and copyright notices from files
[libs/gl.git] / source / misc.cpp
1 #include "misc.h"
2
3 namespace Msp {
4 namespace GL {
5
6 void enable(GLenum state)
7 {
8         glEnable(state);
9 }
10
11 void disable(GLenum state)
12 {
13         glDisable(state);
14 }
15
16 void set(GLenum state, bool value)
17 {
18         if(value)
19                 enable(state);
20         else
21                 disable(state);
22 }
23
24 void get(GLenum state, int &data)
25 {
26         glGetIntegerv(state, &data);
27 }
28
29 void get(GLenum state, int *data)
30 {
31         glGetIntegerv(state, data);
32 }
33
34 int get_i(GLenum state)
35 {
36         int data;
37         get(state, &data);
38         return data;
39 }
40
41 } // namespace GL
42 } // namespace Msp