From cb7ca00fe120a5ff4b7beb27b0b5c62b5f310aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Fri, 23 Jun 2023 21:14:06 -0700 Subject: [PATCH] GL: Include glcontext_* based on defines. --- src/renderer_gl.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/renderer_gl.h b/src/renderer_gl.h index 784d57899..245698d02 100644 --- a/src/renderer_gl.h +++ b/src/renderer_gl.h @@ -150,14 +150,6 @@ typedef uint64_t GLuint64; # include # endif // BGFX_CONFIG_RENDERER_ -# if BGFX_USE_EGL -# include "glcontext_egl.h" -# endif // BGFX_USE_EGL - -# if BGFX_USE_HTML5 -# include "glcontext_html5.h" -# endif // BGFX_USE_EGL - #endif // BGFX_CONFIG_RENDERER_OPENGL #include "renderer.h" @@ -1168,18 +1160,20 @@ typedef uint64_t GLuint64; # define GL_TEXTURE_LOD_BIAS 0x8501 #endif // GL_TEXTURE_LOD_BIAS -#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD +#if BGFX_USE_EGL +# include "glcontext_egl.h" +#elif BGFX_USE_HTML5 +# include "glcontext_html5.h" +#elif BGFX_USE_GLX # include "glcontext_glx.h" +#elif BGFX_USE_WGL +# include "glcontext_wgl.h" #elif BX_PLATFORM_OSX # include "glcontext_nsgl.h" #elif BX_PLATFORM_IOS # include "glcontext_eagl.h" #endif // BX_PLATFORM_ -#if BGFX_USE_WGL -# include "glcontext_wgl.h" -#endif // BGFX_USE_WGL - #ifndef GL_APIENTRY # define GL_APIENTRY APIENTRY #endif // GL_APIENTRY