mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-26 21:35:28 +01:00
Non-SDL: Add opengl3 support
This commit is contained in:
@@ -123,10 +123,10 @@ if(USE_SDL2)
|
||||
if(NOT ANDROID)
|
||||
set(DEFAULT_OPENGL3 TRUE)
|
||||
endif()
|
||||
option(ENABLE_OPENGL3 "Enable OpenGL 3+" ${DEFAULT_OPENGL3})
|
||||
else()
|
||||
set(ENABLE_OPENGL3 FALSE)
|
||||
set(DEFAULT_OPENGL3 FALSE)
|
||||
endif()
|
||||
option(ENABLE_OPENGL3 "Enable OpenGL 3+" ${DEFAULT_OPENGL3})
|
||||
|
||||
if(ANDROID OR EMSCRIPTEN)
|
||||
set(ENABLE_OPENGL FALSE)
|
||||
@@ -152,9 +152,11 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENGL)
|
||||
add_definitions(-D_IRR_COMPILE_WITH_OPENGL_)
|
||||
set(OPENGL_DIRECT_LINK TRUE) # driver relies on this
|
||||
if(ENABLE_OPENGL OR (ENABLE_OPENGL3 AND NOT USE_SDL2))
|
||||
if(ENABLE_OPENGL)
|
||||
add_definitions(-D_IRR_COMPILE_WITH_OPENGL_)
|
||||
set(OPENGL_DIRECT_LINK TRUE) # driver relies on this
|
||||
endif()
|
||||
if(DEVICE STREQUAL "WINDOWS")
|
||||
add_definitions(-D_IRR_COMPILE_WITH_WGL_MANAGER_)
|
||||
elseif(DEVICE STREQUAL "X11")
|
||||
@@ -165,7 +167,11 @@ if(ENABLE_OPENGL)
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENGL3)
|
||||
if (NOT USE_SDL2)
|
||||
if(DEVICE STREQUAL "WINDOWS")
|
||||
# supported
|
||||
elseif(DEVICE STREQUAL "X11")
|
||||
# supported
|
||||
elseif (NOT USE_SDL2)
|
||||
message(FATAL_ERROR "OpenGL 3 driver requires SDL2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user