Supporting double precision, and tidy ups

· by Steve · Read in about 2 min · (219 Words)

I spent today making the OGRE_DOUBLE_PRECISION option, which has been there since the start but has never really been tested, work properly so that when enabled, all the internal math classes operate in double precision mode. The GPU can still only handle single-precision so there is downsampling when it comes to the actual rendering, but at least those people writing scientific apps which need this precision can use the Ogre math classes without losing that precision in the intermediate stages (and it was the comments of one real user on IRC which reminded me about this).

I also did a bit of tidying up of the macros to ensure there is no ambiguity as to who ‘owns’ them. They’re all prefixed with OGRE_ now, some weren’t before.

I’ve had reports that the StaticGeometry class has some fairly random artefacts when using ATI cards in GL. Since my primary dev machine has an nVidia card I didn’t notice this; ATI on Direct3D is fine apparantly. I ran out of time today but will look at it tomorrow, that is if someone else hasn’t already solved it. It sounds like an uninitialised data problem to me, nVidia cards tend to hide these kinds of issues since their buffers appear to always be initialised with zeros on creation, which ATIs are not.