X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fbufferable.h;h=d49f0149ca4cb79bd659d8abeccdf7ce579cdf13;hb=11a5d4f2a35dfdcf61e16d4fcfba22e20ea6a3db;hp=25d29fd8f393021c6d6af4f86e624d77ec79705b;hpb=5003bcfeb0832ec2d0f74f4149bc97888a70a900;p=libs%2Fgl.git diff --git a/source/core/bufferable.h b/source/core/bufferable.h index 25d29fd8..d49f0149 100644 --- a/source/core/bufferable.h +++ b/source/core/bufferable.h @@ -2,12 +2,11 @@ #define MSP_GL_BUFFERABLE_H_ #include +#include "buffer.h" namespace Msp { namespace GL { -class Buffer; - /** Base class for things that can store data in buffers. Multiple Bufferables may be put in the same buffer. @@ -26,11 +25,10 @@ public: { private: const Bufferable &bufferable; - char *mapped_address; + Buffer::AsyncTransfer transfer; public: AsyncUpdater(const Bufferable &); - ~AsyncUpdater(); void upload_data(); }; @@ -63,7 +61,7 @@ public: std::size_t get_required_buffer_size(bool = false) const; /** Uploads new data into the buffer if necessary. */ - void refresh(unsigned f) const { if(dirty&(1<