Closed GoogleCodeExporter closed 9 years ago
after this I receive:
Traceback (most recent call last):
File "D:/python/mygame/izom_shooter_v 0.01/test_anim.py", line 8, in <module>
window = pyglet.window.Window()
File "C:\Python33\lib\site-packages\pyglet\window\win32\__init__.py", line 131, in __init__
super(Win32Window, self).__init__(*args, **kwargs)
File "C:\Python33\lib\site-packages\pyglet\window\__init__.py", line 558, in __init__
self._create()
File "C:\Python33\lib\site-packages\pyglet\window\win32\__init__.py", line 261, in _create
self.context.attach(self.canvas)
File "C:\Python33\lib\site-packages\pyglet\gl\win32.py", line 263, in attach
super(Win32ARBContext, self).attach(canvas)
File "C:\Python33\lib\site-packages\pyglet\gl\win32.py", line 208, in attach
raise gl.ContextException('Unable to share contexts')
pyglet.gl.ContextException: Unable to share contexts
Original comment by ryhor2...@gmail.com
on 29 Aug 2013 at 6:55
IT DOESNT WORK
import sys
import pyglet
if len(sys.argv) > 1:
# Load the animation from file path.
animation = pyglet.image.load_animation(sys.argv[1])
bin = pyglet.image.atlas.TextureBin()
animation.add_to_texture_bin(bin)
else:
# Load animation from resource (this script's directory).
animation = pyglet.resource.animation('dinosaur.gif')
sprite = pyglet.sprite.Sprite(animation)
window = pyglet.window.Window(width=sprite.width, height=sprite.height)
# Set window background color to white.
pyglet.gl.glClearColor(1, 1, 1, 1)
@window.event
def on_draw():
window.clear()
sprite.draw()
pyglet.app.run()
IT WORKS
import sys
import pyglet
window = pyglet.window.Window()
if len(sys.argv) > 1:
# Load the animation from file path.
animation = pyglet.image.load_animation(sys.argv[1])
bin = pyglet.image.atlas.TextureBin()
animation.add_to_texture_bin(bin)
else:
# Load animation from resource (this script's directory).
animation = pyglet.resource.animation('dinosaur.gif')
sprite = pyglet.sprite.Sprite(animation)
#window = pyglet.window.Window(width=sprite.width, height=sprite.height)
# Set window background color to white.
pyglet.gl.glClearColor(1, 1, 1, 1)
@window.event
def on_draw():
window.clear()
sprite.draw()
pyglet.app.run()
Original comment by ryhor2...@gmail.com
on 29 Aug 2013 at 7:43
That is another issue I think. Maybe you wish to make another thread for it.
Original comment by nejdetyu...@gmail.com
on 29 Aug 2013 at 7:49
This issue was closed by revision baae6642b575.
Original comment by useboxnet
on 21 Sep 2013 at 9:51
Please open a new issue for what you commented on #1.
Thanks a lot for your patch!
Original comment by useboxnet
on 21 Sep 2013 at 9:52
Issue 601 has been merged into this issue.
Original comment by useboxnet
on 1 Dec 2013 at 9:00
Original issue reported on code.google.com by
nejdetyu...@gmail.com
on 27 Jun 2013 at 8:21