@ -235,8 +235,7 @@ AbstractTexture::~AbstractTexture() {
if(!_id || !(_flags & ObjectFlag::DeleteOnDestruction)) return;
/* Remove all bindings */
for(auto& binding: Context::current().state().texture->bindings)
{
for(auto& binding: Context::current().state().texture->bindings) {
/* MSVC 2015 needs the parentheses around */
if(binding.second == _id) binding = {};
}
@ -142,6 +142,7 @@ struct TextureState {
Containers::Array<std::pair<GLenum, GLuint>> bindings;
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
/* Texture object ID, level, layered, layer, access */
Containers::Array<std::tuple<GLuint, GLint, GLboolean, GLint, GLenum>> imageBindings;
#endif
};