BufferType type;
unsigned id;
unsigned size;
+ bool allocated;
static const Buffer *bound[5];
be uploaded. Storage cannot be changed once set. */
void storage(unsigned);
+ /** Allocates storage for the buffer. The contents are initially undefined.
+ If storage has already been allocated, does nothing. */
+ void allocate();
+
/** Sets the usage hint of the buffer. It will take effect the next time
the buffer's contents are defined. */
DEPRECATED void set_usage(BufferUsage);
private:
static const Buffer *&binding(BufferType);
static bool set_current(BufferType, const Buffer *);
+
+public:
+ void set_debug_name(const std::string &);
};
static bool set_current(BufferType, unsigned, const BufferRange *);
public:
- static unsigned get_n_uniform_buffer_bindings();
- static unsigned get_uniform_buffer_alignment();
+ DEPRECATED static unsigned get_n_uniform_buffer_bindings();
+ DEPRECATED static unsigned get_uniform_buffer_alignment();
};
} // namespace GL