renderer-native-gles3: Add cpp error if gl.h was included

On some architectures, including both GLES3/gl3.h GL/gl.h will cause
compilation issues due to incompatible type definitions. To avoid
running into that issue while building on other architectures, make
sure we haven't included GL/gl.h by accident.

https://bugzilla.gnome.org/show_bug.cgi?id=788695
This commit is contained in:
Jonas Ådahl 2017-10-30 16:08:46 +08:00
parent fb3a64491e
commit 626621a53a

View File

@ -34,6 +34,14 @@
#include "backends/meta-gles3.h"
#include "backends/meta-gles3-table.h"
/*
* GL/gl.h being included may conflit with gl3.h on some architectures.
* Make sure that hasn't happened on any architecture.
*/
#ifdef GL_VERSION_1_1
#error "Somehow included OpenGL headers when we shouldn't have"
#endif
static EGLImageKHR
create_egl_image (MetaEgl *egl,
EGLDisplay egl_display,