diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2016-12-09 11:54:38 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2017-01-03 17:50:03 +0800 |
commit | 5a43cc5cf9f21252aa8c80882cf3ffef0863ed1b (patch) | |
tree | d2fd30160e88d1bded1bdca4085fe927543ae3e5 /cogl | |
parent | 81b11929f78d277aa11ef45a6ef892e5ebdaab78 (diff) | |
download | mutter-5a43cc5cf9f21252aa8c80882cf3ffef0863ed1b.tar.gz |
cogl: Just define the needed GLES2 extension ourself
We need a GLES2 extension macro in cogl-texture-2d-gl.c, but we can't
include GLES2/gl2ext.h because it will conflict with things in
GL/glext.h. We can't rely on cogl including anything for us since it'd
only include GLES2/gl2ext.h if OpenGL support was explicitly disabled.
https://bugzilla.gnome.org/show_bug.cgi?id=774891
Diffstat (limited to 'cogl')
-rw-r--r-- | cogl/cogl/driver/gl/cogl-texture-2d-gl.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c index 9a29c8f50..375edcb14 100644 --- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c +++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c @@ -47,14 +47,19 @@ #include "cogl-util-gl-private.h" #if defined (COGL_HAS_EGL_SUPPORT) -#include "cogl-egl-defines.h" -# ifndef COGL_HAS_GLES2 + /* We need this define from GLES2, but can't include the header as its type definitions may conflict with the GL ones */ -# define GL_TEXTURE_EXTERNAL_OES 0x8D65 -# endif -#endif +#ifndef GL_OES_EGL_image_external +#define GL_OES_EGL_image_external 1 +#define GL_TEXTURE_EXTERNAL_OES 0x8D65 +#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 +#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 +#define GL_SAMPLER_EXTERNAL_OES 0x8D66 +#endif /* GL_OES_EGL_image_external */ + +#endif /* defined (COGL_HAS_EGL_SUPPORT) */ void _cogl_texture_2d_gl_free (CoglTexture2D *tex_2d) |