From 2148d2c23514189391f66288eb67f8ab7a3fd4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 8 May 2017 16:17:56 +0200 Subject: [PATCH] Properly include a header to avoid crashes on MSVC GLES build. Did I mention that this is a serious fucking compiler misfeature/bug? --- src/Magnum/Implementation/TextureState.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Implementation/TextureState.h b/src/Magnum/Implementation/TextureState.h index c50836599..b1ba8ceea 100644 --- a/src/Magnum/Implementation/TextureState.h +++ b/src/Magnum/Implementation/TextureState.h @@ -32,13 +32,17 @@ #include "Magnum/Magnum.h" #include "Magnum/OpenGL.h" -#if defined(_MSC_VER) && !defined(MAGNUM_TARGET_GLES2) +#ifdef _MSC_VER +#include "Magnum/AbstractTexture.h" + +#ifndef MAGNUM_TARGET_GLES2 /* Otherwise the member function pointers will have different size based on whether the header was included or not. CAUSES SERIOUS MEMORY CORRUPTION AND IS NOT CAUGHT BY ANY WARNING WHATSOEVER! AARGH! */ #include "Magnum/BufferTexture.h" #include "Magnum/CubeMapTexture.h" #endif +#endif namespace Magnum { namespace Implementation {