friend class BufferRange;
private:
- BufferType type;
unsigned id;
unsigned size;
bool allocated;
static const Buffer *bound[5];
public:
- Buffer(BufferType);
+ Buffer();
~Buffer();
private:
/** Returns the OpenGL ID of the buffer. For internal use only. */
unsigned get_id() const { return id; }
- /** Returns the default binding type for the buffer. */
- BufferType get_type() const { return type; }
-
/** Defines the storage size of the buffer. Must be called before data can
be uploaded. Storage cannot be changed once set. */
void storage(unsigned);
DEPRECATED void *map(BufferAccess) { return map(); }
bool unmap();
- /** Binds the buffer in its default slot. */
- void bind() const { bind_to(type); }
-
- /** Binds the buffer in an alternate slot. */
+ /** Binds the buffer. */
void bind_to(BufferType) const;
- /** Unbinds the buffer from its default slot. */
- void unbind() const { unbind_from(type); }
-
static const Buffer *current(BufferType);
static void unbind_from(BufferType);
private: