Hi,

I have an application where I want to render a text 90° rotated but it
looks like whatever I try as soon as I add a roatation, the text
disapears completly... I'm sure I miss something obvious, but I can't
figure out what it is.

I found a hint in a different post that I should add my rotation in th
eon_resize event handler, so here is what I came up with:

-----
import pyglet
from   pyglet import gl

w = pyglet.window.Window (640, 480)

label = pyglet.text.Label('Hello, world',
                          font_name='Times New Roman',
                          font_size=36,
                          x=0, y=0)
@w.event
def on_draw () :
    label.draw ()

def on_resize (width, height) :
    gl.glViewport(0, 0, width, height)
    gl.glMatrixMode(gl.GL_PROJECTION)
    gl.glLoadIdentity()
    gl.glOrtho(0, width, 0, height, -1, 1)
    #gl.glTranslatef (10, 0, 0)
    gl.glMatrixMode(gl.GL_MODELVIEW)
    #gl.glRotatef (-90, 1, 0, 0)
    #gl.glRotatef (-90, 0, 1, 0)
# end def on_resize
-----

It does not make a difference if I rotate the projection matrix or the
model view matrix, the text disapears in any case.

Any help would be really appreciated

Martin

P.S.: I really like pygelt and hope that you continue all the great
work.


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