| 43 | namespace ospray { |
| 44 | |
| 45 | Texture2D::~Texture2D() |
| 46 | { |
| 47 | // If no one else is referencing the MIP map buffer (just this object and the |
| 48 | // cache map), we need to remove it from the MIP map cache so the buffer will |
| 49 | // be deleted as well |
| 50 | if (mipMapData && mipMapData.use_count() == 2) |
| 51 | getISPCDevice().getMipMapCache().remove(texData->data()); |
| 52 | } |
| 53 | |
| 54 | std::string Texture2D::toString() const |
| 55 | { |