Fix OpenGL header compatibility for macOS builds
@@ -17,11 +17,11 @@
#include "ground/plant_gpu.h"
#include "ground/stone_gpu.h"
#include "mesh.h"
+#include "opengl_headers.h"
#include "render_constants.h"
#include "shader.h"
#include "state_scopes.h"
#include "texture.h"
-#include <GL/gl.h>
#include <QDebug>
#include <cmath>
#include <cstddef>
@@ -4,7 +4,7 @@
#include "../primitives.h"
#include "../render_constants.h"
#include "gl/shader_cache.h"
+#include "../opengl_headers.h"
#include <algorithm>
#include <qopenglext.h>
@@ -2,7 +2,7 @@
#include "../backend.h"
#include "../shader_cache.h"
#include <QOpenGLExtraFunctions>
@@ -1,7 +1,7 @@
#include "vegetation_pipeline.h"
@@ -1,5 +1,5 @@
#include "buffer.h"
#include <vector>
#include "gl/buffer.h"
#include <QOpenGLFunctions_3_3_Core>
#include <memory>
@@ -0,0 +1,10 @@
+#pragma once
+
+// Platform-specific OpenGL header inclusion
+#ifdef __APPLE__
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+#else
+ #include <GL/gl.h>
+ #include <GL/glu.h>
+#endif
#include "gl/mesh.h"
#include "gl/texture.h"
#include <QVector3D>
#include "utils/resource_utils.h"
#include <QByteArray>
#include <QFile>
#include <QImage>
#include <qglobal.h>