-/* $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_
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; }
-};
-
} // namespace GL
} // namespace Msp