--- /dev/null
+#include "gl.h"
+#include "predicate.h"
+#include "predicate_backend.h"
+
+using namespace std;
+
+namespace Msp {
+namespace GL {
+
+unsigned get_gl_predicate(Predicate pred)
+{
+ switch(pred)
+ {
+ case NEVER: return GL_NEVER;
+ case ALWAYS: return GL_ALWAYS;
+ case LESS: return GL_LESS;
+ case LEQUAL: return GL_LEQUAL;
+ case EQUAL: return GL_EQUAL;
+ case GREATER: return GL_GREATER;
+ case GEQUAL: return GL_GEQUAL;
+ case NOTEQUAL: return GL_NOTEQUAL;
+ default: throw invalid_argument("get_gl_predicate");
+ }
+}
+
+} // namespace GL
+} // namespace Msp