Some changes in rendering, to get shadows for trimeshes

Add dynamic aabb tree (btDbvt) optimization for btCompoundShape/btCompoundCollisionAlgorithm
Add btTransformAabb util, todo: deploy it throughout the codebase
This commit is contained in:
erwin.coumans
2008-09-10 05:20:04 +00:00
parent aad1d574ef
commit 93d1d24234
10 changed files with 773 additions and 572 deletions

View File

@@ -166,7 +166,7 @@ void OGL_displaylist_register_shape(btCollisionShape * shape)
glNewList(dlist.m_dlist,GL_COMPILE);
glEnable(GL_CULL_FACE);
// glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
@@ -177,7 +177,7 @@ void OGL_displaylist_register_shape(btCollisionShape * shape)
concaveMesh->processAllTriangles(&drawCallback,aabbMin,aabbMax);
}
glDisable(GL_CULL_FACE);
// glDisable(GL_CULL_FACE);
glEndList();
}
@@ -237,12 +237,16 @@ public:
} else
{
glBegin(GL_TRIANGLES);
glColor3f(1, 1, 1);
//glColor3f(1, 1, 1);
glVertex3d(triangle[0].getX(), triangle[0].getY(), triangle[0].getZ());
//glColor3f(0, 1, 0);
glVertex3d(triangle[1].getX(), triangle[1].getY(), triangle[1].getZ());
//glColor3f(0, 0, 1);
glVertex3d(triangle[2].getX(), triangle[2].getY(), triangle[2].getZ());
glVertex3d(triangle[2].getX(), triangle[2].getY(), triangle[2].getZ());
glVertex3d(triangle[1].getX(), triangle[1].getY(), triangle[1].getZ());
glVertex3d(triangle[0].getX(), triangle[0].getY(), triangle[0].getZ());
glEnd();
}
}