mirror of https://github.com/axmolengine/axmol.git
Rename option `AX_USE_COMPAT_GL` to `AX_USE_ANGLE`
This commit is contained in:
parent
0e74de43d6
commit
7cb9aac41e
|
@ -10,9 +10,10 @@
|
|||
- AX_USE_ALSOFT: whether use openal-soft for all platforms
|
||||
- Apple platform: Use openal-soft instead system deprecated: `OpenAL.framework`
|
||||
- Other platforms: Always use openal-soft even this option not enabled
|
||||
- AX_USE_COMPAT_GL: whether use compat gl as renderer backend, default: `FALSE`
|
||||
- AX_USE_ANGLE: whether use compat gl as renderer backend, default: `FALSE`
|
||||
- windows: whether use angleproject as GLES2 backend
|
||||
- apple: whether use GLES instead Metal backend
|
||||
- AX_USE_COMPAT_GL: deprecated, use AX_USE_ANGLE instead
|
||||
- AX_USE_GLAD:
|
||||
- Android: use glad load for GLES API loads, default `FALSE`
|
||||
- Other platforms: Always use glad even this option not enabled
|
||||
|
|
|
@ -188,7 +188,7 @@ function(ax_copy_target_dll ax_target)
|
|||
)
|
||||
|
||||
# Copy windows angle binaries
|
||||
if (AX_USE_COMPAT_GL)
|
||||
if (WIN32 AND AX_USE_ANGLE)
|
||||
add_custom_command(TARGET ${ax_target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${_AX_ROOT_PATH}/${_AX_THIRDPARTY_NAME}/angle/prebuilt/${platform_name}/${ARCH_ALIAS}/libGLESv2.dll
|
||||
|
|
|
@ -127,9 +127,9 @@ function(use_ax_compile_define target)
|
|||
if(APPLE)
|
||||
target_compile_definitions(${target} PUBLIC __APPLE__)
|
||||
target_compile_definitions(${target} PUBLIC USE_FILE32API)
|
||||
if(AX_USE_COMPAT_GL)
|
||||
if(AX_USE_ANGLE)
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC AX_USE_COMPAT_GL=1
|
||||
PUBLIC AX_USE_ANGLE=1
|
||||
PUBLIC GL_SILENCE_DEPRECATION=1
|
||||
)
|
||||
endif()
|
||||
|
@ -148,9 +148,7 @@ function(use_ax_compile_define target)
|
|||
elseif(ANDROID)
|
||||
target_compile_definitions(${target} PUBLIC USE_FILE32API)
|
||||
elseif(WINDOWS)
|
||||
if(AX_USE_COMPAT_GL)
|
||||
target_compile_definitions(${target} PUBLIC AX_USE_COMPAT_GL=1)
|
||||
endif()
|
||||
ax_config_pred(${target} AX_USE_ANGLE)
|
||||
ax_config_pred(${target} AX_ENABLE_VLC_MEDIA)
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC WIN32
|
||||
|
|
|
@ -9,7 +9,7 @@ endif()
|
|||
function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
|
||||
load_cache("${AX_ROOT_DIR}/${AX_PREBUILT_DIR}" EXCLUDE thirdparty_LIB_DEPENDS)
|
||||
|
||||
message(STATUS "AX_USE_COMPAT_GL=${AX_USE_COMPAT_GL}")
|
||||
message(STATUS "AX_USE_ANGLE=${AX_USE_ANGLE}")
|
||||
|
||||
message(STATUS "AX_ENABLE_MSEDGE_WEBVIEW2=${AX_ENABLE_MSEDGE_WEBVIEW2}")
|
||||
message(STATUS "AX_ENABLE_MFMEDIA=${AX_ENABLE_MFMEDIA}")
|
||||
|
@ -25,7 +25,7 @@ function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
|
|||
message(STATUS "AX_ENABLE_EXT_EFFEKSEER=${AX_ENABLE_EXT_EFFEKSEER}")
|
||||
message(STATUS "AX_ENABLE_EXT_LUA=${AX_ENABLE_EXT_LUA}")
|
||||
|
||||
ax_config_pred(${APP_NAME} AX_USE_COMPAT_GL)
|
||||
ax_config_pred(${APP_NAME} AX_USE_ANGLE)
|
||||
ax_config_pred(${APP_NAME} AX_ENABLE_MFMEDIA)
|
||||
ax_config_pred(${APP_NAME} AX_ENABLE_MSEDGE_WEBVIEW2)
|
||||
|
||||
|
@ -182,7 +182,7 @@ function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
|
|||
endif()
|
||||
|
||||
# Copy windows angle binaries
|
||||
if (AX_USE_COMPAT_GL)
|
||||
if (AX_USE_ANGLE)
|
||||
add_custom_command(TARGET ${APP_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${AX_ROOT_DIR}/thirdparty/angle/prebuilt/${platform_name}/${ARCH_ALIAS}/libGLESv2.dll
|
||||
|
|
|
@ -39,10 +39,18 @@ endif()
|
|||
project(ax_libs)
|
||||
|
||||
if (NOT WINRT)
|
||||
option (AX_USE_COMPAT_GL "Use compat gl" OFF)
|
||||
option (AX_USE_ANGLE "Use google angle renderer" OFF)
|
||||
else()
|
||||
option (AX_USE_COMPAT_GL "Use compat gl" ON)
|
||||
set(AX_USE_COMPAT_GL ON)
|
||||
set (AX_USE_ANGLE TRUE CACHE BOOL "Use google angle renderer" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT AX_USE_ANGLE) # check deprecated option: AX_USE_COMPAT_GL
|
||||
if (NOT WINRT)
|
||||
option (AX_USE_COMPAT_GL "Use google angle renderer" OFF)
|
||||
else()
|
||||
set (AX_USE_COMPAT_GL TRUE CACHE BOOL "Use google angle renderer" ON)
|
||||
endif()
|
||||
set (AX_USE_ANGLE TRUE CACHE ${AX_USE_COMPAT_GL} "Use google angle renderer" FORCE)
|
||||
endif()
|
||||
|
||||
message(STATUS "WINRT=${WINRT}")
|
||||
|
@ -101,9 +109,11 @@ else()
|
|||
set(AX_ENABLE_EXT_IMGUI OFF)
|
||||
endif()
|
||||
|
||||
if (AX_ENABLE_EXT_EFFEKSEER AND ANDROID) # effekseer-axmol require use glad
|
||||
set(AX_USE_GLAD TRUE CACHE INTERNAL "Forcing use glad for platforms which use GL backend" )
|
||||
add_definitions(-DAX_USE_GLAD=1)
|
||||
if (ANDROID)
|
||||
option(AX_USE_GLAD "Use glad for platforms which use GL backend" AX_ENABLE_EXT_EFFEKSEER)
|
||||
if (AX_USE_GLAD)
|
||||
add_definitions(-DAX_USE_GLAD=1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(XCODE)
|
||||
|
|
|
@ -104,7 +104,7 @@ elseif(APPLE)
|
|||
platform/ios/InputView-ios.mm
|
||||
)
|
||||
|
||||
if(NOT AX_USE_COMPAT_GL)
|
||||
if(NOT AX_USE_ANGLE)
|
||||
set(_AX_PLATFORM_SPECIFIC_HEADER
|
||||
${_AX_PLATFORM_SPECIFIC_HEADER}
|
||||
platform/ios/ES2Renderer-ios.h
|
||||
|
|
|
@ -40,11 +40,11 @@ THE SOFTWARE.
|
|||
#elif AX_TARGET_PLATFORM == AX_PLATFORM_LINUX
|
||||
# include "platform/linux/GL-linux.h"
|
||||
#elif AX_TARGET_PLATFORM == AX_PLATFORM_IOS
|
||||
# if AX_USE_COMPAT_GL
|
||||
# if AX_USE_ANGLE
|
||||
# include "platform/ios/GL-ios.h"
|
||||
# endif
|
||||
#elif AX_TARGET_PLATFORM == AX_PLATFORM_MAC
|
||||
# if AX_USE_COMPAT_GL
|
||||
# if AX_USE_ANGLE
|
||||
# include "platform/mac/GL-mac.h"
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -109,13 +109,15 @@ THE SOFTWARE.
|
|||
#endif // AX_PLATFORM_WIN32
|
||||
|
||||
/*
|
||||
windows: https://github.com/google/angle
|
||||
mac: GL
|
||||
iOS: GLES
|
||||
other: GL
|
||||
The google/angle is library which translate native graphics API to GLES2+ APIs
|
||||
repo: https://github.com/google/angle
|
||||
windows: d3d9/d3d11/Desktop GL/Vulkan
|
||||
macOS/iOS: Metal
|
||||
Android: GLES/Vulkan
|
||||
Linux: Desktop GL/Vulkan
|
||||
*/
|
||||
#ifndef AX_USE_COMPAT_GL
|
||||
# define AX_USE_COMPAT_GL 0
|
||||
#ifndef AX_USE_ANGLE
|
||||
# define AX_USE_ANGLE 0
|
||||
#endif
|
||||
|
||||
#if ((AX_TARGET_PLATFORM == AX_PLATFORM_ANDROID) || (AX_TARGET_PLATFORM == AX_PLATFORM_IOS) || (AX_TARGET_PLATFORM == AX_PLATFORM_WINRT))
|
||||
|
@ -125,13 +127,13 @@ other: GL
|
|||
#endif
|
||||
|
||||
#if (AX_TARGET_PLATFORM == AX_PLATFORM_MAC)
|
||||
# if !AX_USE_COMPAT_GL
|
||||
# if !AX_USE_ANGLE
|
||||
# define AX_USE_METAL
|
||||
# else
|
||||
# define AX_USE_GL
|
||||
# endif
|
||||
#elif (AX_TARGET_PLATFORM == AX_PLATFORM_IOS)
|
||||
# if !AX_USE_COMPAT_GL
|
||||
# if !AX_USE_ANGLE
|
||||
# define AX_USE_METAL
|
||||
# else
|
||||
# define AX_USE_GL
|
||||
|
@ -142,13 +144,13 @@ other: GL
|
|||
# define AX_USE_GLES
|
||||
#elif (AX_TARGET_PLATFORM == AX_PLATFORM_WIN32)
|
||||
# define AX_USE_GL
|
||||
# if AX_USE_COMPAT_GL
|
||||
# if AX_USE_ANGLE
|
||||
# define AX_USE_GLES
|
||||
# endif
|
||||
#elif (AX_TARGET_PLATFORM == AX_PLATFORM_WINRT)
|
||||
# define AX_USE_GL
|
||||
# if !defined(AX_USE_COMPAT_GL)
|
||||
# define AX_USE_COMPAT_GL 1
|
||||
# if !defined(AX_USE_ANGLE)
|
||||
# define AX_USE_ANGLE 1
|
||||
# endif
|
||||
# define AX_USE_GLES
|
||||
#else
|
||||
|
|
|
@ -82,7 +82,7 @@ set(_AX_RENDERER_SRC
|
|||
renderer/backend/RenderPassDescriptor.cpp
|
||||
)
|
||||
|
||||
if(ANDROID OR WINDOWS OR LINUX OR AX_USE_COMPAT_GL)
|
||||
if(ANDROID OR WINDOWS OR LINUX OR AX_USE_ANGLE)
|
||||
|
||||
list(APPEND _AX_RENDERER_HEADER
|
||||
renderer/backend/opengl/BufferGL.h
|
||||
|
|
Loading…
Reference in New Issue