[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:
Julien Isorce 2009-04-30 23:40:38 +02:00 committed by Tim-Philipp Müller
parent 9f8473cce0
commit de9f763bff
3 changed files with 10 additions and 4 deletions

View file

@ -2709,6 +2709,10 @@ gst_gl_display_thread_do_upload_fill (GstGLDisplay * display)
default: default:
g_assert_not_reached (); 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);
} }

View 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", g_debug ("failed to share opengl context %lud with %lud\n",
(gulong) priv->gl_context, (gulong) priv->external_gl_context); (gulong) priv->gl_context, (gulong) priv->external_gl_context);
else else
g_debug ("share opengl context succeed\n"); g_debug ("share opengl context succeed %lud\n", (gulong) priv->external_gl_context);
} }
} }

View file

@ -401,10 +401,12 @@ window_proc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
eglCreateContext (priv->display, config, priv->external_gl_context, eglCreateContext (priv->display, config, priv->external_gl_context,
contextAttribs); contextAttribs);
if (priv->gl_context != EGL_NO_CONTEXT) 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 else
g_debug ("failed to create glcontext %d, %d, %s\n", priv->gl_context, g_debug ("failed to create glcontext %lud, extenal: %lud, win: %lud, %s\n",
hWnd, EGLErrorString ()); (gulong) priv->gl_context, (gulong) priv->external_gl_context,
(gulong) hWnd, EGLErrorString ());
ReleaseDC (hWnd, priv->display); ReleaseDC (hWnd, priv->display);