X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.h;h=464c08705ffd1b96efedcde880761c0ae994885f;hb=b07e3b2103c53e3cd6a4674eef481178ec64f2c7;hp=7aa8aaf9e7fb6d41c3d4acc893b464d581675b51;hpb=76e338af116120d93d082ad247591ec9adad9233;p=libs%2Fgl.git diff --git a/source/misc.h b/source/misc.h index 7aa8aaf9..464c0870 100644 --- a/source/misc.h +++ b/source/misc.h @@ -1,10 +1,3 @@ -/* $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_ @@ -17,33 +10,11 @@ void enable(GLenum); void disable(GLenum); void set(GLenum, bool); +///Deprecated (can't properly pass an array through a reference) 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; } -}; +void get(GLenum, int *); +int get_i(GLenum); } // namespace GL } // namespace Msp