X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmisc.h;h=b8540bd61e7ec1fef504ec9c6c94dbdb6b2c164b;hb=020811d96d5c823686e5c2b0a392b95d1a321f05;hp=7aa8aaf9e7fb6d41c3d4acc893b464d581675b51;hpb=76e338af116120d93d082ad247591ec9adad9233;p=libs%2Fgl.git diff --git a/source/misc.h b/source/misc.h index 7aa8aaf9..b8540bd6 100644 --- a/source/misc.h +++ b/source/misc.h @@ -17,33 +17,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