summaryrefslogtreecommitdiff
path: root/cogl
diff options
context:
space:
mode:
authorMario Sanchez Prada <mario@endlessm.com>2017-04-17 12:27:59 +0100
committerMario Sanchez Prada <mario@endlessm.com>2017-04-17 12:58:52 +0100
commit229ac9c9dcc9fe8a1462c742ba1776e090bc37a1 (patch)
tree7b0b5f2cba3c88564c14231f4d1028ac9ef0d6c7 /cogl
parente435cf301f78971f3d4965468f53ccad7ab1b2f8 (diff)
downloadmutter-229ac9c9dcc9fe8a1462c742ba1776e090bc37a1.tar.gz
Consider the right CONTEXT_LOST token on OpenGL ES contexts
The KHR_robustness extension defined the following token as returned by GetError (see spec at [1]): CONTEXT_LOST 0x0507 As noted in the spec, this token must have a "_KHR" suffix in an OpenGL ES context, which is not being considered here, thus making this type of builds fail. [1] https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_robustness.txt https://bugzilla.gnome.org/show_bug.cgi?id=781398
Diffstat (limited to 'cogl')
-rw-r--r--cogl/cogl/driver/gl/cogl-util-gl-private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cogl/cogl/driver/gl/cogl-util-gl-private.h b/cogl/cogl/driver/gl/cogl-util-gl-private.h
index 1407e0fb0..74db6ee05 100644
--- a/cogl/cogl/driver/gl/cogl-util-gl-private.h
+++ b/cogl/cogl/driver/gl/cogl-util-gl-private.h
@@ -37,6 +37,11 @@
#include "cogl-gl-header.h"
#include "cogl-texture.h"
+/* In OpenGL ES context, GL_CONTEXT_LOST has a _KHR prefix */
+#ifndef GL_CONTEXT_LOST
+#define GL_CONTEXT_LOST GL_CONTEXT_LOST_KHR
+#endif
+
#ifdef COGL_GL_DEBUG
const char *