On Feb 11, 10:39 am, Philippe <philippe.cr...@gmail
> I have a large scene of 1600x1200 (in a window of same size) and then
> wants to display a window of 800x600 of the middle of my scene (crop
> the scene to 800x600).
> Is it possible ?
> or do I have to shift the position of all my sprites ?

I think the description of what you want to do is a bit garbled.
Pyglets default view setup is with 0,0 at the bottom left and the
orthographic projection extending to encompass the width/height of the
viewport which covers the window. This is a fairly usual setup for
orthographic projections (though most people choose 0,0 to be on the
topleft). For instance, a usual setup for perspective projections is
with 0,0 in the middle, going to 1,1 in the bottom right and -1,-1 in
the topleft.

If you want a different projection you can use glOrtho or gluOrtho2D
(both deprecated under OpenGL3) to setup whatever projection you
prefer. If you're an OpenGL3 strict fanatic you'll simply have to
compute the view matrix yourself and pass it in as shader uniform
matrix.

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