X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbuffer.h;h=810bfc1a56253e181f7cc55b5d228c3441e99fee;hb=be6ffe96ecb4707599fe1a6f620c348760213d46;hp=7682347ff1cf1962b411b36f146ca146c71d3b31;hpb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;p=libs%2Fgl.git diff --git a/source/core/buffer.h b/source/core/buffer.h index 7682347f..810bfc1a 100644 --- a/source/core/buffer.h +++ b/source/core/buffer.h @@ -15,8 +15,6 @@ public: virtual ~buffer_too_small() throw() { } }; -class BufferRange; - /** A buffer for storing data in GL memory. Putting vertex and index data in buffers can improve rendering performance. The VertexArray, Mesh and @@ -27,12 +25,12 @@ class Buffer: public BufferBackend friend BufferBackend; private: - unsigned size = 0; + std::size_t size = 0; public: /** Defines the storage size of the buffer. Must be called before data can be uploaded. Storage cannot be changed once set. */ - void storage(unsigned); + void storage(std::size_t); /** Uploads data into the buffer, completely replacing any previous contents. Storage must be defined beforehand. The data must have size @@ -41,11 +39,11 @@ public: /** Overwrites part of the buffer data with new data. Storage must be defined beforehand. */ - void sub_data(unsigned, unsigned, const void *); + void sub_data(std::size_t, std::size_t, const void *); - unsigned get_size() const { return size; } + std::size_t get_size() const { return size; } - void require_size(unsigned) const; + void require_size(std::size_t) const; using BufferBackend::map; using BufferBackend::unmap;