From 81f475bccbc0e784e8327005f2e66e3546fe8da0 Mon Sep 17 00:00:00 2001 From: Tatsuya Yatagawa Date: Fri, 5 Jun 2020 12:57:43 +0900 Subject: [PATCH] Fix GLU header inclusion being disabled This fixes a regression introduced by 105cf32e0b05e207d4cd5efa462887569ca2116a where GLFW_INCLUDE_GLU had no effect if the GLFW header detected an earlier OpenGL header or loader library header. Closes #1712. --- include/GLFW/glfw3.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 6db5b579..ac9d3d68 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -193,6 +193,22 @@ extern "C" { #endif /*__APPLE__*/ +#elif defined(GLFW_INCLUDE_GLU) + + #if defined(__APPLE__) + + #if defined(GLFW_INCLUDE_GLU) + #include + #endif + + #else /*__APPLE__*/ + + #if defined(GLFW_INCLUDE_GLU) + #include + #endif + + #endif /*__APPLE__*/ + #elif !defined(GLFW_INCLUDE_NONE) && \ !defined(__gl_h_) && \ !defined(__gles1_gl_h_) && \ @@ -216,9 +232,6 @@ extern "C" { #define GL_GLEXT_LEGACY #endif #include - #if defined(GLFW_INCLUDE_GLU) - #include - #endif #else /*__APPLE__*/ @@ -226,9 +239,6 @@ extern "C" { #if defined(GLFW_INCLUDE_GLEXT) #include #endif - #if defined(GLFW_INCLUDE_GLU) - #include - #endif #endif /*__APPLE__*/