mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-18 05:33:52 +01:00
Define extpointer for SDL + OGLES2
This commit is contained in:
parent
8f44270e4a
commit
88ca26c418
@ -184,6 +184,7 @@ endif()
|
|||||||
|
|
||||||
if(ENABLE_OPENGL)
|
if(ENABLE_OPENGL)
|
||||||
add_definitions(-D_IRR_COMPILE_WITH_OPENGL_)
|
add_definitions(-D_IRR_COMPILE_WITH_OPENGL_)
|
||||||
|
set(OPENGL_DIRECT_LINK TRUE) # not yet possible to remove this
|
||||||
if(DEVICE STREQUAL "WINDOWS")
|
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_ -D_IRR_OPENGL_USE_EXTPOINTER_)
|
||||||
elseif(DEVICE STREQUAL "X11")
|
elseif(DEVICE STREQUAL "X11")
|
||||||
@ -199,6 +200,7 @@ if(ENABLE_OPENGL3)
|
|||||||
if (NOT USE_SDL2)
|
if (NOT USE_SDL2)
|
||||||
message(FATAL_ERROR "OpenGL 3 driver requires SDL2")
|
message(FATAL_ERROR "OpenGL 3 driver requires SDL2")
|
||||||
endif()
|
endif()
|
||||||
|
set(OPENGL_DIRECT_LINK TRUE) # TODO
|
||||||
set(USE_SDLGL ON)
|
set(USE_SDLGL ON)
|
||||||
set(USE_SDLGL3 ON)
|
set(USE_SDLGL3 ON)
|
||||||
endif()
|
endif()
|
||||||
@ -208,6 +210,7 @@ if(ENABLE_GLES1)
|
|||||||
message(FATAL_ERROR "OpenGL ES 1 is not supported with SDL2")
|
message(FATAL_ERROR "OpenGL ES 1 is not supported with SDL2")
|
||||||
endif()
|
endif()
|
||||||
add_definitions(-D_IRR_COMPILE_WITH_OGLES1_)
|
add_definitions(-D_IRR_COMPILE_WITH_OGLES1_)
|
||||||
|
set(OPENGLES_DIRECT_LINK TRUE)
|
||||||
if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$")
|
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_ -D_IRR_OGLES1_USE_EXTPOINTER_)
|
||||||
endif()
|
endif()
|
||||||
@ -215,9 +218,11 @@ endif()
|
|||||||
|
|
||||||
if(ENABLE_GLES2)
|
if(ENABLE_GLES2)
|
||||||
add_definitions(-D_IRR_COMPILE_WITH_OGLES2_)
|
add_definitions(-D_IRR_COMPILE_WITH_OGLES2_)
|
||||||
|
set(OPENGLES2_DIRECT_LINK TRUE) # not yet possible to remove this
|
||||||
if(DEVICE MATCHES "^(WINDOWS|X11|ANDROID)$" OR EMSCRIPTEN)
|
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_ -D_IRR_OGLES2_USE_EXTPOINTER_)
|
||||||
elseif(DEVICE STREQUAL "SDL")
|
elseif(DEVICE STREQUAL "SDL")
|
||||||
|
add_definitions(-D_IRR_OGLES2_USE_EXTPOINTER_)
|
||||||
set(USE_SDLGL ON)
|
set(USE_SDLGL ON)
|
||||||
set(USE_SDLGLES2 ON)
|
set(USE_SDLGLES2 ON)
|
||||||
endif()
|
endif()
|
||||||
@ -315,9 +320,9 @@ set(link_libs
|
|||||||
"${PNG_LIBRARY}"
|
"${PNG_LIBRARY}"
|
||||||
"$<$<BOOL:${USE_SDL2}>:${SDL2_LIBRARIES}>"
|
"$<$<BOOL:${USE_SDL2}>:${SDL2_LIBRARIES}>"
|
||||||
|
|
||||||
${OPENGL_LIBRARIES}
|
"$<$<BOOL:${OPENGL_DIRECT_LINK}>:${OPENGL_LIBRARIES}>"
|
||||||
${OPENGLES_LIBRARY}
|
"$<$<BOOL:${OPENGLES_DIRECT_LINK}>:${OPENGLES_LIBRARIES}>"
|
||||||
${OPENGLES2_LIBRARIES}
|
"$<$<BOOL:${OPENGLES2_DIRECT_LINK}>:${OPENGLES2_LIBRARIES}>"
|
||||||
${EGL_LIBRARY}
|
${EGL_LIBRARY}
|
||||||
|
|
||||||
"$<$<PLATFORM_ID:Android>:-landroid -llog>"
|
"$<$<PLATFORM_ID:Android>:-landroid -llog>"
|
||||||
|
Loading…
Reference in New Issue
Block a user