diff --git a/configure.ac b/configure.ac index a63e983e46..23120c5157 100644 --- a/configure.ac +++ b/configure.ac @@ -860,6 +860,10 @@ fi dnl check if we can include both GL and GLES2 at the same time if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then + GLES3_H_DEFINE=0 + if test "x$HAVE_GLES3_H" == "xyes"; then + GLES3_H_DEFINE=1 + fi GL_INCLUDES=" #ifdef __GNUC__ # pragma GCC diagnostic push @@ -872,11 +876,12 @@ if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then # include # include # else -# include -# include -# if $HAVE_GLES3_H +# if $GLES3_H_DEFINE # include # include +# else +# include +# include # endif # endif # ifdef __APPLE__ @@ -1329,11 +1334,12 @@ if test "x$USE_GLES2" = "xyes"; then # include # include # else -# include -# include -# if GST_GL_HAVE_GLES3 +# if $GST_GL_HAVE_GLES3 # include # include +# else +# include +# include # endif # endif " diff --git a/gst-libs/gst/gl/gstglapi.h b/gst-libs/gst/gl/gstglapi.h index 8c9266629f..93b60b792b 100644 --- a/gst-libs/gst/gl/gstglapi.h +++ b/gst-libs/gst/gl/gstglapi.h @@ -39,11 +39,12 @@ # include # include # else -# include -# include # if GST_GL_HAVE_GLES3 # include # include +# else +# include +# include # endif # endif # if !GST_GL_HAVE_OPENGL