void RenderDevice::cacheRemoveAll() { IMAGE_CACHE_CONTAINER_ITER it = cache.begin(); while (it != cache.end()) { cacheRemove(it->second); it = cache.begin(); } }
void SDLHardwareRenderDevice::freeImage(Image *image) { if (!image) return; cacheRemove(image); if (static_cast<SDLHardwareImage *>(image)->surface) { SDL_DestroyTexture(static_cast<SDLHardwareImage *>(image)->surface); } }
void RenderEngine::destroyImage(Image* image) { if (image) { if (image->filename != "") cacheRemove(image->filename); else if (image->texture != NULL) { SDL_DestroyTexture(image->texture); image->texture = NULL; } } }
void RenderDevice::freeImage(Image *image) { if (!image) return; cacheRemove(image); }