GNOME Bugzilla – Bug 726494
use wglCreateContextAttribsARB to create share context
Last modified: 2014-03-20 04:47:08 UTC
Created attachment 272121 [details] [review] misc patch to improve windows share context create currently gst-plugins-gl use wglShareLists to create share context ,as I tested (win7 32bit + AMD GPU), it can not share context correctly (qglwtextureshare) ,and GstGLContextWGL code path did not support wrapped context. so I created this misc patch to improve this. I use wglCreateContextAttribsARB to create context, as this link mentioned (https://www.opengl.org/wiki/Platform_specifics:_Windows#wglShareLists) I haven't other os (such as XP ) nor GPU to test , it may break in some condition. hopes others help testing and improving this.
Review of attachment 272121 [details] [review]: Otherwise, looks good. ::: gst-libs/gst/gl/win32/gstglcontext_wgl.c @@ +133,3 @@ + + if (wglCreateContextAttribsARB == NULL) { + g_set_error (error, GST_GL_CONTEXT_ERROR, It would be better to fallback to wglShareLists rather than failing/
Created attachment 272220 [details] [review] improved patch with wglShareLists fallback
(In reply to comment #3) > Review of attachment 272121 [details] [review]: > > Otherwise, looks good. > > ::: gst-libs/gst/gl/win32/gstglcontext_wgl.c > @@ +133,3 @@ > + > + if (wglCreateContextAttribsARB == NULL) { > + g_set_error (error, GST_GL_CONTEXT_ERROR, > > It would be better to fallback to wglShareLists rather than failing/ That's better than failing . I create a improved one, Thanks for reviewing.