Commit 344e7db9 authored by Matthew Waters's avatar Matthew Waters 🐨

gl: fix gles3 header usage for older platforms

Some platforms provide an old version of GLES2/gl2.h and GLES2/gl2ext.h that
will fail when including GLES3/gl3.h due to missing typedef's.

Seen on the RPi.
parent 8c03f448
...@@ -860,6 +860,10 @@ fi ...@@ -860,6 +860,10 @@ fi
dnl check if we can include both GL and GLES2 at the same time 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 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=" GL_INCLUDES="
#ifdef __GNUC__ #ifdef __GNUC__
# pragma GCC diagnostic push # pragma GCC diagnostic push
...@@ -872,11 +876,12 @@ if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then ...@@ -872,11 +876,12 @@ if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then
# include <OpenGLES/ES2/gl.h> # include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h> # include <OpenGLES/ES2/glext.h>
# else # else
# include <GLES2/gl2.h> # if $GLES3_H_DEFINE
# include <GLES2/gl2ext.h>
# if $HAVE_GLES3_H
# include <GLES3/gl3.h> # include <GLES3/gl3.h>
# include <GLES3/gl3ext.h> # include <GLES3/gl3ext.h>
# else
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif # endif
# endif # endif
# ifdef __APPLE__ # ifdef __APPLE__
...@@ -1329,11 +1334,12 @@ if test "x$USE_GLES2" = "xyes"; then ...@@ -1329,11 +1334,12 @@ if test "x$USE_GLES2" = "xyes"; then
# include <OpenGLES/ES2/gl.h> # include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h> # include <OpenGLES/ES2/glext.h>
# else # else
# include <GLES2/gl2.h> # if $GST_GL_HAVE_GLES3
# include <GLES2/gl2ext.h>
# if GST_GL_HAVE_GLES3
# include <GLES3/gl3.h> # include <GLES3/gl3.h>
# include <GLES3/gl3ext.h> # include <GLES3/gl3ext.h>
# else
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif # endif
# endif # endif
" "
......
...@@ -39,11 +39,12 @@ ...@@ -39,11 +39,12 @@
# include <OpenGLES/ES2/gl.h> # include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h> # include <OpenGLES/ES2/glext.h>
# else # else
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# if GST_GL_HAVE_GLES3 # if GST_GL_HAVE_GLES3
# include <GLES3/gl3.h> # include <GLES3/gl3.h>
# include <GLES3/gl3ext.h> # include <GLES3/gl3ext.h>
# else
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>
# endif # endif
# endif # endif
# if !GST_GL_HAVE_OPENGL # if !GST_GL_HAVE_OPENGL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment