X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fbufferable.h;h=29acafe0f346c3e914bfe76d7ca4134e0c7822f6;hp=25d29fd8f393021c6d6af4f86e624d77ec79705b;hb=HEAD;hpb=5003bcfeb0832ec2d0f74f4149bc97888a70a900 diff --git a/source/core/bufferable.h b/source/core/bufferable.h index 25d29fd8..29acafe0 100644 --- a/source/core/bufferable.h +++ b/source/core/bufferable.h @@ -1,13 +1,13 @@ #ifndef MSP_GL_BUFFERABLE_H_ #define MSP_GL_BUFFERABLE_H_ +#include #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 +26,10 @@ public: { private: const Bufferable &bufferable; - char *mapped_address; + Buffer::AsyncTransfer transfer; public: AsyncUpdater(const Bufferable &); - ~AsyncUpdater(); void upload_data(); }; @@ -63,7 +62,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<