diff --git a/src/bgfx.cpp b/src/bgfx.cpp index a2d52b6b8..1cd156603 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -14,6 +14,11 @@ #if BX_PLATFORM_OSX || BX_PLATFORM_IOS # include +#elif BX_PLATFORM_WINDOWS +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN +# include #endif // BX_PLATFORM_OSX BX_ERROR_RESULT(BGFX_ERROR_TEXTURE_VALIDATION, BX_MAKEFOURCC('b', 'g', 0, 1) ); diff --git a/src/bgfx_p.h b/src/bgfx_p.h index ff656408c..c1f70ec82 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -226,8 +226,6 @@ namespace stl = std; #if BX_PLATFORM_ANDROID # include -#elif BX_PLATFORM_WINDOWS -# include #endif // BX_PLATFORM_* #define BGFX_MAX_COMPUTE_BINDINGS BGFX_CONFIG_MAX_TEXTURE_SAMPLERS diff --git a/src/debug_renderdoc.cpp b/src/debug_renderdoc.cpp index 053df0443..52343e9f2 100644 --- a/src/debug_renderdoc.cpp +++ b/src/debug_renderdoc.cpp @@ -7,6 +7,10 @@ #if BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX # if BX_PLATFORM_WINDOWS +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN +# include # include # endif // BX_PLATFORM_WINDOWS # include diff --git a/src/renderer_gl.h b/src/renderer_gl.h index d52efc768..83b271201 100644 --- a/src/renderer_gl.h +++ b/src/renderer_gl.h @@ -87,6 +87,12 @@ # undef GL_VERSION_1_4 # undef GL_VERSION_1_5 # undef GL_VERSION_2_0 +# elif BX_PLATFORM_WINDOWS +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif // WIN32_LEAN_AND_MEAN +# include +# include # else # include # endif // BX_PLATFORM_ @@ -1084,9 +1090,7 @@ typedef uint64_t GLuint64; # define GL_TEXTURE_LOD_BIAS 0x8501 #endif // GL_TEXTURE_LOD_BIAS -#if BX_PLATFORM_WINDOWS -# include -#elif BX_PLATFORM_LINUX || BX_PLATFORM_BSD +#if BX_PLATFORM_LINUX || BX_PLATFORM_BSD # include "glcontext_glx.h" #elif BX_PLATFORM_OSX # include "glcontext_nsgl.h"