But its not only newton geometry I'm having trouble with, I can't get bounding boxes to display around my AnimatedMeshX either. How would I use irrlicht+newton code to display this debugging information without using glBegin(GL_LINES) or anything other than irrlicht draw3Dbox and stuff like that.
Here is the code I'm using from the newton sdk tutorial 8:
void DebugShowGeometryCollision (const NewtonBody* body, int vertexCount, const dFloat* faceVertec, int id)
{
int i;
i = vertexCount - 1;
vector3df p0 (faceVertec[i * 3 + 0], faceVertec[i * 3 + 1], faceVertec[i * 3 + 2]);
for (i = 0; i < vertexCount; i ++) {
vector3df p1 (faceVertec[i * 3 + 0], faceVertec[i * 3 + 1], faceVertec[i * 3 + 2]);
vector3df (p0.X, p0.Y, p0.Z);
vector3df (p1.X, p1.Y, p1.Z);
p0 = p1;
}
}
And this final chunk of code is where I think I'm having the problem. I think that the lines are being generated but just aren't being drawn to the screen because I'm using openGL code (which I'm not very familiar with btw).void DebugShowBodyCollision(const NewtonBody* body){
NewtonBodyForEachPolygonDo(body, DebugShowGeometryCollision);
}
I am placing DebugShowCollision in my game loop just before my irrlicht driver->endScene();void DebugShowCollision ()
{
glDisable (GL_LIGHTING);
glDisable(GL_TEXTURE_2D);
glColor3f(1.0f, 1.0f, 0.0f);
glBegin(GL_LINES);
NewtonWorldForEachBodyDo (physics.getWorld(), DebugShowBodyCollision);
glColor3f(1.0f, 1.0f, 1.0f);
glEnd();
}
Is there a way to convert that openGL code to irrlicht code using the irrlicht driver (if that makes sense). For example: instead of glBegin(GL_LINES); theres something like driver->draw2Dline from irrlicht?
[/quote]