Fix GLU header inclusion being disabled

This fixes a regression introduced by
105cf32e0b where GLFW_INCLUDE_GLU had no
effect if the GLFW header detected an earlier OpenGL header or loader
library header.

Closes #1712.
This commit is contained in:
Tatsuya Yatagawa 2020-06-05 12:57:43 +09:00 committed by Camilla Löwy
parent c1f60ab5dc
commit 81f475bccb

View File

@ -193,6 +193,22 @@ extern "C" {
#endif /*__APPLE__*/ #endif /*__APPLE__*/
#elif defined(GLFW_INCLUDE_GLU)
#if defined(__APPLE__)
#if defined(GLFW_INCLUDE_GLU)
#include <OpenGL/glu.h>
#endif
#else /*__APPLE__*/
#if defined(GLFW_INCLUDE_GLU)
#include <GL/glu.h>
#endif
#endif /*__APPLE__*/
#elif !defined(GLFW_INCLUDE_NONE) && \ #elif !defined(GLFW_INCLUDE_NONE) && \
!defined(__gl_h_) && \ !defined(__gl_h_) && \
!defined(__gles1_gl_h_) && \ !defined(__gles1_gl_h_) && \
@ -216,9 +232,6 @@ extern "C" {
#define GL_GLEXT_LEGACY #define GL_GLEXT_LEGACY
#endif #endif
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#if defined(GLFW_INCLUDE_GLU)
#include <OpenGL/glu.h>
#endif
#else /*__APPLE__*/ #else /*__APPLE__*/
@ -226,9 +239,6 @@ extern "C" {
#if defined(GLFW_INCLUDE_GLEXT) #if defined(GLFW_INCLUDE_GLEXT)
#include <GL/glext.h> #include <GL/glext.h>
#endif #endif
#if defined(GLFW_INCLUDE_GLU)
#include <GL/glu.h>
#endif
#endif /*__APPLE__*/ #endif /*__APPLE__*/