Merge branch 'master' of https://github.com/erwincoumans/bullet3
This commit is contained in:
@@ -62,6 +62,28 @@ B3_SHARED_API struct UrdfRenderingInterface* getRenderInterface_eglRendererPlugi
|
||||
|
||||
|
||||
#ifdef EGL_ADD_PYTHON_INIT
|
||||
|
||||
static PyMethodDef eglMethods[] = {
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef moduledef = {
|
||||
PyModuleDef_HEAD_INIT, "eglRenderer", /* m_name */
|
||||
"eglRenderer for PyBullet "
|
||||
, /* m_doc */
|
||||
-1, /* m_size */
|
||||
eglMethods, /* m_methods */
|
||||
NULL, /* m_reload */
|
||||
NULL, /* m_traverse */
|
||||
NULL, /* m_clear */
|
||||
NULL, /* m_free */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
PyMODINIT_FUNC
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyInit_eglRenderer(void)
|
||||
@@ -69,8 +91,20 @@ PyInit_eglRenderer(void)
|
||||
initeglRenderer(void)
|
||||
#endif
|
||||
{
|
||||
|
||||
PyObject* m;
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
return 0;
|
||||
m = PyModule_Create(&moduledef);
|
||||
#else
|
||||
m = Py_InitModule3("eglRenderer", eglMethods, "eglRenderer for PyBullet");
|
||||
#endif
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
if (m == NULL) return m;
|
||||
#else
|
||||
if (m == NULL) return;
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
#endif //EGL_ADD_PYTHON_INIT
|
||||
|
||||
Reference in New Issue
Block a user