]> git.tdb.fi Git - libs/gl.git/blobdiff - source/misc.h
Bind ProgramData to a Program upon construction
[libs/gl.git] / source / misc.h
index 7aa8aaf9e7fb6d41c3d4acc893b464d581675b51..b8540bd61e7ec1fef504ec9c6c94dbdb6b2c164b 100644 (file)
@@ -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<typename T>
-       struct Binder: Base
-       {
-               const T &obj;
-
-               Binder(const T &o): obj(o) { obj.bind(); }
-               ~Binder() { obj.unbind(); }
-       };
-
-       Base *binder;
-
-public:
-       template<typename T>
-       Bind(const T &o): binder(new Binder<T>(o)) { }
-       ~Bind() { delete binder; }
-};
+void get(GLenum, int *);
+int get_i(GLenum);
 
 } // namespace GL
 } // namespace Msp