Why pyogre change the precision to single?

nathan75

28-09-2006 10:11:22

def _configure(self):
____"""This shows the config dialog and creates the renderWindow."""
____carryOn = self.root.showConfigDialog()
____if carryOn:
______print 0.04/16,"sfcon21"
______self.renderWindow = self.root.initialise(True)
______print 0.04/16,"sfcon22"
____return carryOn

It's a part of SampleFramework.py. However, I got two different result for 0.04/16.

0.0025 sfcon21
0.00249999994412 sfcon22

the sentence self.renderWindow = self.root.initialise(True)
change the precision to single.

Actually, I don't care whether ogre itself use single or double precision, but I have to use double precision in another part of this program. however, pyogre change all the mathematic activity to single precision.

It's very strange. How can I change it back to double?

Thank you very much!

nathan75

02-10-2006 00:58:18

I found the problem. There is an option named "Floating-point mode" in the Direct3D9 config dialog box. When I select "Fastest" mode the problme appears. I think it's a problem of pyogre, this option should not affect other program except ogre related.

Thanks.

futnuh

07-10-2006 07:29:46

It's not just pyOgre; it happens with pure Ogre as well. I spent 30+ hours searching for the reason that my program was crashing. Part of my C++ app was double precision, and the "fastest" selection was causing random crashes. Glad to see that you figured out the problem quickly.