X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.h;h=32adc9bf04794a37ff5f1d3cdd718dddacf03d92;hb=refs%2Fheads%2Fmaster;hp=7aa8aaf9e7fb6d41c3d4acc893b464d581675b51;hpb=76e338af116120d93d082ad247591ec9adad9233;p=libs%2Fgl.git diff --git a/source/misc.h b/source/misc.h deleted file mode 100644 index 7aa8aaf9..00000000 --- a/source/misc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - -#ifndef MSP_GL_MISC_H_ -#define MSP_GL_MISC_H_ - -#include "gl.h" - -namespace Msp { -namespace GL { - -void enable(GLenum); -void disable(GLenum); -void set(GLenum, bool); - -void get(GLenum, int &); -int get_i(GLenum); - -class Bind -{ -private: - struct Base - { - virtual ~Base() { } - }; - - template - struct Binder: Base - { - const T &obj; - - Binder(const T &o): obj(o) { obj.bind(); } - ~Binder() { obj.unbind(); } - }; - - Base *binder; - -public: - template - Bind(const T &o): binder(new Binder(o)) { } - ~Bind() { delete binder; } -}; - -} // namespace GL -} // namespace Msp - -#endif