- DEPRECATED void data(unsigned, const void *);
-
- /** Overwrites part of the buffer data with new data. Storage must be
- defined beforehand. */
- void sub_data(unsigned, unsigned, const void *);
-
- unsigned get_size() const { return size; }
-
- void require_size(unsigned) const;
-
- BufferRange *create_range(unsigned, unsigned);
-
- void *map();
- 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. */
- 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:
- static const Buffer *&binding(BufferType);
- static bool set_current(BufferType, const Buffer *);
-
-public:
- void set_debug_name(const std::string &);
-};
+ /** Replaces a range of bytes in the buffer. Allocated storage must exist.
+ The range must be fully inside the buffer. */
+ void sub_data(std::size_t, std::size_t, const void *);