On 26/09/2007, at 4:41 AM, Dave LeCompte wrote:

> def onWindowResize(width,height):
>     print "window size",width,height
>     recalcMatrices()
>
> def recalcMatrices():
>     for w in allWindows:
>         print "resetting projection matrix for window",w.caption
>         glMatrixMode(GL_PROJECTION)
>         glLoadIdentity()
>         gluOrtho2D(-1,1,-1,1)
>         glMatrixMode(GL_MODELVIEW)
>         glLoadIdentity()
>
>
> w=window.Window(caption="resized", resizable=True)
> w.set_size(256,256)
> w.on_resize=onWindowResize

You've overridden the default on_resize handler, which is fine, but  
you'll need to call glViewport in addition to fixing the projection  
matrix (the default handler usually does this).

Alex.


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