glcontext: require GL_ARB_ES2_compatibility for opengl3
authorMatthew Waters <matthew@centricular.com>
Sat, 29 Nov 2014 13:42:17 +0000 (00:42 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:51 +0000 (19:31 +0000)
until we generate gl3 compliant shaders

https://bugzilla.gnome.org/show_bug.cgi?id=740012

gst-libs/gst/gl/gstglcontext.c

index 1c0549c..1136b8d 100644 (file)
@@ -1322,6 +1322,15 @@ gst_gl_context_create_thread (GstGLContext * context)
     context->priv->gl_exts = g_strdup (ext_const_c_str);
   }
 
+  if (gl_api & GST_GL_API_OPENGL3
+      && !gst_gl_context_check_gl_version (context, GST_GL_API_OPENGL3, 4, 1)
+      && !gst_gl_check_extension ("GL_ARB_ES2_compatibility",
+          context->priv->gl_exts)) {
+    g_set_error (error, GST_GL_CONTEXT_ERROR, GST_GL_CONTEXT_ERROR_FAILED,
+        "An opengl3 context created but the required ES2 compatibility was not found");
+    goto failure;
+  }
+
   context->priv->alive = TRUE;
 
   if (gl->DebugMessageCallback) {