If the resource is destroyed while being loaded asynchronously, loading
has to be stopped before the derived class is destroyed. The Resource
destructor is too late for that.
Mesh::~Mesh()
{
+ set_manager(0);
delete vbuf;
delete ibuf;
if(vao_id)
allocated(0)
{ }
+Texture2D::~Texture2D()
+{
+ set_manager(0);
+}
+
void Texture2D::storage(PixelFormat fmt, unsigned wd, unsigned ht)
{
if(width>0)
public:
Texture2D(ResourceManager * = 0);
+ virtual ~Texture2D();
/** Defines storage structure for the texture. Must be called before an
image can be uploaded. Once storage is defined, it can't be changed. */