Hi guys,

Looking for feedback on this. Currently, the default Window.on_resize 
method sets the a default orthographic GL projection.
As a way to make this easily plugable, there will be a new 
`pyglet.window.Projection` base class, and two default projection classes:  
`pyglet.window.Projection2D` and `pyglet.window.Projection3D`. The 
Projection classes have a `set` method, which is called by 
Window.on_resize, providing a small abstraction.

The Window will have a default Window.projection attribute, which is an 
instance of `Projection2D`. You can set Window.projection to whatever you 
want, whether a default or custom projection class.

window = pyglet.window.Window(resizable=True)
window.projection = pyglet.window.Projection3D()


Does this look like a reasonable way to do things? It should be fairly 
flexible. The Projection3D class, for instance can take optional fov, znear 
and zfar parameters. Users would also be free to create whatever custom 
projections they might want, and swap them when desired. 

-Ben

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to