diff --git a/examples/Importers/ImportSTLDemo/LoadMeshFromSTL.h b/examples/Importers/ImportSTLDemo/LoadMeshFromSTL.h index f670dfeec..65bdd330b 100644 --- a/examples/Importers/ImportSTLDemo/LoadMeshFromSTL.h +++ b/examples/Importers/ImportSTLDemo/LoadMeshFromSTL.h @@ -66,17 +66,18 @@ static GLInstanceGraphicsShape* LoadMeshFromSTL(const char* relativeFileName) for (int i=0;ivertex0[v]; - v1.xyzw[v] = tri->vertex1[v]; - v2.xyzw[v] = tri->vertex2[v]; - v0.normal[v] = v1.normal[v] = v2.normal[v] = tri->normal[v]; + v0.xyzw[v] = tmp.vertex0[v]; + v1.xyzw[v] = tmp.vertex1[v]; + v2.xyzw[v] = tmp.vertex2[v]; + v0.normal[v] = v1.normal[v] = v2.normal[v] = tmp.normal[v]; } v0.xyzw[3] = v1.xyzw[3] = v2.xyzw[3] = 0.f; diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 9235f3e5a..2a3545bb3 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -9,6 +9,12 @@ #include #endif + +#if PY_MAJOR_VERSION >= 3 +#define PyInt_FromLong PyLong_FromLong +#define PyString_FromString PyBytes_FromString +#endif + enum eCONNECT_METHOD { eCONNECT_GUI=1, @@ -769,7 +775,6 @@ pybullet_getJointInfo(PyObject* self, PyObject* args) // info.m_flags, // info.m_jointDamping, // info.m_jointFriction); - PyTuple_SetItem(pyListJointInfo, 0, PyInt_FromLong(info.m_jointIndex)); PyTuple_SetItem(pyListJointInfo, 1, @@ -786,7 +791,6 @@ pybullet_getJointInfo(PyObject* self, PyObject* args) PyFloat_FromDouble(info.m_jointDamping)); PyTuple_SetItem(pyListJointInfo, 7, PyFloat_FromDouble(info.m_jointFriction)); - return pyListJointInfo; } }