From bbac8bf8d0b5812289665e801c11f3a20ed6d967 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Sun, 30 Nov 2014 00:42:17 +1100 Subject: [PATCH] glcontext: require GL_ARB_ES2_compatibility for opengl3 until we generate gl3 compliant shaders https://bugzilla.gnome.org/show_bug.cgi?id=740012 --- gst-libs/gst/gl/gstglcontext.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 1c0549c..1136b8d 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -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) { -- 2.7.4