-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2010 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#ifndef MSP_GL_BINDABLE_H_
#define MSP_GL_BINDABLE_H_
Base *binder;
public:
+ template<typename T>
+ Bind(const T &o, bool r = false):
+ binder(r ? create(&o, T::current()) : create(&o))
+ { }
+
template<typename T>
Bind(const T *o, bool r = false):
binder(r ? create(o, T::current()) : create(o))
{ }
+ template<typename T>
+ Bind(T *o, bool r = false):
+ binder(r ? create(o, T::current()) : create(o))
+ { }
+
private:
Bind(const Bind &);
Bind &operator=(const Bind &);