pyglet ui toolkit (maybe a mini-sprint here at pycon?)

128 views
Skip to first unread message

James Turk

unread,
Mar 15, 2008, 12:30:26 PM3/15/08
to pyglet-users
So I'm fairly new to pyglet but have a lot of Python experience as
well as a good deal of experience developing GL libraries in C++.

Pyglet is great, although as far as I could see from the planned
features list there isn't any plan to do a pyglet.ui

Some simple widgets for use in games/gl apps would be nice and I'd be
happy to take the opportunity here at PyCon to meet with people to
brainstorm and maybe lay the foundations on some code. If Alex/others
have a strong opinion that this should/shouldn't be part of pyglet it
could also be a related project.

Juan Jose Alonso

unread,
Mar 16, 2008, 7:55:26 PM3/16/08
to pyglet-users
Amazing !

The pyglet user want a GUI module with the pyglet power and the django
customization power :^P

Happy hacking!

Peter Wang

unread,
Mar 17, 2008, 2:58:17 PM3/17/08
to pyglet...@googlegroups.com
On Sat, Mar 15, 2008 at 11:30 AM, James Turk <james....@gmail.com> wrote:
> Pyglet is great, although as far as I could see from the planned
> features list there isn't any plan to do a pyglet.ui
>
> Some simple widgets for use in games/gl apps would be nice and I'd be
> happy to take the opportunity here at PyCon to meet with people to
> brainstorm and maybe lay the foundations on some code. If Alex/others
> have a strong opinion that this should/shouldn't be part of pyglet it
> could also be a related project.

Hi James,

How extensive of a widget library were you thinking? Do you plan on
implementing standalone widgets like combo and list boxes, single- and
multi-line text controls, buttons, etc., or were you planning on
having a framework for grouping these widgets into a dialog and simple
dialog management?

I am very interested in this because pyglet/gl is one of the backends
for the Chaco plotting toolkit, and it would wonderful to be able to
embed widgets directly into our plots so users don't have to twiddle
an external wx- or qt-based dialog.


-Peter

Richard Jones

unread,
Mar 17, 2008, 3:26:20 PM3/17/08
to pyglet...@googlegroups.com
The pyglet repository has contrib/wydget which is a pretty comprehensive widget toolkit.

I stopped developing it last year when I changed jobs, and I believe development shouldn't restart because the fundamental approach I was taking was wrong.

I believe that anyone looking to develop a GUI toolkit with pyglet in mind should get really comfortable with the pyglet event system and overall design patterns before starting.

For a sample of what I'm talking about, see http://groups.google.com/group/pyglet-users/web/simple-menu-class which is a popup menu that could be integrated into pretty much any pyglet application. A GUI library allowing arbitrary use of the widgets would be quite nice, I think.


     Richard

Txema Vicente

unread,
Mar 17, 2008, 6:31:39 PM3/17/08
to pyglet...@googlegroups.com
> I believe that anyone looking to develop a GUI toolkit with pyglet in mind should get really comfortable
> with the pyglet event system and overall design patterns before starting.
Yes, I do totally agree with that. Such a work can be a great waste of time if it is not well designed from the beginning. As we are talking about a game/multimedia library, I think the target developers will not adapt a new monolithic framework. In my opinion a GUI system has to be an extension module, to keep pyglet clean.
 
Pyglet provides the base, and it is not hard to develop simple GUIs, but a generic GUI system should be constructed on a very well planned layer structure. The first thing that we should have is a flexible layout module, providing a good widget base class. The next step is a openGL widget class,  but here comes the style problem, I mean, how would you like your widgets to be drawn.
 
I have done a openGL widget system on my own, that works for my needs. And that is the key, it is very useful for me, but useless for others. Im very interested in defining a good layout module, and a generic API for an openGL-widget system. 
 
Its name is EDN, If you want to give it a try, I just took a piece of it and uploaded a quick & dirty demo:
 
I will wait to pyglet 1.1 to rewrite the code and translate all to english, if you find this useful.
 
 
 

Juan Jose Alonso

unread,
Mar 18, 2008, 9:16:44 AM3/18/08
to pyglet-users
File "C:\Python25\Lib\site-packages\pyglet\window\__init__.py", line
310, in g
et_best_config
raise NoSuchConfigException()
pyglet.window.NoSuchConfigException


:(

Richard Jones

unread,
Mar 18, 2008, 10:37:55 AM3/18/08
to pyglet...@googlegroups.com
On Tue, Mar 18, 2008 at 8:16 AM, Juan Jose Alonso <kernel....@gmail.com> wrote:

 File "C:\Python25\Lib\site-packages\pyglet\window\__init__.py", line
310, in g
et_best_config
   raise NoSuchConfigException()
pyglet.window.NoSuchConfigException

What sort of system are you on? pyglet supports Windows, OS X and Linux (with either Mesa or hardware drivers installed).


     Richard
 

Richard Jones

unread,
Mar 18, 2008, 10:39:03 AM3/18/08
to pyglet...@googlegroups.com

Darn, clearly you're on some sort of DOS-based system (<wink>) so make sure you have the latest drivers for your 3D hardware installed.


     Richard


Txema Vicente

unread,
Mar 18, 2008, 10:48:21 AM3/18/08
to pyglet...@googlegroups.com
Mm. This is going off-thread.
 
edn/pantalla.py
-template = Config(sample_buffers=1, samples=4,alpha_size=8,double_buffer=True)
+template = Config()
 
ok, patched and uploaded again.
 
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages