X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.cpp;fp=source%2Fmisc.cpp;h=3af18765f8fa468ea657dbf71f0f02c992c44fdb;hb=6924ea10c4111b11eab51f0e1aa5b4a6438da7d3;hp=f27fa5e235820ebed59224fb365474712dd1f12e;hpb=f136af6873d7409daffe262b14f632af986bd7dc;p=libs%2Fgl.git diff --git a/source/misc.cpp b/source/misc.cpp index f27fa5e2..3af18765 100644 --- a/source/misc.cpp +++ b/source/misc.cpp @@ -1,3 +1,4 @@ +#include #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