On Thu, 2009-04-23 at 19:55 +0200, Julien Isorce wrote: > > Actually I want to update a ClutterTexture with a texture that comes > from my own opengl context that is created in an other thread than the > clutter one.
uh-oh. potential exponential mess alert. > Just after creating my opengl context, I call wglSharelists or I call > myopenglcontext = GLXCreateContext (...., clutter_gl_context..) > And this call is ok. (it does not fail). it would be problematic if it did fail. but how on earth are you getting the GLX context created by Clutter, since we don't expose any API to do that (and for good reasons)? have you read the documentation for GLXCreateContext(), specifically what it says about direct rendering contexts sharing the same address space and sharelists? why are you creating a new GL context in the first place? > A point I saw is that in clutter_texture_set_cogl_texture a > queue_redraw is done. So how can I be sure that the cogl texture is > drawn ? I mean when can I delete my texture that comes from my opengl > context ? redraws are queued in the same thread that called clutter_main(); you should be destroying your GL texture when you are changing the CoglHandle to the ClutterTexture with another one OR when you are destroying the ClutterTexture. otherwise, it's not safe at all. > Does someone already tried a such case ? Any idea about the best way > to update a clutter texture with a foreign opengl texture ? > Frame buffer object is used inside the clutter texture ? (I can see > some offscreen word in clutter texture source code) FBOs are used (and enter the picture) only when creating a Texture containing an actor. ciao, Emmanuele. -- Emmanuele Bassi, Senior Engineer | [email protected] Intel Open Source Technology Center | http://oss.intel.com -- To unsubscribe send a mail to [email protected]
