From 062c3679b7c2fa4147acfd81ecd7a03fd88c0e9a Mon Sep 17 00:00:00 2001 From: kb1000 Date: Mon, 3 Jun 2024 23:14:03 +0200 Subject: [PATCH] Move GLU and windows.h include to gl_driver.cpp --- source/game/compat/gl.h | 9 --------- source/game/render/gl_driver.cpp | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/source/game/compat/gl.h b/source/game/compat/gl.h index cc3f059f..b05015e1 100644 --- a/source/game/compat/gl.h +++ b/source/game/compat/gl.h @@ -1,12 +1,3 @@ #pragma once #include "glad/gl.h" -#ifdef _WIN32 -// defines APIENTRY, GL/gl.h includes it but Glad doesn't -# include -#endif -#if defined(__APPLE__) && defined(__MACH__) -# include -#else -# include -#endif #include "GLFW/glfw3.h" diff --git a/source/game/render/gl_driver.cpp b/source/game/render/gl_driver.cpp index 07f50db1..fd005370 100644 --- a/source/game/render/gl_driver.cpp +++ b/source/game/render/gl_driver.cpp @@ -14,9 +14,20 @@ #include "main/references.h" #include "main/tick.h" #include "main/logging.h" -#include "matrix.h" #include "frustum.h" -#include + +#ifdef _WIN32 +# define NOMINMAX +# define WIN32_LEAN_AND_MEAN +// defines APIENTRY, GL/gl.h includes it but Glad doesn't +# include +#endif +#if defined(__APPLE__) && defined(__MACH__) +# include +#else +# include +#endif + extern char lockText[1024]; bool glDirectStateAccess = false;