From 70f7694d5a4207974d508b00a14f8da330dde28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 15 Mar 2016 09:52:39 +0100 Subject: [PATCH] Fix building on GLES2/WebGL. --- src/Magnum/AbstractTexture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Magnum/AbstractTexture.cpp b/src/Magnum/AbstractTexture.cpp index c31a5e160..815c029ef 100644 --- a/src/Magnum/AbstractTexture.cpp +++ b/src/Magnum/AbstractTexture.cpp @@ -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); }