X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.cpp;h=aca3df0f700af7b500f0aa2dba239865e84ab675;hb=5eb4e7ebd0dc36bc0d9817dedcc152f3bd581f70;hp=9815383a793ade89f5e7b5d23221af70b77e7a1b;hpb=bdf2568e247af858c4a1ca8004d97f13fe9b8cb0;p=libs%2Fgl.git diff --git a/source/misc.cpp b/source/misc.cpp index 9815383a..aca3df0f 100644 --- a/source/misc.cpp +++ b/source/misc.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "misc.h" namespace Msp { @@ -28,5 +21,22 @@ 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); +} + +int get_i(GLenum state) +{ + int data; + get(state, &data); + return data; +} + } // namespace GL } // namespace Msp