Created basic physics-based OpenGL menu dialog system, with toggle/text and slider control.
This commit is contained in:
@@ -1211,125 +1211,7 @@ void DemoApplication::renderme()
|
||||
#endif //USE_QUICKPROF
|
||||
|
||||
|
||||
sprintf(buf,"mouse to interact");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"ALT + mouse to move camera");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"space to reset");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"cursor keys and z,x to navigate");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"i to toggle simulation, s single step");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"q to quit");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,". to shoot box");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
// not yet hooked up again after refactoring...
|
||||
|
||||
sprintf(buf,"d to toggle deactivation");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
|
||||
sprintf(buf,"g to toggle mesh animation (ConcaveDemo)");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
|
||||
sprintf(buf,"h to toggle help text");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"o to toggle orthogonal/perspective view");
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
|
||||
//bool useBulletLCP = !(getDebugMode() & btIDebugDraw::DBG_DisableBulletLCP);
|
||||
//bool useCCD = (getDebugMode() & btIDebugDraw::DBG_EnableCCD);
|
||||
//glRasterPos3f(xOffset,yStart,0);
|
||||
//sprintf(buf,"1 CCD mode (adhoc) = %i",useCCD);
|
||||
//GLDebugDrawString(BMF_GetFont(BMF_kHelvetica10),buf);
|
||||
//yStart += yIncr;
|
||||
|
||||
|
||||
|
||||
sprintf(buf,"+- shooting speed = %10.2f",m_ShootBoxInitialSpeed);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
#ifdef SHOW_NUM_DEEP_PENETRATIONS
|
||||
|
||||
|
||||
sprintf(buf,"gNumDeepPenetrationChecks = %d",gNumDeepPenetrationChecks);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"gNumGjkChecks= %d",gNumGjkChecks);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"gNumClampedCcdMotions = %d",gNumClampedCcdMotions);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"gNumSplitImpulseRecoveries= %d",gNumSplitImpulseRecoveries);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"gNumAlignedAllocs = %d",gNumAlignedAllocs);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"gNumAlignedFree= %d",gNumAlignedFree);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
sprintf(buf,"# alloc-free = %d",gNumAlignedAllocs-gNumAlignedFree);
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
//enable BT_DEBUG_MEMORY_ALLOCATIONS define in Bullet/src/LinearMath/btAlignedAllocator.h for memory leak detection
|
||||
#ifdef BT_DEBUG_MEMORY_ALLOCATIONS
|
||||
glRasterPos3f(xOffset,yStart,0);
|
||||
sprintf(buf,"gTotalBytesAlignedAllocs = %d",gTotalBytesAlignedAllocs);
|
||||
GLDebugDrawString(BMF_GetFont(BMF_kHelvetica10),buf);
|
||||
yStart += yIncr;
|
||||
#endif //BT_DEBUG_MEMORY_ALLOCATIONS
|
||||
|
||||
if (getDynamicsWorld())
|
||||
{
|
||||
glRasterPos3f(xOffset,yStart,0);
|
||||
sprintf(buf,"# objects = %d",getDynamicsWorld()->getNumCollisionObjects());
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
glRasterPos3f(xOffset,yStart,0);
|
||||
sprintf(buf,"# pairs = %d",getDynamicsWorld()->getBroadphase()->getOverlappingPairCache()->getNumOverlappingPairs());
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
sprintf(buf,"# hitPos = %f,%f,%f",gHitPos.getX(),gHitPos.getY(),gHitPos.getZ());
|
||||
GLDebugDrawString(xOffset,yStart,buf);
|
||||
yStart += yIncr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif //SHOW_NUM_DEEP_PENETRATIONS
|
||||
|
||||
resetPerspectiveProjection();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user