X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fbufferable.h;fp=source%2Fbufferable.h;h=cbbde4e1b93f1e07266c097c150774f2b5621d3c;hb=5bc9c7214feaf4ea4797fc0d4a906e5e59b75839;hp=8e656246f32dab7bebc307fac698e8c66fa57f88;hpb=26502dca8d631c7c4b1fcc6dbe334da941f4ab54;p=libs%2Fgl.git diff --git a/source/bufferable.h b/source/bufferable.h index 8e656246..cbbde4e1 100644 --- a/source/bufferable.h +++ b/source/bufferable.h @@ -55,6 +55,8 @@ public: /** Uploads new data into the buffer if necessary. */ void refresh() const { if(buffer && dirty) upload_data(0); } + /** Returns an object which can be used to upload data to the buffer using + mapped memory. */ AsyncUpdater *refresh_async() const; private: @@ -88,7 +90,7 @@ protected: private: /** Uploads data to the buffer. Receives pointer to mapped buffer memory as - parameter. If null, buffer interface should be used instead. */ + parameter, or null to use the buffer upload interface. */ void upload_data(char *) const; };