Fix for issue #192
Also: Avoid divide by zero before OpenGL window is up
This commit is contained in:
@@ -17,6 +17,10 @@ subject to the following restrictions:
|
||||
#include "GlutStuff.h"
|
||||
#include "GLDebugDrawer.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
#ifdef __DEBUG_FPU_ISSUES
|
||||
#define _GNU_SOURCE
|
||||
#include <fenv.h>
|
||||
#endif
|
||||
|
||||
GLDebugDrawer gDebugDrawer;
|
||||
|
||||
@@ -25,6 +29,14 @@ int main(int argc,char** argv)
|
||||
|
||||
CcdPhysicsDemo* ccdDemo = new CcdPhysicsDemo();
|
||||
|
||||
#ifdef __DEBUG_FPU_ISSUES
|
||||
// feenableexcept (FE_DIVBYZERO);
|
||||
// feenableexcept (FE_INEXACT);
|
||||
// feenableexcept (FE_INVALID);
|
||||
// feenableexcept (FE_OVERFLOW|FE_DIVBYZERO|FE_UNDERFLOW);
|
||||
// feenableexcept (FE_UNDERFLOW);
|
||||
#endif
|
||||
|
||||
ccdDemo->initPhysics();
|
||||
ccdDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user