Fix --enable-opengles and --enable-opengles3 (#8749)

* qb: Fix OpenGLES build.

The gl core video driver requires at least OpenGLES 3 and
OpenGL 1 is not compatible with OpenGLES 2 or 3.

* travis: Test OpenGLES builds on linux.
This commit is contained in:
orbea 2019-05-10 14:47:36 -07:00 committed by Twinaphex
parent 52dd39f98a
commit 1a3f16ded1
2 changed files with 20 additions and 0 deletions

View file

@ -29,6 +29,10 @@ matrix:
env: CXX_BUILD=1 CC=gcc-8 CXX=g++-8
- compiler: gcc
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
- compiler: gcc
env: ENABLE_GLES=1 CC=gcc-8 CXX=g++-8
- compiler: gcc
env: ENABLE_GLES=1 ENABLE_GLES3=1 CC=gcc-8 CXX=g++-8
- compiler: clang
env: CC=clang-6.0 CXX=clang++-6.0
- compiler: clang
@ -77,6 +81,14 @@ script:
if [ -n "$DISABLE_MENU" ]; then
ARGS="$ARGS --disable-menu"
fi
- |
if [ -n "$ENABLE_GLES" ]; then
ARGS="$ARGS --enable-opengles"
fi
- |
if [ -n "$ENABLE_GLES3" ]; then
ARGS="$ARGS --enable-opengles3"
fi
- ./configure $ARGS
- |
if [ -n "$C89_BUILD" ]; then

View file

@ -351,6 +351,14 @@ fi
if [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES3" = 'no' ]; then
die : 'Notice: OpenGL and OpenGLES3 are disabled. Disabling HAVE_OPENGL_CORE.'
HAVE_OPENGL_CORE='no'
elif [ "$HAVE_OPENGLES" != 'no' ] && [ "$HAVE_OPENGLES3" != 'yes' ]; then
die : 'Notice: OpenGLES2 is enabled. Disabling the OpenGL core driver.'
HAVE_OPENGL_CORE='no'
fi
if [ "$HAVE_OPENGLES" != 'no' ] || [ "$HAVE_OPENGLES3" != 'no' ]; then
die : 'Notice: OpenGLES is enabled. Disabling the OpenGL1 driver.'
HAVE_OPENGL1='no'
fi
if [ "$HAVE_ZLIB" = 'no' ]; then