From 4d3d1511616a0ad4a91f8a068b49faf2b450c298 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 30 Nov 2013 20:15:29 +0200 Subject: [PATCH] Add a public refresh function to Bufferable This is needed soon for VAO support. --- source/bufferable.h | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.45.2