diff --git a/include/osg/Camera b/include/osg/Camera index a32fc5356..941f05a3c 100644 --- a/include/osg/Camera +++ b/include/osg/Camera @@ -185,7 +185,7 @@ class SG_EXPORT Camera: public osg::Referenced const Vec3 getSideVector() const; /** get focal distance.*/ - inline const float getFocalLength() const { return _focalLength; } + inline const double getFocalLength() const { return _focalLength; } enum TransformMode diff --git a/include/osg/Export b/include/osg/Export index 458f1644a..3f876ed7e 100644 --- a/include/osg/Export +++ b/include/osg/Export @@ -6,6 +6,7 @@ #define OSG_EXPORT 1 #ifdef WIN32 + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 ) diff --git a/include/osg/Math b/include/osg/Math index d05b12bc6..8cf060f2b 100644 --- a/include/osg/Math +++ b/include/osg/Math @@ -7,6 +7,11 @@ #include +#if defined(WIN32) + // needed for _isnan & _finite used below. + #include +#endif + #if defined(WIN32) || defined (macintosh) #include #define M_E 2.7182818284590452354 @@ -29,41 +34,37 @@ // where they arent in math.h #ifndef acosf -#define acosf acos +#define acosf (float)acos #endif #ifndef asinf -#define asinf asin +#define asinf (float)asin #endif #ifndef cosf -#define cosf cos +#define cosf (float)cos #endif #ifndef sinf -#define sinf sin +#define sinf (float)sin #endif #ifndef logf -#define logf log +#define logf (float)log #endif #ifndef floorf -#define floorf floor +#define floorf (float)floor #endif #ifndef powf -#define powf pow +#define powf (float)pow #endif #ifndef sqrtf -#define sqrtf sqrt +#define sqrtf (float)sqrt #endif -#if defined(WIN32) - // needed for _isnan & _finite used below. - #include -#endif namespace osg { diff --git a/include/osgDB/Export b/include/osgDB/Export index 12c411d6f..2b717696c 100644 --- a/include/osgDB/Export +++ b/include/osgDB/Export @@ -6,6 +6,7 @@ #define OSGDB_EXPORT_ 1 #ifdef WIN32 + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 ) diff --git a/include/osgGLUT/Export b/include/osgGLUT/Export index bdc8724a0..2bf16de79 100644 --- a/include/osgGLUT/Export +++ b/include/osgGLUT/Export @@ -7,6 +7,7 @@ #define OSGGLUT_EXPORT_ 1 #ifdef WIN32 + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 ) diff --git a/include/osgText/Export b/include/osgText/Export index 818222a6f..56e1b560a 100644 --- a/include/osgText/Export +++ b/include/osgText/Export @@ -6,6 +6,7 @@ #define OSGTEXT_EXPORT_ 1 #ifdef WIN32 + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 ) diff --git a/include/osgUtil/Export b/include/osgUtil/Export index b0f42e13f..5fe2bd6cc 100644 --- a/include/osgUtil/Export +++ b/include/osgUtil/Export @@ -7,6 +7,7 @@ #define OSGUTIL_EXPORT_ 1 #ifdef WIN32 + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 ) diff --git a/include/osgWX/Export b/include/osgWX/Export index b23cde4f1..a13925471 100644 --- a/include/osgWX/Export +++ b/include/osgWX/Export @@ -7,6 +7,7 @@ #define OSGWX_EXPORT_ 1 #ifdef WIN32 + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 ) diff --git a/src/osgText/FTGL.h b/src/osgText/FTGL.h index 6faa1297e..c78e1fa4c 100644 --- a/src/osgText/FTGL.h +++ b/src/osgText/FTGL.h @@ -4,6 +4,7 @@ #ifdef WIN32 // stl stuff + #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4786 )