X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.cpp;h=70b300a661783e5398b3ca891a6b646b3ceeae87;hb=efe80f5a696b4a3be2378dc6d635c89676afa12d;hp=67b2a14266ea8c231d24f724bb4e94cf49e7df8c;hpb=f098a871fc6dc7b61a5aca5581fa327e4124c036;p=libs%2Fgl.git diff --git a/source/misc.cpp b/source/misc.cpp index 67b2a142..70b300a6 100644 --- a/source/misc.cpp +++ b/source/misc.cpp @@ -10,12 +10,34 @@ Distributed under the LGPL 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