From 7f390367f186db5fbe14c48c05976939cc3150de Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 2 Sep 2011 19:26:49 +0200 Subject: [PATCH] OpenGL.hpp now includes windows.h only with VC++ --- include/SFML/OpenGL.hpp | 6 +++++- src/SFML/Window/Win32/WglContext.hpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/SFML/OpenGL.hpp b/include/SFML/OpenGL.hpp index f325dced..20c8c957 100644 --- a/include/SFML/OpenGL.hpp +++ b/include/SFML/OpenGL.hpp @@ -38,7 +38,11 @@ //////////////////////////////////////////////////////////// #if defined(SFML_SYSTEM_WINDOWS) - #include + // The Visual C++ version of gl.h uses WINGDIAPI and APIENTRY but doesn't define them + #ifdef _MSC_VER + #include + #endif + #include #include diff --git a/src/SFML/Window/Win32/WglContext.hpp b/src/SFML/Window/Win32/WglContext.hpp index 7b315e36..7d7781f2 100644 --- a/src/SFML/Window/Win32/WglContext.hpp +++ b/src/SFML/Window/Win32/WglContext.hpp @@ -30,6 +30,7 @@ //////////////////////////////////////////////////////////// #include #include +#include namespace sf