diff options
author | Matthew Waters <ystreet00@gmail.com> | 2013-08-30 00:28:04 +1000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-09-03 17:41:54 +0200 |
commit | 1b2b2191e3188354c01d9359c2c31ccb689e22d3 (patch) | |
tree | 57b82177c034c6134e9193c48932e36b3b9158cb | |
parent | 5cbf1f6430eb4ad4862f1f4f9de19be15ea4c3df (diff) |
egl: doesn't require the EGLConfig from the other context
libEGL should give us the same or similar EGLConfig from the
EGLDisplay we have.
-rw-r--r-- | gst-libs/gst/gl/egl/gstglcontext_egl.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c index bb7feec..c10bd5b 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -22,7 +22,7 @@ #include "config.h" #endif -/* FIXME: Sharing contexts requires the EGLDisplay & EGLConfig to be the same +/* FIXME: Sharing contexts requires the EGLDisplay to be the same * may need to box it. */ @@ -161,28 +161,16 @@ gst_gl_context_egl_choose_config (GstGLContextEGL * egl, gint i = 0; EGLint config_attrib[20]; - if (other_context) { - GstGLContextEGL *other_context_egl = GST_GL_CONTEXT_EGL (other_context); - EGLint config_id; - - eglGetConfigAttrib (egl->egl_display, other_context_egl->egl_config, - EGL_CONFIG_ID, &config_id); - - config_attrib[i++] = EGL_CONFIG_ID; - config_attrib[i++] = config_id; - config_attrib[i++] = EGL_NONE; - } else { - config_attrib[i++] = EGL_SURFACE_TYPE; - config_attrib[i++] = EGL_WINDOW_BIT; - config_attrib[i++] = EGL_RENDERABLE_TYPE; - if (egl->gl_api & GST_GL_API_GLES2) - config_attrib[i++] = EGL_OPENGL_ES2_BIT; - else - config_attrib[i++] = EGL_OPENGL_BIT; - config_attrib[i++] = EGL_DEPTH_SIZE; - config_attrib[i++] = 16; - config_attrib[i++] = EGL_NONE; - } + config_attrib[i++] = EGL_SURFACE_TYPE; + config_attrib[i++] = EGL_WINDOW_BIT; + config_attrib[i++] = EGL_RENDERABLE_TYPE; + if (egl->gl_api & GST_GL_API_GLES2) + config_attrib[i++] = EGL_OPENGL_ES2_BIT; + else + config_attrib[i++] = EGL_OPENGL_BIT; + config_attrib[i++] = EGL_DEPTH_SIZE; + config_attrib[i++] = 16; + config_attrib[i++] = EGL_NONE; if (eglChooseConfig (egl->egl_display, config_attrib, &egl->egl_config, 1, &numConfigs)) { |