False alarm; I needed to set my model and projection views properly. On Dec 6, 7:56 pm, Ryan <[email protected]> wrote: > Can anyone tell me why this works as expected: > ================================================== > import pyglet > from pyglet.gl import * > > if __name__ == "__main__": > > w = pyglet.window.Window() > glOrtho(0, w.width, w.height, 0, 0, 1) > i = pyglet.image.load("grass.png").get_image_data() > > i.blit(10, 10) > > pyglet.app.run() > ================================================== > > while this does not? (comes up blank): > ================================================== > import pyglet > from pyglet.gl import * > > if __name__ == "__main__": > > w = pyglet.window.Window() > glOrtho(0, w.width, w.height, 0, 0, 1) > i = pyglet.image.load("grass.png").get_image_data() > > @w.event > def on_draw(): > i.blit(10, 10) > return pyglet.event.EVENT_HANDLED > > pyglet.app.run()
-- 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.
