Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-02 17:50:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-02 17:50:43 +0300
commit396770a63af57a85f2306c7b9775734c1daffff7 (patch)
tree5aa8ba330411bd9e1c3ab85dca8598ad90afe965 /source/creator/creator.c
parent25183b87471b78bfda58d224e8d4a70d468142fd (diff)
- lamp bias of 0.0 was allowed when it should not be.
- enable floating point exceptions in debug mode on linux, makes nan's easy to track.
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r--source/creator/creator.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 6244032bbcf..7939ea30721 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -29,13 +29,16 @@
#include <stdlib.h>
#include <string.h>
-
/* for setuid / getuid */
#ifdef __sgi
#include <sys/types.h>
#include <unistd.h>
#endif
+#ifdef __linux__
+#include <fenv.h>
+#endif
+
/* This little block needed for linking to Blender... */
#include "MEM_guardedalloc.h"
@@ -944,6 +947,12 @@ int main(int argc, char **argv)
setuid(getuid()); /* end superuser */
#endif
+#ifdef __linux__
+ /* zealous but makes float issues a heck of a lot easier to find! */
+ if(G.f & G_DEBUG)
+ feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
+#endif
+
/* for all platforms, even windos has it! */
if(G.background) signal(SIGINT, blender_esc); /* ctrl c out bg render */