]> git.tdb.fi Git - libs/gl.git/blobdiff - source/misc.cpp
Visit the rest of an iteration statement in NodeRemover
[libs/gl.git] / source / misc.cpp
index 9815383a793ade89f5e7b5d23221af70b77e7a1b..39810be3d82b814ef6555032ab0cc422e40e7b62 100644 (file)
@@ -1,10 +1,4 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <msp/gl/extensions/arb_shader_objects.h>
 #include "misc.h"
 
 namespace Msp {
@@ -28,5 +22,26 @@ void set(GLenum state, bool value)
                disable(state);
 }
 
+int get_i(GLenum state)
+{
+       int data;
+       glGetIntegerv(state, &data);
+       return data;
+}
+
+int get_shader_i(unsigned id, GLenum state)
+{
+       int data;
+       glGetShaderiv(id, state, &data);
+       return data;
+}
+
+int get_program_i(unsigned id, GLenum state)
+{
+       int data;
+       glGetProgramiv(id, state, &data);
+       return data;
+}
+
 } // namespace GL
 } // namespace Msp