From 48b6b7559bd15d502eb25b9d0c3714c4439284fc Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Thu, 15 Aug 2024 22:44:19 -0500 Subject: [PATCH] Add in potential Mac OS adjustments to make the PGE run with OpenGL3.3 flag. --- Adventures in Lestoria/olcPixelGameEngine.h | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Adventures in Lestoria/olcPixelGameEngine.h b/Adventures in Lestoria/olcPixelGameEngine.h index 2de79859..3cd0121d 100644 --- a/Adventures in Lestoria/olcPixelGameEngine.h +++ b/Adventures in Lestoria/olcPixelGameEngine.h @@ -1466,10 +1466,14 @@ namespace X11 { #if defined(__APPLE__) #define GL_SILENCE_DEPRECATION +#define CALLSTYLE +#define OGL_LOAD(t, n) n; +#define GL_GLEXT_PROTOTYPES #include -#include +#include +#include #include -#define CALLSTYLE +#include #endif #if defined(OLC_PLATFORM_EMSCRIPTEN) @@ -1529,10 +1533,18 @@ namespace olc #if defined(OLC_PLATFORM_EMSCRIPTEN) typedef void CALLSTYLE locShaderSource_t(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); typedef EGLBoolean(locSwapInterval_t)(EGLDisplay display, EGLint interval); -#else - #ifndef OLC_GFX_HEADLESS - typedef void CALLSTYLE locShaderSource_t(GLuint shader, GLsizei count, const GLchar** string, const GLint* length); - #endif +#endif + +#if defined(__APPLE__) + typedef int EGLBoolean; + typedef int32_t EGLint; + typedef void *EGLDisplay; + typedef void *EGLConfig; + typedef void *EGLSurface; + typedef void *EGLContext; + + typedef EGLBoolean(locSwapInterval_t)(EGLDisplay display, GLint interval); + typedef void CALLSTYLE locShaderSource_t(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); #endif } // olc namespace