From c22d440e69c546df62a93d830395286827b9e7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 7 Mar 2017 10:09:53 +0100 Subject: [PATCH] Don't define Texture3D on WebGL 1.0. There's no matching extension (no OES_texture3D equivalent), moreover constructing Texture3D doesn't even link (missing definitions). --- src/Magnum/Magnum.h | 2 ++ src/Magnum/Texture.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index c865c576b..3d5f76771 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -639,7 +639,9 @@ template class Texture; typedef Texture<1> Texture1D; #endif typedef Texture<2> Texture2D; +#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) typedef Texture<3> Texture3D; +#endif #ifndef MAGNUM_TARGET_GLES2 template class TextureArray; diff --git a/src/Magnum/Texture.h b/src/Magnum/Texture.h index 60fceade3..0f6d6ce01 100644 --- a/src/Magnum/Texture.h +++ b/src/Magnum/Texture.h @@ -1279,6 +1279,7 @@ typedef Texture<1> Texture1D; /** @brief Two-dimensional texture */ typedef Texture<2> Texture2D; +#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) /** @brief Three-dimensional texture @@ -1286,6 +1287,7 @@ typedef Texture<2> Texture2D; @requires_webgl20 3D textures are not available in WebGL 1.0. */ typedef Texture<3> Texture3D; +#endif }