allocated(0)
{ }
+Texture2D::~Texture2D()
+{
+ set_manager(0);
+}
+
void Texture2D::storage(PixelFormat fmt, unsigned wd, unsigned ht)
{
if(width>0)
if(allocated&(1<<level))
return;
- image(level, get_base_pixelformat(ifmt), UNSIGNED_BYTE, 0);
+ PixelFormat base_fmt = get_base_pixelformat(ifmt);
+ image(level, base_fmt, get_alloc_type(base_fmt), 0);
}
void Texture2D::image(unsigned level, PixelFormat fmt, DataType type, const void *data)