| 816 | } |
| 817 | |
| 818 | void CommonRigidBodyMTBase::drawScreenText() |
| 819 | { |
| 820 | char msg[1024]; |
| 821 | int xCoord = 400; |
| 822 | int yCoord = 30; |
| 823 | int yStep = 30; |
| 824 | int indent = 30; |
| 825 | if (m_solverType != gSolverType) |
| 826 | { |
| 827 | sprintf(msg, "restart example to change solver type"); |
| 828 | m_guiHelper->getAppInterface()->drawText(msg, 300, yCoord, 0.4f); |
| 829 | yCoord += yStep; |
| 830 | } |
| 831 | if (m_multithreadCapable) |
| 832 | { |
| 833 | if (m_multithreadedWorld != gMultithreadedWorld) |
| 834 | { |
| 835 | sprintf(msg, "restart example to begin in %s mode", |
| 836 | gMultithreadedWorld ? "multithreaded" : "single threaded"); |
| 837 | m_guiHelper->getAppInterface()->drawText(msg, 300, yCoord, 0.4f); |
| 838 | yCoord += yStep; |
| 839 | } |
| 840 | } |
| 841 | if (gDisplayProfileInfo) |
| 842 | { |
| 843 | if (m_multithreadedWorld) |
| 844 | { |
| 845 | #if BT_THREADSAFE |
| 846 | int numManifolds = m_dispatcher->getNumManifolds(); |
| 847 | int numContacts = 0; |
| 848 | for (int i = 0; i < numManifolds; ++i) |
| 849 | { |
| 850 | const btPersistentManifold* man = m_dispatcher->getManifoldByIndexInternal(i); |
| 851 | numContacts += man->getNumContacts(); |
| 852 | } |
| 853 | const char* mtApi = btGetTaskScheduler()->getName(); |
| 854 | sprintf(msg, "islands=%d bodies=%d manifolds=%d contacts=%d [%s] threads=%d", |
| 855 | gNumIslands, |
| 856 | m_dynamicsWorld->getNumCollisionObjects(), |
| 857 | numManifolds, |
| 858 | numContacts, |
| 859 | mtApi, |
| 860 | btGetTaskScheduler()->getNumThreads()); |
| 861 | m_guiHelper->getAppInterface()->drawText(msg, 100, yCoord, 0.4f); |
| 862 | yCoord += yStep; |
| 863 | #endif // #if BT_THREADSAFE |
| 864 | } |
| 865 | { |
| 866 | int sm = gSolverMode; |
| 867 | sprintf(msg, "solver %s mode [%s%s%s%s%s%s]", |
| 868 | getSolverTypeName(m_solverType), |
| 869 | sm & SOLVER_SIMD ? "SIMD" : "", |
| 870 | sm & SOLVER_RANDMIZE_ORDER ? " randomize" : "", |
| 871 | sm & SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS ? " interleave" : "", |
| 872 | sm & SOLVER_USE_2_FRICTION_DIRECTIONS ? " friction2x" : "", |
| 873 | sm & SOLVER_ENABLE_FRICTION_DIRECTION_CACHING ? " frictionDirCaching" : "", |
| 874 | sm & SOLVER_USE_WARMSTARTING ? " warm" : ""); |
| 875 | m_guiHelper->getAppInterface()->drawText(msg, xCoord, yCoord, 0.4f); |
nothing calls this directly
no test coverage detected