PyBullet setup.py: only enable BT_USE_EGL on Linux, but allow to run the eglPlugin on Windows and Mac as well (using their default opengl window).

postpone the 'loadPlugin' for static eglPlugin, so that the init and exit happen in the same thread.
When you don't call unloadPlugin, the program may crash when exiting in SHARED_MEMORY_SERVER mode.
This commit is contained in:
erwincoumans
2018-09-09 21:08:47 -07:00
parent 2744e84592
commit 9698c3d600
6 changed files with 59 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ class b3PluginManager
void tickPlugins(double timeStep, b3PluginManagerTickMode tickMode);
int registerStaticLinkedPlugin(const char* pluginPath, PFN_INIT initFunc, PFN_EXIT exitFunc, PFN_EXECUTE executeCommandFunc, PFN_TICK preTickFunc, PFN_TICK postTickFunc, PFN_GET_RENDER_INTERFACE getRendererFunc, PFN_TICK processClientCommandsFunc);
int registerStaticLinkedPlugin(const char* pluginPath, PFN_INIT initFunc, PFN_EXIT exitFunc, PFN_EXECUTE executeCommandFunc, PFN_TICK preTickFunc, PFN_TICK postTickFunc, PFN_GET_RENDER_INTERFACE getRendererFunc, PFN_TICK processClientCommandsFunc, bool initPlugin=true);
void selectPluginRenderer(int pluginUniqueId);
UrdfRenderingInterface* getRenderInterface();
};