Very amusing.
There's no simple cure? That's slightly mind-boggling. Every tool has
its quirks, but I've not seen before the kind of balls it takes to
blandly ignore a near-universal standard like this.
I suppose I can carry on what I'm doing, which is flipping every
sprite's y co-ordinate before drawing it and putting it back after,
but that's like a joke.
On Oct 10, 5:30 pm, "Nathan Whitehead" <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 9, 2008 at 11:04 PM, [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]> wrote:
> > ...
> > There must be simple gl command I can put somewhere to flip the co-
> > ordinates, right? I can hardly be the first person to run up against
> > this...
>
> Here's what I do:
>
> # Set default projection to use upper left as origin
> pyglet.gl.glMatrixMode(pyglet.gl.GL_PROJECTION)
> pyglet.gl.glLoadIdentity()
> pyglet.gl.glOrtho(0.0, 1024.0, 768.0, 0.0, -1.0, 1.0)
> pyglet.gl.glMatrixMode(pyglet.gl.GL_MODELVIEW)
> pyglet.gl.glLoadIdentity()
>
> This makes 0,0 the upper left corner of the screen and 1024, 768 the
> bottom right corner. But if you're thinking that this is what you
> want, you should consider what will happen! If you use any function
> that is not expecting this, it will draw upside down. For example,
> try drawing some text using:
>
> label = pyglet.text.Label('Hello, world',
> font_name='Times New Roman',
> font_size=36,
> x=window.width//2, y=window.height//2,
> anchor_x='center', anchor_y='center')
> label.draw()
>
> It will come out beautifully rendered in the right location, but
> reflected upside down.
> --
> Nathan Whitehead
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---