[Android] Add in a compiling option for GLES3
This commit is contained in:
parent
b2d3dc8a68
commit
09def3ed3f
|
@ -7,7 +7,8 @@ option(ANDROID "Enables a build for Android" OFF)
|
||||||
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
||||||
option(USE_X11 "Enables X11 Support" ON)
|
option(USE_X11 "Enables X11 Support" ON)
|
||||||
option(USE_WAYLAND "Enables Wayland Support" OFF)
|
option(USE_WAYLAND "Enables Wayland Support" OFF)
|
||||||
option(USE_GLES "Enables GLES And EGL, disables OGL" OFF)
|
option(USE_GLES "Enables GLES2 And EGL, disables OGL" OFF)
|
||||||
|
option(USE_GLES3 "Enables GLES3 and EGL" OFF)
|
||||||
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
|
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
|
||||||
|
|
||||||
option(FASTLOG "Enable all logs" OFF)
|
option(FASTLOG "Enable all logs" OFF)
|
||||||
|
@ -261,11 +262,19 @@ endif()
|
||||||
|
|
||||||
# For now GLES and EGL are tied to each other.
|
# For now GLES and EGL are tied to each other.
|
||||||
# Enabling GLES also disables the OpenGL plugin.
|
# Enabling GLES also disables the OpenGL plugin.
|
||||||
if(USE_GLES)
|
if(USE_GLES3)
|
||||||
message("GLES rendering enabled")
|
message("GLES3 rendering enabled")
|
||||||
add_definitions(-DUSE_GLES=1)
|
add_definitions(-DUSE_GLES=1 -DUSE_EGL=1 -DUSE_GLES3=1)
|
||||||
add_definitions(-DUSE_EGL=1)
|
include_directories(Externals/GLES3)
|
||||||
set(USE_EGL True)
|
set(USE_EGL True)
|
||||||
|
set(USE_GLES True)
|
||||||
|
else()
|
||||||
|
if(USE_GLES)
|
||||||
|
message("GLES2 rendering enabled. OpenGL disabled")
|
||||||
|
add_definitions(-DUSE_GLES=1)
|
||||||
|
add_definitions(-DUSE_EGL=1)
|
||||||
|
set(USE_EGL True)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# For now Wayland and EGL are tied to each other.
|
# For now Wayland and EGL are tied to each other.
|
||||||
# The alternative would be an shm path
|
# The alternative would be an shm path
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "../../../Plugins/Plugin_VideoDX9/Src/VideoBackend.h"
|
#include "../../../Plugins/Plugin_VideoDX9/Src/VideoBackend.h"
|
||||||
#include "../../../Plugins/Plugin_VideoDX11/Src/VideoBackend.h"
|
#include "../../../Plugins/Plugin_VideoDX11/Src/VideoBackend.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef USE_GLES
|
#if !defined(USE_GLES) || USE_GLES3
|
||||||
#include "../../../Plugins/Plugin_VideoOGL/Src/VideoBackend.h"
|
#include "../../../Plugins/Plugin_VideoOGL/Src/VideoBackend.h"
|
||||||
#endif
|
#endif
|
||||||
#include "../../../Plugins/Plugin_VideoSoftware/Src/VideoBackend.h"
|
#include "../../../Plugins/Plugin_VideoSoftware/Src/VideoBackend.h"
|
||||||
|
@ -45,7 +45,7 @@ void VideoBackend::PopulateList()
|
||||||
if (IsGteVista())
|
if (IsGteVista())
|
||||||
g_available_video_backends.push_back(backends[0] = new DX11::VideoBackend);
|
g_available_video_backends.push_back(backends[0] = new DX11::VideoBackend);
|
||||||
#endif
|
#endif
|
||||||
#ifndef USE_GLES
|
#if !defined(USE_GLES) || USE_GLES3
|
||||||
g_available_video_backends.push_back(backends[1] = new OGL::VideoBackend);
|
g_available_video_backends.push_back(backends[1] = new OGL::VideoBackend);
|
||||||
#endif
|
#endif
|
||||||
g_available_video_backends.push_back(backends[3] = new SW::VideoSoftware);
|
g_available_video_backends.push_back(backends[3] = new SW::VideoSoftware);
|
||||||
|
|
|
@ -217,7 +217,7 @@ endif()
|
||||||
|
|
||||||
set(LIBS bdisasm inputcommon videosoftware sfml-network)
|
set(LIBS bdisasm inputcommon videosoftware sfml-network)
|
||||||
|
|
||||||
if(NOT USE_GLES)
|
if(NOT USE_GLES OR USE_GLES3)
|
||||||
set(LIBS ${LIBS} videoogl)
|
set(LIBS ${LIBS} videoogl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,11 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
||||||
EGL_BLUE_SIZE, 8,
|
EGL_BLUE_SIZE, 8,
|
||||||
EGL_DEPTH_SIZE, 24,
|
EGL_DEPTH_SIZE, 24,
|
||||||
#ifdef USE_GLES
|
#ifdef USE_GLES
|
||||||
|
#ifdef USE_GLES3
|
||||||
|
EGL_RENDERABLE_TYPE, (1 << 6) /* EGL_OPENGL_ES3_BIT */,
|
||||||
|
#else
|
||||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if(NOT USE_GLES)
|
if(NOT USE_GLES OR USE_GLES3)
|
||||||
add_subdirectory(Plugin_VideoOGL)
|
add_subdirectory(Plugin_VideoOGL)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(Plugin_VideoSoftware)
|
add_subdirectory(Plugin_VideoSoftware)
|
||||||
|
|
Loading…
Reference in New Issue