This was probably the only descent post yet, the rest looks kinda off topic but hey, it's a forum to express things i guess :) I'll have a look at shared context and see what it is and how it works in Pyglet.
As for *GL applications not being able to render things in different threads, i'm aware of the fact that this is normally how it's done because it will cause major graphical errors if updated in the wrong time etc, but technically it's possible so there for, it should be doable :) On Tuesday, February 5, 2013 7:40:52 AM UTC+1, Enerccio wrote: > > Except that python is compatible with multi threading. It just make it > single threading practically. > As for the opengl, have you tried making sharing context? I am not sure if > drawing objects is allowed in other threads, > but if it is, it must be done with shared context. > > > 2013/2/5 Tristam MacDonald <[email protected] <javascript:>> > >> On Mon, Feb 4, 2013 at 6:15 PM, Lord Anton Hvornum >> <[email protected]<javascript:> >> > wrote: >> >>> I have a scenario where: >>> >>> class main(pyglet.window): >>> ... >>> generates a lot of objects >>> >>> sends a label to another thread >>> >>> class the_thread(Thread): >>> ... >>> tries to: >>> self.lable.text = 'New string' >>> self.lable.draw() >>> >>> Which causes: >>> >>> > GLException: invalid operation >>> >>> >>> Even keeping the .draw() part in the main thread and just update the >>> text causes the error. >>> Using the "lock" function via self.lable.being_update() and then >>> calling .end_update() causes the error. >>> >>> The code i've got works fine if i take away the Threading part, which, i >>> don't because the whole idea with the thread is to have a socket and some >>> processing operations being performed at X times / minute under different >>> circumstances. >>> >>> >>> Any idea if it's possible to solve at all? >>> Can i hook the thread objects to the main window resorce somehow or blit >>> it into the main instance? I **think** i've solved this once back in the >>> days when i was programming at a helpdesk by blitting the object into a >>> "scene" or something but i can't find my code, and it might not even have >>> been based on Pyglet to begin with. >>> >> >> In general, OpenGL is not compatible with multi-threading. >> >> In general, Python is not compatible with multi-threading either. >> >> -- >> Tristam MacDonald >> Software Development Engineer, Amazon.com >> http://swiftcoder.wordpress.com/ >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pyglet-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/pyglet-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Bc. Peter Vaňušanik > http://www.bishojo.tk > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
