updated demos -> ALT + mouse uses Maya-style controls, replaced BMF_Fonts by GLDebugFont

fix debug drawing of btMultiSphereShape
added box2d demo
added experimental gpu 2d demo
This commit is contained in:
erwin.coumans
2009-05-09 19:27:14 +00:00
parent 7a210546cf
commit 33029ad996
129 changed files with 8576 additions and 2184 deletions

View File

@@ -22,11 +22,10 @@ subject to the following restrictions:
#include "LinearMath/btDefaultMotionState.h"
#include "BulletCollision/Gimpact/btGImpactShape.h"
#include "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h"
#include "GLDebugFont.h"
#include "BMF_Api.h"
#include "GLDebugDrawer.h"
#include "GL_ShapeDrawer.h"
@@ -1552,69 +1551,68 @@ void ConcaveDemo::renderme()
setOrthographicProjection();
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"mouse to interact");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
/* glRasterPos3f(xOffset,yStart,0);
/* glRasterPos3f(xOffset,xOffset,0);
sprintf(buf,"space to reset");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
*/
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"cursor keys and z,x to navigate");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"i to toggle simulation, s single step");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"q to quit");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,". to shoot TRIMESH (dot)");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
// not yet hooked up again after refactoring...
/* glRasterPos3f(xOffset,yStart,0);
/* glRasterPos3f(xOffset,xOffset,0);
sprintf(buf,"d to toggle deactivation");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
*/
/*
glRasterPos3f(xOffset,yStart,0);
glRasterPos3f(xOffset,xOffset,0);
sprintf(buf,"a to draw temporal AABBs");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
*/
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"h to toggle help text");
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
//bool useBulletLCP = !(getDebugMode() & btIDebugDraw::DBG_DisableBulletLCP);
bool useCCD = ((getDebugMode() & btIDebugDraw::DBG_EnableCCD) != 0);
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"1 CCD mode (adhoc) = %i",useCCD);
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
glRasterPos3f(xOffset,yStart,0);
sprintf(buf,"1 CCD mode (adhoc) = %i",useCCD);
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
sprintf(buf,"+- shooting speed = %10.2f",m_ShootBoxInitialSpeed);
BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),buf);
yStart += yIncr;
GLDebugDrawString(xOffset,xOffset,buf);
xOffset += yIncr;
resetPerspectiveProjection();