]> git.tdb.fi Git - libs/gl.git/blobdiff - source/bufferable.h
Make a const pointer to a Bufferable's buffer publicly accessible
[libs/gl.git] / source / bufferable.h
index a88f7b07a719535d426e262157fc8ef10879bd80..66a6db1871952a2a7e7940bd5f9f931cd88eb808 100644 (file)
@@ -53,9 +53,13 @@ public:
 private:
        void unlink_from_buffer();
 
+public:
+       /** Returns the buffer in which the data is stored. */
+       const Buffer *get_buffer() const { return buffer; }
+
 protected:
        /** Returns the buffer in which the data is stored. */
-       Buffer *get_buffer() const { return buffer; }
+       Buffer *get_mutable_buffer() const { return buffer; }
 
        /** Returns the amount of data to be stored in the buffer, in bytes. */
        virtual unsigned get_data_size() const = 0;