Some toolkits can provide an opengl widget.  Gtk does have one, but it
is an add on, so it would require an extra dependancy.

Gui toolkits provide something called sockets and plugs;  if you can
get the window id of a pyglet window, you could have a socket widget
"swallow" the window (thus drawing turning the pyglet window into a
gtk widget).  Gtk and QT can both do this, though this probably
introduces some portability problems;  I do not know if this works in
osx or windows.

A more important problem in combining toolkits is processing events;
most toolkits have an event loop that blocks, but you often can call
one or two methods that manually check for updates;  alternatively,
you can probably use a "time out" event to call your rendering methods
for opengl from the toolkit.

The problem with either scenario is timing;  if you use the normal
timing method  for one, the other doesn't behave quite like you'd
normally expect.


Its a huge hack either way.  The best thing to use would be a toolkit
thats drawn via opengl;  pyglet can spawn multiple windows, so it
would be a pretty nice for that.

But;  I don't know of any such thing so far?  (I'm working on such a
thing for the reasons above, but its not anywhere near complete enough
to be usefull)


On Feb 1, 2008 3:21 PM, Gary Herron <[EMAIL PROTECTED]> wrote:
>
>
>
> On Feb 1, 2:32 am, simpsus_science <[EMAIL PROTECTED]> wrote:
> > Hallo,
> >
> > i would like to code a little application that features a pyglet area
> > in the centre and some menus at the top as well as some buttons and
> > other widgets on the side of the window.
> > My question therefore is:
> > is there a way to combine a pyglet window with a standard one (like
> > the one i can create using eg glade).
> > ideally i would like to be able to include the pyglet window as a
> > widget inside a normal python window to get to stuff like menu bar and
> > gtk borders and so on for free.
> >
> > is there anyone who can help me?
> >
> > thanks a lot in advance!
> >
> > Bastian
>
> It *is* possible to use some other system to open an OpenGL window and
> provide the whole GUI experience (menus, dialogs, toolbars, and event
> loop), but use the OpenGL portions of pyglet to manipulate the OpenGL
> window.  This could work with many GUI toolkits -- GLUT, GTK+,
> FLTK, ...
> .   This however, is quite far from what you are asking.
>
> If what you want is pyglet opening the window and providing the event
> loop, and then some other system providing the widgets/menus/
> dialogs/...
> on that window, then I too would like to see if someone else can
> provide an answer.
>
>
> >
>



-- 
This email message is public domain.  Have a nice day! ^_^

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to