From 5830c60cefe0e46869b313c074182953dc742c3f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 17 Apr 2002 11:36:38 +0000 Subject: [PATCH] Fixes for warnings under VisualStudio --- include/osg/ColorMatrix | 2 +- include/osg/StateAttribute | 1 + src/Demos/hangglide/terrain_coords.h | 5 +++++ src/Demos/hangglide/terrain_normals.h | 4 ++++ src/Demos/hangglide/terrain_texcoords.h | 5 +++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/osg/ColorMatrix b/include/osg/ColorMatrix index 794e0c410..79be0cc28 100644 --- a/include/osg/ColorMatrix +++ b/include/osg/ColorMatrix @@ -5,8 +5,8 @@ #ifndef OSG_COLORMATRIX #define OSG_COLORMATRIX 1 -#include #include +#include namespace osg { diff --git a/include/osg/StateAttribute b/include/osg/StateAttribute index e9458caef..0bf45560b 100644 --- a/include/osg/StateAttribute +++ b/include/osg/StateAttribute @@ -5,6 +5,7 @@ #ifndef OSG_STATEATTRIBUTE #define OSG_STATEATTRIBUTE 1 +#include #include #include diff --git a/src/Demos/hangglide/terrain_coords.h b/src/Demos/hangglide/terrain_coords.h index b2d01342f..3f3b27ec5 100644 --- a/src/Demos/hangglide/terrain_coords.h +++ b/src/Demos/hangglide/terrain_coords.h @@ -1,3 +1,8 @@ +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) + // disable the double to float errors. + #pragma warning( disable : 4305 ) +#endif + static float vertex[][3] = { { 5998.7998, 41456.1016, 1.7800 }, diff --git a/src/Demos/hangglide/terrain_normals.h b/src/Demos/hangglide/terrain_normals.h index 53f343bf8..4f6886ce5 100644 --- a/src/Demos/hangglide/terrain_normals.h +++ b/src/Demos/hangglide/terrain_normals.h @@ -1,3 +1,7 @@ +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) + // disable the double to float errors. + #pragma warning( disable : 4305 ) +#endif static float normal[][3] = { { -0.2560, -0.1125, 0.9600 }, diff --git a/src/Demos/hangglide/terrain_texcoords.h b/src/Demos/hangglide/terrain_texcoords.h index b0434de3e..980fac44f 100644 --- a/src/Demos/hangglide/terrain_texcoords.h +++ b/src/Demos/hangglide/terrain_texcoords.h @@ -1,3 +1,8 @@ +#if defined(WIN32) && !(defined(__CYGWIN__) || defined(__MINGW32__)) + // disable the double to float errors. + #pragma warning( disable : 4305 ) +#endif + static float texcoord[][2] = { #ifdef _ORIGINAL_ /* [ */ { 0.1121, 0.0171 },