public:
AsyncLoader(Texture2D &, IO::Seekable &);
+ ~AsyncLoader();
virtual bool needs_sync() const;
virtual bool process();
phase(0)
{ }
+Texture2D::AsyncLoader::~AsyncLoader()
+{
+ if(mapped_address)
+ pixel_buffer.unmap();
+}
+
bool Texture2D::AsyncLoader::needs_sync() const
{
return phase%2;
else if(phase==3)
{
Bind _bind_buf(pixel_buffer, PIXEL_UNPACK_BUFFER);
+ mapped_address = 0;
if(!pixel_buffer.unmap())
{
phase = 1;