Hello Sinan, Le jeudi 4 juillet 2013 01:29:16, Sinan Hassani a écrit : > So I'm creating a plug-in that uses BGE's interface to run an external > game engine (Urho3D). I add custom buttons to BGE and implement my own > draw functions. > > However when I launch the engine, I get an error: > > ERROR: Could not open window > > I'm using Python's "subprocess.Popen" to launch the engine, and I've > even tried os.system, and other similar python functions and methods > (like executing a .sh script directly for example).
When you use subprocess, there are no OpenGL context involved because Python will create an external process. Maybe you have just a tiny error in Popen usage (like shell=True option missing) or a misconfigured DISPLAY environment variable. I've just try the following lines in blender console and the following worked for me: from subprocess import call call(["glxgears"]) > Urho3D uses SDL 2.0 to create a window and opengl context on Linux, and > it looks like it doesn't like to launch from within Blender. If I launch > it from a shell script it runs fine. > > So for the time being I get Blender to prepare the shell script, but I > have to go to a file manager or xterm to launch the engine. > > To fix this, is this something where the code has to be changed on the > game engine side or is it something that has to be supported by Blender? > > Can Blender support multiple OpenGL Windows? I'm pretty sure it works > for GameKit, why not an SDL 2.0 application? I don't think the Blender's OpenGL context is involved in any way when using subprocess.Popen . Cheers, -- Kevin Roy http://blog.knokorpo.fr - KnoKorpo _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
