From: Mikko Rasa Date: Sat, 30 Nov 2013 18:15:29 +0000 (+0200) Subject: Add a public refresh function to Bufferable X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4d3d1511616a0ad4a91f8a068b49faf2b450c298;p=libs%2Fgl.git Add a public refresh function to Bufferable This is needed soon for VAO support. --- diff --git a/source/bufferable.h b/source/bufferable.h index 0a30e80e..c8c9393c 100644 --- a/source/bufferable.h +++ b/source/bufferable.h @@ -31,6 +31,9 @@ public: buffer, and this object is inserted after it. */ void use_buffer(Buffer *buf, Bufferable *prev = 0); + /** Uploads new data into the buffer if necessary. */ + void refresh() const { if(dirty) update_buffer(); } + private: void unlink_from_buffer();