Hello,
On my laptop when trying to launch this minimal code
import pyglet
pic = pyglet.image.load('image1.png',
file=pyglet.resource.file('image1.png'))
texture = pic.get_texture()
window = pyglet.window.Window()
@window.event
def on_draw():
window.clear()
pyglet.app.run()
I get this error message: pyglet.gl.ContextException: Unable to share
contexts with this stack trace:
Traceback (most recent call last):
File "test.py", line 9, in <module>
window = pyglet.window.Window()
File
"C:\Python27\lib\site-packages\pyglet-1.2.0rc3-py2.7.egg\pyglet\window\win32\__init__.py",
line 131, in __init__
super(Win32Window, self).__init__(*args, **kwargs)
File
"C:\Python27\lib\site-packages\pyglet-1.2.0rc3-py2.7.egg\pyglet\window\__init__.py",
line 559, in __init__
self._create()
File
"C:\Python27\lib\site-packages\pyglet-1.2.0rc3-py2.7.egg\pyglet\window\win32\__init__.py",
line 261, in _create
self.context.attach(self.canvas)
File
"C:\Python27\lib\site-packages\pyglet-1.2.0rc3-py2.7.egg\pyglet\gl\win32.py",
line 263, in attach
super(Win32ARBContext, self).attach(canvas)
File
"C:\Python27\lib\site-packages\pyglet-1.2.0rc3-py2.7.egg\pyglet\gl\win32.py",
line 208, in attach
raise gl.ContextException('Unable to share contexts')
pyglet.gl.ContextException: Unable to share contexts
If I create the window before the texture = pic.get_texture(), it works
correctly. I cannot reproduce this error on my desktop.
I believe this comes from
pyglet\image\__init__.py(1502)create()
id = GLuint()
which (I'm guessing here) is creating a context. So when trying to create
the window, we have more than one OpenGL context and it throws an exception
with my video card driver.
Should I post this in the Bitbucket Issues section?
Daniel.
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.