Laurent wrote:

> Hi,
> 
> here is the context:
> 
> I'm coding a openGL API I will need for a project for my school.
> This API is quite simple:
> 
> an ooglScene describe all needed to make an openGL, and inherits from a
> list. So an ooglScene is fundamentaly a list of ooglObjects (which is
> organised as a Composite Pattern).
> 
> ooglScene.run() do everthing needed to initialise GL and GLUT, and then
> launch the GLUT Main Loop.
> (the display function I wrote juste call the display method of each
> ooglObject in the ooglScene)
> 
> Here is the problem!
> 
> Once the GLUT Main Loop is launched, I cannot add other ooglObjects to
> my ooglScene, neither modify any existing ooglObject in my scene!

Do that in the registered event-functions. For example, keyboard(). After
all, the user must somehow trigger the need for inserting objects or
otherwise manipulating the scene. And that she does with either mouse or
keyboard. I bet there is a mouse-callback, too.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to