[337/906] Improve cluttershare example
authorJulien Isorce <julien.isorce@gmail.com>
Thu, 30 Apr 2009 21:40:38 +0000 (23:40 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:21 +0000 (19:31 +0000)
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
gst-libs/gst/gl/gstglwindow_win32.c
gst-libs/gst/gl/gstglwindow_winCE.c

index a2a060e..c820b2f 100644 (file)
@@ -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);
 }
 
 
index 566a315..e03610e 100644 (file)
@@ -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);
       }
     }
 
index 068981d..da0c117 100644 (file)
@@ -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);