mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
[337/906] Improve cluttershare example
Use clutter_threads_API. When just using glupload from rgb, we have to be sure that the upload texture is not in use in our gst gl context.
This commit is contained in:
parent
9f8473cce0
commit
de9f763bff
3 changed files with 10 additions and 4 deletions
|
@ -2709,6 +2709,10 @@ gst_gl_display_thread_do_upload_fill (GstGLDisplay * display)
|
|||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
//make sure no texture is in use in our opengl context
|
||||
//in case we want to use the upload texture in an other opengl context
|
||||
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -403,7 +403,7 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
g_debug ("failed to share opengl context %lud with %lud\n",
|
||||
(gulong) priv->gl_context, (gulong) priv->external_gl_context);
|
||||
else
|
||||
g_debug ("share opengl context succeed\n");
|
||||
g_debug ("share opengl context succeed %lud\n", (gulong) priv->external_gl_context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -401,10 +401,12 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
eglCreateContext (priv->display, config, priv->external_gl_context,
|
||||
contextAttribs);
|
||||
if (priv->gl_context != EGL_NO_CONTEXT)
|
||||
g_debug ("gl context created: %d\n", priv->gl_context);
|
||||
g_debug ("gl context created: %lud, external: %lud\n", (gulong) priv->gl_context,
|
||||
(gulong) priv->external_gl_context);
|
||||
else
|
||||
g_debug ("failed to create glcontext %d, %d, %s\n", priv->gl_context,
|
||||
hWnd, EGLErrorString ());
|
||||
g_debug ("failed to create glcontext %lud, extenal: %lud, win: %lud, %s\n",
|
||||
(gulong) priv->gl_context, (gulong) priv->external_gl_context,
|
||||
(gulong) hWnd, EGLErrorString ());
|
||||
|
||||
ReleaseDC (hWnd, priv->display);
|
||||
|
||||
|
|
Loading…
Reference in a new issue