On Tue, Apr 2, 2013 at 12:31 PM, <[email protected]> wrote:
> Here is a script which demonstrates the problem.
> If you try importing at position ONE it gives the 'Unable to share
> contexts' error.
> If you try importing at either of the position TWOs, everything works fine.
>
> from cocos.director import director
>> import cocos.layer
>> #import cocos.particle_systems #ONE
>>
>
>
> class Layer(cocos.layer.Layer):
>> def __init__(self):
>> super(Layer, self).__init__()
>> #import cocos.particle_systems #TWO
>>
>
>
> if __name__ == '__main__':
>> director.init()
>> #import cocos.particle_systems #TWO
>> director.run(cocos.scene.Scene(Layer()))
>
> --
>
Results with ati gpu:
(Runs ok meant no tracebacks and an empty windows appears.)
1st run : all imports commented out. Runs ok.
2nd run : uncomment only ONE. Runs ok.
3rd run : uncomment only the first TWO. Runs Ok
4th run : uncomment only the second TWO. Runs ok.
Same results with an intel 945G gpu (with driver that can handle sharing
GL contexts)
Tested both with pyglet 1.1.4 and pyglet 1.2dev updated from repo today.
I would expect all the four cases to crash if sharing Open GL contexts are
not supported by your gpu drivers, (because by default pyglet builds a
hidden window that will share context with all the windows created by
pyglet window.Window)
Can you run the same four cases, from a fresh copy-pasted scrip and report
success / failure for each run and include all the traceback for each
failure ?
And, just to be sure, you are not setting any pyglet options as
environment variables ?
To narrow the issue, could you try the following script
import pyglet
#from pyglet.gl import * # ONE
window = pyglet.window.Window()
#from pyglet.gl import * # TWO
@window.event
def on_draw():
window.clear()
pyglet.app.run()
( try with the code as-is, then uncommenting only the # ONE line, then
uncommenting only the # TWO line)
--
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.