@@ -14,6 +14,11 @@
#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
# include <objc/message.h>
+#elif BX_PLATFORM_WINDOWS
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif // WIN32_LEAN_AND_MEAN
+# include <windows.h>
#endif // BX_PLATFORM_OSX
BX_ERROR_RESULT(BGFX_ERROR_TEXTURE_VALIDATION, BX_MAKEFOURCC('b', 'g', 0, 1) );
@@ -226,8 +226,6 @@ namespace stl = std;
#if BX_PLATFORM_ANDROID
# include <android/native_window.h>
-#elif BX_PLATFORM_WINDOWS
-# include <windows.h>
#endif // BX_PLATFORM_*
#define BGFX_MAX_COMPUTE_BINDINGS BGFX_CONFIG_MAX_TEXTURE_SAMPLERS
@@ -7,6 +7,10 @@
#if BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX
# if BX_PLATFORM_WINDOWS
# include <psapi.h>
# endif // BX_PLATFORM_WINDOWS
# include <renderdoc/renderdoc_app.h>
@@ -87,6 +87,12 @@
# undef GL_VERSION_1_4
# undef GL_VERSION_1_5
# undef GL_VERSION_2_0
+# elif BX_PLATFORM_WINDOWS
+# include <GL/gl.h>
# else
# include <GL/gl.h>
# 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
-#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"