X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fbuffer.h;h=47cab8cd5646e2c3842f641bd31dcb4c418aaf6f;hp=cc5e58741c141f1fd5910e1abda23ec68a650a39;hb=a061bbfa87391ddea42c6220c1e17054d5b6b0c8;hpb=6dc5c41fe93ed0cb4f9051387b5551182bc5df41 diff --git a/source/core/buffer.h b/source/core/buffer.h index cc5e5874..47cab8cd 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);