On Mon, Apr 1, 2013 at 2:21 PM, <[email protected]> wrote:
> I don't understand why the particle systems module would cause such a
> failure. Everything works fine if I don't import this module.
Really ?
Here is the traceback you posted before:
Traceback (most recent call last):
File "run_game.py", line 10, in <module>
main.main()
File "main.py", line 211, in main
director.init(width=1280, height=720, caption="Planet Eater")
File
"C:\Python27\lib\site-packages\cocos2d-0.5.5-py2.7.egg\cocos\director.py",
line 295, in init
self.window = window.Window( *args, **kwargs )
File "C:\Python27\lib\site-packages\pyglet\window\win32\__init__.py", line
131, in __init__
super(Win32Window, self).__init__(*args, **kwargs)
File "C:\Python27\lib\site-packages\pyglet\window\__init__.py", line 559,
in __init__
self._create()
File "C:\Python27\lib\site-packages\pyglet\window\win32\__init__.py", line
261, in _create
self.context.attach(self.canvas)
File "C:\Python27\lib\site-packages\pyglet\gl\win32.py", line 263, in attach
super(Win32ARBContext, self).attach(canvas)
File "C:\Python27\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
It tells that your prog started in run_game.py , which imports a module
main, then calls main.main() , which calls (cocos) director.init which
tries to instantiate a window trough pyglet window.Window which explodes
when it can't create an Open GL shared context.
No particles involved here.
>
> I am running on Intel I7 and have very recent drivers for my graphics card
> (although I don't think the dedicated graphics card is being used by the
> program).
>
>
>
When I try your suggestion I have the error:
>
> Traceback (most recent call last):
>> File "run_game.py", line 7, in <module>
>> import main
>> File "main.py", line 15, in <module>
>> import cocos.particle_systems
>> File
>> "C:\Python27\lib\site-packages\cocos2d-0.5.5-py2.7.egg\cocos\particle_systems.py",
>> line 38, in <module>
>> from particle import ParticleSystem, Color
>> File
>> "C:\Python27\lib\site-packages\cocos2d-0.5.5-py2.7.egg\cocos\particle.py",
>> line 92, in <module>
>> class ParticleSystem( CocosNode ):
>> File
>> "C:\Python27\lib\site-packages\cocos2d-0.5.5-py2.7.egg\cocos\particle.py",
>> line 167, in ParticleSystem
>> texture = pic.get_texture()
>> File "C:\Python27\lib\site-packages\pyglet\image\__init__.py", line
>> 801, in get_texture
>> force_rectangle)
>> File "C:\Python27\lib\site-packages\pyglet\image\__init__.py", line
>> 786, in create_texture
>> rectangle, force_rectangle)
>> File "C:\Python27\lib\site-packages\pyglet\image\__init__.py", line
>> 1486, in create
>> glGenTextures(1, byref(id))
>> File "C:\Python27\lib\site-packages\pyglet\gl\lib.py", line 100, in
>> errcheck
>> raise GLException('No GL context; create a Window first')
>> pyglet.gl.lib.GLException: No GL context; create a Window first
>
> --
>
>
This sounds as importing cocos particles before the window creation. Are
you sure the call to director.init is before your import of
cocos.particle_system ?
Can you post a short script that demostrates the problem ?
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" 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/cocos-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.