mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
glcontext/wgl: try wglCreateContextAttribsARB even not gl3 core profile
https://bugzilla.gnome.org/show_bug.cgi?id=764018
This commit is contained in:
parent
4a6b20cc42
commit
0decbc5c49
1 changed files with 21 additions and 9 deletions
|
@ -223,23 +223,35 @@ gst_gl_context_wgl_create_context (GstGLContext * context,
|
|||
}
|
||||
|
||||
if (!context_wgl->wgl_context) {
|
||||
context_wgl->wgl_context = wglCreateContext (device);
|
||||
|
||||
if (!context_wgl->wgl_context) {
|
||||
g_set_error (error, GST_GL_CONTEXT_ERROR,
|
||||
GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
|
||||
"Failed to create WGL context 0x%x", (unsigned int) GetLastError ());
|
||||
goto failure;
|
||||
if (context_wgl->priv->wglCreateContextAttribsARB && external_gl_context) {
|
||||
context_wgl->wgl_context =
|
||||
context_wgl->priv->wglCreateContextAttribsARB (device,
|
||||
external_gl_context, 0);
|
||||
}
|
||||
|
||||
if (external_gl_context) {
|
||||
if (!wglShareLists (external_gl_context, context_wgl->wgl_context)) {
|
||||
|
||||
if (!context_wgl->wgl_context) {
|
||||
|
||||
context_wgl->wgl_context = wglCreateContext (device);
|
||||
|
||||
if (!context_wgl->wgl_context) {
|
||||
g_set_error (error, GST_GL_CONTEXT_ERROR,
|
||||
GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
|
||||
"failed to share contexts through wglShareLists 0x%x",
|
||||
"Failed to create WGL context 0x%x",
|
||||
(unsigned int) GetLastError ());
|
||||
goto failure;
|
||||
}
|
||||
|
||||
if (external_gl_context) {
|
||||
if (!wglShareLists (external_gl_context, context_wgl->wgl_context)) {
|
||||
g_set_error (error, GST_GL_CONTEXT_ERROR,
|
||||
GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
|
||||
"failed to share contexts through wglShareLists 0x%x",
|
||||
(unsigned int) GetLastError ());
|
||||
goto failure;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
context_wgl->priv->context_api = GST_GL_API_OPENGL;
|
||||
|
|
Loading…
Reference in a new issue