+void Buffer::storage(unsigned sz)
+{
+ if(size>0)
+ throw invalid_operation("Buffer::storage");
+ if(sz==0)
+ throw invalid_argument("Buffer::storage");
+
+ size = sz;
+ if(ARB_buffer_storage)
+ {
+ static const int flags = GL_MAP_READ_BIT|GL_MAP_WRITE_BIT|GL_DYNAMIC_STORAGE_BIT;
+ if(ARB_direct_state_access)
+ glNamedBufferStorage(id, size, 0, flags);
+ else
+ {
+ BindRestore _bind(this, type);
+ glBufferStorage(type, size, 0, flags);
+ }
+ }
+}
+
+void Buffer::set_usage(BufferUsage)