From cfc7917586c0b785182f4e72184b8cc071a3e12b Mon Sep 17 00:00:00 2001 From: yunfeibai Date: Tue, 18 Jul 2017 13:52:29 -0700 Subject: [PATCH] Add init function and module for pybullet with EGL. --- examples/pybullet/pybullet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index aba9c69c2..a4c9549de 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -7224,14 +7224,22 @@ PyMODINIT_FUNC #if PY_MAJOR_VERSION >= 3 PyInit_pybullet(void) #else +#ifdef BT_USE_EGL +initpybullet_egl(void) +#else initpybullet(void) +#endif //BT_USE_EGL #endif { PyObject* m; #if PY_MAJOR_VERSION >= 3 m = PyModule_Create(&moduledef); +#else +#ifdef BT_USE_EGL + m = Py_InitModule3("pybullet_egl", SpamMethods, "Python bindings for Bullet"); #else m = Py_InitModule3("pybullet", SpamMethods, "Python bindings for Bullet"); +#endif //BT_USE_EGL #endif #if PY_MAJOR_VERSION >= 3