Hello.

El 07/04/2013 16:06, Peter Enerccio escribió:
If you have shared context for threads, then opengl can be called from other threads, as far as I know.

+1 AFAIK

But with some system of entity state control, sounds good that only the main thread needs to draw in an OpenGL context, if you can isolate there the drawing process, and probably other things like event handling.

If you need to import the GL code from a string, may be you can still decouple calling OpenGL later from Thread-1,just thinking out loud:

def go(infodict, parent):
>run some function and avoid opengl calls, this operations will be requested to the main Thread
    def ondraw():
        #Must be called with active context
        gl.glBegin("X")
    parent.pending_gl_calls.append(ondraw)

--
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.


Reply via email to