|
|
|
|
@ -240,11 +240,13 @@ AbstractTexture::~AbstractTexture() {
|
|
|
|
|
if(binding.second == _id) binding = {}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
|
/* Remove all image bindings */ |
|
|
|
|
for(auto& binding: Context::current().state().texture->imageBindings) { |
|
|
|
|
/* MSVC 2015 needs the parentheses around */ |
|
|
|
|
if(std::get<0>(binding) == _id) binding = {}; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
glDeleteTextures(1, &_id); |
|
|
|
|
} |
|
|
|
|
|