coordinates problem

28 views
Skip to first unread message

Crazralfrill

unread,
Oct 1, 2011, 4:35:51 PM10/1/11
to Rabbyt
Hi,

I'm migrating my game to rabbyt+pygame to rabbyt+pyglet.

With pygame, my origin were in the top left corner.

But when I use pyglet, my origin is at the bottom left corner.

I used this :
viewport = (800, 600)
projection = (0, 0, 800, 600)
rabbyt.set_viewport(viewport, projection=projection)


Is there a problem with set_viewport projection with pyglet? Or maybe
I don't understand how it works.


And an other subject : what fast gui framework do you suggest me to
use with rabbyt?

Thanks.

Matthew Marshall

unread,
Oct 2, 2011, 2:34:18 PM10/2/11
to rab...@googlegroups.com
Underneath, rabbyt.set_viewport just calls the opengl function
glViewport. My guess is that pyglet is also calling glViewport at a
later point, overwriting the values set when you called
rabbyt.set_viewport.

Try calling rabbyt.set_viewport at the beginning of each frame.

MWM

> --
> You received this message because you are subscribed to the Google Groups "Rabbyt" group.
> To post to this group, send email to rab...@googlegroups.com.
> To unsubscribe from this group, send email to rabbyt+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rabbyt?hl=en.
>
>

Crazralfrill

unread,
Oct 4, 2011, 11:48:42 AM10/4/11
to Rabbyt
Thanks! You were right! Unfortunately, changing the viewport mess with
pyglet rendering, and I don't want to change the viewport multiple
times to handle that, so I decided to stick with pyglet coordinates
and remake somes parts of my work.

But thanks again anyway.
Reply all
Reply to author
Forward
0 new messages