Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-08 Thread Aapo Rantalainen
load-async is a GObject property, and can be defined using ClutterScript:  {    type : ClutterTexture,    load-async : true,    filename : /path/to/filename,  } Hi, I added ' load-async : true, ' to my json entries. This works only actors without behaviours, but I have behaviours

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Aapo Rantalainen
2009/12/2 danny tornad...@163.com: Your demo program works normally for me. Thank you very much for this information. I tested this on another computer and it worked. So I'm using clutter and threads in right way. (Maybe there should be little bit more manual than

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Emmanuele Bassi
On Wed, 2009-12-02 at 11:27 +0200, Aapo Rantalainen wrote: 2009/12/2 danny tornad...@163.com: Your demo program works normally for me. Thank you very much for this information. I tested this on another computer and it worked. So I'm using clutter and threads in right way. no, you really

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Aapo Rantalainen
but at least that code shows you how to use threads - and you're not even close to how test-threads is implemented. Hi, now I made my test preloader top of test-thread.c This is diff: --- old_test-threads.c 2009-12-02 14:53:11.0 +0200 +++ test-threads.c 2009-12-02

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Emmanuele Bassi
On Wed, 2009-12-02 at 13:52 +, Emmanuele Bassi wrote: oh, and by the way: if your only goal is to load a texture from file asynchronously, please - *please* - do what Bastian already suggested, and use the :load-async property of ClutterTexture. it will transparently use threads to load the

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Aapo Rantalainen
Hi, thanks, I got it working. In test-threads.c there was this row: clutter_threads_add_idle_full (G_PRIORITY_DEFAULT + 30, update_label_idle, update, NULL); So I though it is safe to put my clutter_* code same

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Emmanuele Bassi
On Wed, 2009-12-02 at 16:54 +0200, Aapo Rantalainen wrote: Hi, thanks, I got it working. In test-threads.c there was this row: clutter_threads_add_idle_full (G_PRIORITY_DEFAULT + 30, update_label_idle, update,

RE: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-02 Thread Emmanuele Bassi
Just curious, what is the point of the threads_enter threads_leave API if everything breaks outside of the main thread? Isn't even providing them asking for misunderstandings like this? You can replace the locking primitives Clutter uses through clutter_threads_set_lock_functions() And use,

[clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-01 Thread Aapo Rantalainen
Hi, I'm working with actor preloader i.e. main-loop is running and another thread loads actors. I'm not even plan to add these on stage, just load them. In this example application I add them to stage, because now it forms complete application. If in thread I make clutterRectangle, it works. If

Re: [clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-01 Thread Bastian Winkler
hi, clutter is already capable of loading textures in a thread: http://www.clutter-project.org/docs/clutter/stable/ClutterTexture.html#ClutterTexture--load-async you should also dig the mailing-list archives for a list of do's and dont's with threading in clutter:

Re:[clutter] problem with threads and clutter-texture from file: Failed to create COGL texture

2009-12-01 Thread danny
Hi, Your demo program works normally for me. Perhaps it a problem related to others such as VGA driver... -- Best Regards, 在2009-12-02,Aapo Rantalainen aapo.rantalai...@gmail.com 写道: Hi, I'm working with actor preloader i.e. main-loop is running and another thread loads actors. I'm not