]> git.tdb.fi Git - libs/gl.git/blobdiff - source/misc.cpp
Use wrappers for single-value glGet* calls
[libs/gl.git] / source / misc.cpp
index f27fa5e235820ebed59224fb365474712dd1f12e..3af18765f8fa468ea657dbf71f0f02c992c44fdb 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/gl/extensions/arb_shader_objects.h>
 #include "misc.h"
 
 namespace Msp {
@@ -33,5 +34,19 @@ int get_i(GLenum state)
        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