]> git.tdb.fi Git - libs/gl.git/blobdiff - source/misc.cpp
Drop Id tags and copyright notices from files
[libs/gl.git] / source / misc.cpp
index 67b2a14266ea8c231d24f724bb4e94cf49e7df8c..aca3df0f700af7b500f0aa2dba239865e84ab675 100644 (file)
@@ -1,21 +1,41 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include "misc.h"
 
 namespace Msp {
 namespace GL {
 
+void enable(GLenum state)
+{
+       glEnable(state);
+}
+
+void disable(GLenum state)
+{
+       glDisable(state);
+}
+
 void set(GLenum state, bool value)
 {
        if(value)
-               glEnable(state);
+               enable(state);
        else
-               glDisable(state);
+               disable(state);
+}
+
+void get(GLenum state, int &data)
+{
+       glGetIntegerv(state, &data);
+}
+
+void get(GLenum state, int *data)
+{
+       glGetIntegerv(state, data);
+}
+
+int get_i(GLenum state)
+{
+       int data;
+       get(state, &data);
+       return data;
 }
 
 } // namespace GL