fixed bounding volume issue
[laserbrain_demo] / src / app.cc
index dcfd3f3..615366a 100644 (file)
@@ -39,6 +39,8 @@ SceneSet sceneman;
 
 unsigned int sdr_ltmap, sdr_ltmap_notex;
 
+int fpexcept_enabled;
+
 static Avatar avatar;
 
 static float cam_dist = 0.0;
@@ -79,6 +81,13 @@ bool app_init(int argc, char **argv)
 {
        set_log_file("demo.log");
 
+       char *env = getenv("FPEXCEPT");
+       if(env && atoi(env)) {
+               info_log("enabling floating point exceptions\n");
+               fpexcept_enabled = 1;
+               enable_fpexcept();
+       }
+
        if(init_opengl() == -1) {
                return false;
        }