When you minimize (or hide), Window.height and width are 0.
That zero division will be elsewhere.

----- Original Message ----- 
From: "Abdul" <[EMAIL PROTECTED]>
To: "pyglet-users" <[email protected]>
Sent: Monday, February 18, 2008 10:14 PM
Subject: Re: CoverFlow like sample program


>
> I almost forgot to submit another bug/glitch I found (sorry if It's
> already been discussed)
>
> When I iconize the running application (coverflow.py) a ZeroDivion
> exception is raised.
>
> I edited the change_projection function with this:
>
> def change_projection(bParallel, width, height):
>    if (width != 0 and height != 0):
>      glMatrixMode (GL_PROJECTION)
>      glLoadIdentity ()
>      if bParallel:
>          glOrtho (-width / 2, width / 2, -height / 2, height / 2,
> Z_NEAR, Z_FAR)
>      else:
>          gluPerspective (2.0 * FOVY, float(width) / height, Z_NEAR,
> Z_FAR)
>      glMatrixMode(GL_MODELVIEW)
>
> Maybe there is a better way :P
> >
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.20.7/1285 - Release Date: 
> 18/02/2008 5:50
>
> 


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