X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbuffer.h;h=7ef846681a8d487a693ac59e177fee3e68cec970;hb=fcde8390ad577fe434dcd4b29e0f410d29f867c9;hp=cc5e58741c141f1fd5910e1abda23ec68a650a39;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/core/buffer.h b/source/core/buffer.h index cc5e5874..7ef84668 100644 --- a/source/core/buffer.h +++ b/source/core/buffer.h @@ -65,6 +65,7 @@ private: BufferType type; unsigned id; unsigned size; + bool allocated; static const Buffer *bound[5]; @@ -86,6 +87,10 @@ public: 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); @@ -125,6 +130,9 @@ public: private: static const Buffer *&binding(BufferType); static bool set_current(BufferType, const Buffer *); + +public: + void set_debug_name(const std::string &); };