Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Define USE_EXTPOINTER on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jan 21, 2024
1 parent 5b81694 commit 7b13960
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions source/Irrlicht/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion source/Irrlicht/COpenGLCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#endif
#include <OpenGL/gl.h>
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#error glext.h missing on OSX
#include <OpenGL/glext.h>
#endif
#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && !defined(_IRR_COMPILE_WITH_X11_DEVICE_)
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
Expand Down

0 comments on commit 7b13960

Please sign in to comment.