[mutter] cogl: Just define the needed GLES2 extension ourself
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cogl: Just define the needed GLES2 extension ourself
- Date: Tue, 3 Jan 2017 09:53:17 +0000 (UTC)
commit 5a43cc5cf9f21252aa8c80882cf3ffef0863ed1b
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Dec 9 11:54:38 2016 +0800
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
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 9a29c8f..375edcb 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]