G'day,
I searched the FAQ and this list for my problem, and haven't found
anything. I apologise in advance if this problem has been reported/
solved before.
I am writing a simple application to display a grid of images, and I
am trying to get it to support resizing. However any time I add a
on_resize event handler, all I get is a blackscreen.
For example:
def test(w,h):
pass
win = window.Window(resizable=True)
win.on_resize = test
That will break my application. Commenting out the win.on_resize=test
line will "unbreak" it. My render loop is :
while not win.has_exit:
win.dispatch_events()
glClear(GL_COLOR_BUFFER_BIT)
x = 0
y = yoffset
drawn = 0
for image in images.values():
img = image[0]
r = img.get_region(x=img.width/2-config.crop_size/2,
y=img.height/2-
config.crop_size/2, width=config.crop_size, height=config.crop_size)
r.blit(x,y)
drawn+=1
y-=config.crop_size
if drawn % rows == 0:
x+=config.crop_size
y = yoffset
win.flip()
I am at a lost as to why this is happening.
My environment is python 2.5 from macpython, and uname -a is:
Darwin solaris.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23
16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
Running pyglet-1.0alpha2
Cheers,
Steve
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---