Hi All,

A peculiar bug under Windows with the dds plugin and mipmap levels has
pointed to bug in the maths libraries that can be worked around by
using the standard C++ cmath definitations, so a potential workaround
for this bug is to use <cmath> in include/osg/Math instead of the
current c library <math.h>.  Making this change for just one compiler
combination under one platform on it's own is probably not appropriate
- usually I'd keep such workarounds local to the place that has the
problem or to simply specify don't use broken dependencies.  In this
case I am considering the change for more wider reasons, our
include/osg/Math header over the years has tried to handle lots of
oddities on different platforms and with it has ended up rather
convoluted and difficult to follow, I feel that perhaps now is the
time to standardize on using Standard C++'s cmath library and clean up
our Math header.

It's kinda of incredibly that it's now 2013 and I'm only just getting
brave enough to suggest dropping platforms that don't properly support
<cmath>, I personally just have modern Linux boxes which I use for
development, so have no problems with modern C++ usage, and the vast
majority of our community will be using modern platforms as well and
wouldn't expect them to have issues with adopting cmath over math.h.
The problem comes from the niche platforms like Solaris, HP-Ux, AIX
and IRIX.   IRIX is pretty well dead, with the last members of the
community providing testing under IRIX finally dropping their own IRIX
machines a few years back so while it's likely that we are now well
beyond being able to get the code base compiling back under IRIX.  I
do recall IRIX being one of the key problem platforms for using cmath,
but am not sure about Solaris, HP-Ux and AIX.  I think platforms can
mostly be used with the GNU compilers so we are probably in the clear.
 I'm not even sure we have many members of the community using these
niche platforms anymore.

So... Thoughts form the community?

Can we finally using cmath in include/osg/Math is clean this header up?

With this issue I'm inclined to make the change and then push the
problem out in the community to test, if no one complains that it'll
be plain sailing all the way to the next stable release, for this
topic at least.

Cheers,
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to