From 7b13960939d2aacad1074acd906063f72f0893c3 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 21 Jan 2024 15:57:33 +0100 Subject: [PATCH] Define USE_EXTPOINTER on all platforms --- source/Irrlicht/CMakeLists.txt | 17 +++++++---------- source/Irrlicht/COpenGLCommon.h | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index f90728bc6..d8ebb249e 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -183,16 +183,14 @@ else() endif() if(ENABLE_OPENGL) - add_definitions(-D_IRR_COMPILE_WITH_OPENGL_) + add_definitions(-D_IRR_COMPILE_WITH_OPENGL_ -D_IRR_OPENGL_USE_EXTPOINTER_) set(OPENGL_DIRECT_LINK TRUE) # not yet possible to remove this if(DEVICE STREQUAL "WINDOWS") - add_definitions(-D_IRR_COMPILE_WITH_WGL_MANAGER_ -D_IRR_OPENGL_USE_EXTPOINTER_) + add_definitions(-D_IRR_COMPILE_WITH_WGL_MANAGER_) elseif(DEVICE STREQUAL "X11") - add_definitions(-D_IRR_COMPILE_WITH_GLX_MANAGER_ -D_IRR_OPENGL_USE_EXTPOINTER_) + add_definitions(-D_IRR_COMPILE_WITH_GLX_MANAGER_) elseif(DEVICE STREQUAL "OSX") add_definitions(-D_IRR_COMPILE_WITH_NSOGL_MANAGER_) - elseif(DEVICE STREQUAL "SDL") - add_definitions(-D_IRR_OPENGL_USE_EXTPOINTER_) endif() endif() @@ -209,20 +207,19 @@ if(ENABLE_GLES1) if (USE_SDL2) message(FATAL_ERROR "OpenGL ES 1 is not supported with SDL2") endif() - add_definitions(-D_IRR_COMPILE_WITH_OGLES1_) + add_definitions(-D_IRR_COMPILE_WITH_OGLES1_ -D_IRR_OGLES1_USE_EXTPOINTER_) set(OPENGLES_DIRECT_LINK TRUE) if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$") - add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_ -D_IRR_OGLES1_USE_EXTPOINTER_) + add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_) endif() endif() if(ENABLE_GLES2) - add_definitions(-D_IRR_COMPILE_WITH_OGLES2_) + add_definitions(-D_IRR_COMPILE_WITH_OGLES2_ -D_IRR_OGLES2_USE_EXTPOINTER_) set(OPENGLES2_DIRECT_LINK TRUE) # not yet possible to remove this if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$" OR EMSCRIPTEN) - add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_ -D_IRR_OGLES2_USE_EXTPOINTER_) + add_definitions(-D_IRR_COMPILE_WITH_EGL_MANAGER_) elseif(DEVICE STREQUAL "SDL") - add_definitions(-D_IRR_OGLES2_USE_EXTPOINTER_) set(USE_SDLGL ON) set(USE_SDLGLES2 ON) endif() diff --git a/source/Irrlicht/COpenGLCommon.h b/source/Irrlicht/COpenGLCommon.h index 5eb12954e..e80f47417 100644 --- a/source/Irrlicht/COpenGLCommon.h +++ b/source/Irrlicht/COpenGLCommon.h @@ -23,7 +23,7 @@ #endif #include #if defined(_IRR_OPENGL_USE_EXTPOINTER_) - #error glext.h missing on OSX + #include #endif #elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)