It is possible to make your own on_resize function that uses the top-right
corner as the origin - it's simply a matter of OpenGL projection matrix.

You'll want something like this...
@window.event
def on_resize(width, height):
  glViewport(0, 0, width, height)
  glMatrixMode(GL_PROJECTION)
  glLoadIdentity()
  glOrtho(0, width, height, 0, 0.1, 1000)

Not tested but I think it should be right.


On 7 December 2012 15:03, anatoly techtonik <[email protected]> wrote:

> I've noticed that pyglet uses bottom left corner as (0,0) origin. This
> creates problems with code ported from pygame, processing and other
> applications from 2D graphics world where things are traditionally drawn
> from top to bottom.
>
> Is it possible to define a pyglet mode, where Y axes starts from the top?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pyglet-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/pyglet-users/-/Z3dg_5_mx6AJ.
> 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.
>

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