From bdbab22de6556e904343d5d4bb21c20595f57b0b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 May 2019 21:42:15 +0300 Subject: Fix compilation warnings with new mesa and SDL 1.2 Add workaround to fix SDL redefine bug. --- src/render/opengl/mgltypes.h | 6 ++++++ src/render/vertexes/openglgraphicsvertexes.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src/render') diff --git a/src/render/opengl/mgltypes.h b/src/render/opengl/mgltypes.h index 9cc2644ca..874e4c9ff 100644 --- a/src/render/opengl/mgltypes.h +++ b/src/render/opengl/mgltypes.h @@ -32,10 +32,16 @@ #ifndef USE_SDL2 #define GL_GLEXT_PROTOTYPES 1 #endif // USE_SDL2 +#ifdef HAVE_GLEXT +#define NO_SDL_GLEXT +#endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") #include PRAGMA48(GCC diagnostic pop) +#ifdef HAVE_GLEXT +#include +#endif // HAVE_GLEXT #ifdef __native_client__ #include #else // __native_client__ diff --git a/src/render/vertexes/openglgraphicsvertexes.h b/src/render/vertexes/openglgraphicsvertexes.h index 88661d3a8..3bc7f7f52 100644 --- a/src/render/vertexes/openglgraphicsvertexes.h +++ b/src/render/vertexes/openglgraphicsvertexes.h @@ -33,6 +33,7 @@ #endif // USE_SDL2 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") +#define GL_GLEXT_LEGACY #include PRAGMA48(GCC diagnostic pop) #endif // ANDROID -- cgit v1.2.3-70-g09d2