Skip to content

Commit

Permalink
Move GLU and windows.h include to gl_driver.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-1000 committed Jun 3, 2024
1 parent 6be2137 commit 062c367
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
9 changes: 0 additions & 9 deletions source/game/compat/gl.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
#pragma once
#include "glad/gl.h"
#ifdef _WIN32
// defines APIENTRY, GL/gl.h includes it but Glad doesn't
# include <windows.h>
#endif
#if defined(__APPLE__) && defined(__MACH__)
# include <OpenGL/glu.h>
#else
# include <GL/glu.h>
#endif
#include "GLFW/glfw3.h"
15 changes: 13 additions & 2 deletions source/game/render/gl_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,20 @@
#include "main/references.h"
#include "main/tick.h"
#include "main/logging.h"
#include "matrix.h"
#include "frustum.h"
#include <algorithm>

#ifdef _WIN32
# define NOMINMAX
# define WIN32_LEAN_AND_MEAN
// defines APIENTRY, GL/gl.h includes it but Glad doesn't
# include <windows.h>
#endif
#if defined(__APPLE__) && defined(__MACH__)
# include <OpenGL/glu.h>
#else
# include <GL/glu.h>
#endif

extern char lockText[1024];

bool glDirectStateAccess = false;
Expand Down

0 comments on commit 062c367

Please sign in to comment.