X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.cpp;h=3af18765f8fa468ea657dbf71f0f02c992c44fdb;hb=6924ea10c4111b11eab51f0e1aa5b4a6438da7d3;hp=c09d17f550aeeaa2807818fd443340b94c7e3595;hpb=98c810b6d2256aa65986bbde12c38917678121bb;p=libs%2Fgl.git diff --git a/source/misc.cpp b/source/misc.cpp index c09d17f5..3af18765 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,11 +22,6 @@ void set(GLenum state, bool value) disable(state); } -void get(GLenum state, int &data) -{ - glGetIntegerv(state, &data); -} - void get(GLenum state, int *data) { glGetIntegerv(state, data); @@ -45,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