]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/predicate_backend.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / backends / opengl / predicate_backend.cpp
1 #include "gl.h"
2 #include "predicate.h"
3 #include "predicate_backend.h"
4
5 using namespace std;
6
7 namespace Msp {
8 namespace GL {
9
10 unsigned get_gl_predicate(Predicate pred)
11 {
12         switch(pred)
13         {
14         case NEVER: return GL_NEVER;
15         case ALWAYS: return GL_ALWAYS;
16         case LESS: return GL_LESS;
17         case LEQUAL: return GL_LEQUAL;
18         case EQUAL: return GL_EQUAL;
19         case GREATER: return GL_GREATER;
20         case GEQUAL: return GL_GEQUAL;
21         case NOTEQUAL: return GL_NOTEQUAL;
22         default: throw invalid_argument("get_gl_predicate");
23         }
24 }
25
26 } // namespace GL
27 } // namespace Msp