We have a Tkinter application and it would be great to use pyglet's
functionality in an embedded way. Is it possible to pack (or otherwise
attach) a pyglet window into a Tkinter frame or canvas?
Cheers,
-T
> You can use Tkinter to create the OpenGL context (for example,
> PyOpenGL contains a Tk widget, or search "tkinter opengl" for more
> examples), then use pyglet's gl, image, audio, video and font modules.
On second thought, the image and font modules will be looking for an
active context and won't find one. You should be able to create a
"pretend" context to represent the one created by Tk::
from pyglet import gl
c = gl.Context()
c.set_current()
Let me know how it goes.
Alex.
It depends what functionality you're after. You can use Tkinter to
create the OpenGL context (for example, PyOpenGL contains a Tk
widget, or search "tkinter opengl" for more examples), then use
pyglet's gl, image, audio, video and font modules.
You will still need to handle events through Tkinter though, so won't
be able to make use of anything in pyglet.window.
Alternatively, you could use one or more separate pyglet windows in
the usual way in addition to the Tkinter GUI (which would be in its
own window).
Cheers
Alex.