X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.cpp;h=70b300a661783e5398b3ca891a6b646b3ceeae87;hb=efe80f5a696b4a3be2378dc6d635c89676afa12d;hp=b99310a98f5720441de5ba3a8bf787802f282f5b;hpb=7adcad3b40a03000a82e32db4523761c218309b8;p=libs%2Fgl.git diff --git a/source/misc.cpp b/source/misc.cpp index b99310a9..70b300a6 100644 --- a/source/misc.cpp +++ b/source/misc.cpp @@ -1,14 +1,43 @@ +/* $Id$ + +This file is part of libmspgl +Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #include "misc.h" namespace Msp { namespace GL { +void enable(GLenum state) +{ + glEnable(state); +} + +void disable(GLenum state) +{ + glDisable(state); +} + void set(GLenum state, bool value) { if(value) - glEnable(state); + enable(state); else - glDisable(state); + disable(state); +} + +void get(GLenum state, int &data) +{ + glGetIntegerv(state, &data); +} + +int get_i(GLenum state) +{ + int data; + get(state, data); + return data; } } // namespace GL