Пример #1
0
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);
	}
}
Пример #3
0
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;
        }
    }
}
Пример #4
0
void RenderDevice::freeImage(Image *image) {
	if (!image) return;

	cacheRemove(image);
}