+/**
+An adaptor for Buffer to make it compatible with Bind.
+*/
+template<BufferType T>
+class BufferAlias
+{
+private:
+ const Buffer &buffer;
+
+public:
+ BufferAlias(const Buffer &b): buffer(b) { }
+
+ void bind() const { buffer.bind_to(T); }
+ static const Buffer *current() { return Buffer::current(T); }
+ static void unbind() { Buffer::unbind_from(T); }
+};
+