X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmisc.cpp;h=39810be3d82b814ef6555032ab0cc422e40e7b62;hp=9815383a793ade89f5e7b5d23221af70b77e7a1b;hb=e37d3b91500994df3de4fe47bd3d3e75d3104b46;hpb=bdf2568e247af858c4a1ca8004d97f13fe9b8cb0 diff --git a/source/misc.cpp b/source/misc.cpp index 9815383a..39810be3 100644 --- a/source/misc.cpp +++ b/source/misc.cpp @@ -1,10 +1,4 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #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