From de9f763bffd0e8de567800bf7c0f695872b3aa0a Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Thu, 30 Apr 2009 23:40:38 +0200 Subject: [PATCH] [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. --- gst-libs/gst/gl/gstgldisplay.c | 4 ++++ gst-libs/gst/gl/gstglwindow_win32.c | 2 +- gst-libs/gst/gl/gstglwindow_winCE.c | 8 +++++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index a2a060e..c820b2f 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -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); } diff --git a/gst-libs/gst/gl/gstglwindow_win32.c b/gst-libs/gst/gl/gstglwindow_win32.c index 566a315..e03610e 100644 --- a/gst-libs/gst/gl/gstglwindow_win32.c +++ b/gst-libs/gst/gl/gstglwindow_win32.c @@ -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); } } diff --git a/gst-libs/gst/gl/gstglwindow_winCE.c b/gst-libs/gst/gl/gstglwindow_winCE.c index 068981d..da0c117 100644 --- a/gst-libs/gst/gl/gstglwindow_winCE.c +++ b/gst-libs/gst/gl/gstglwindow_winCE.c @@ -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); -- 2.7.4