diff --git a/include/osg/Image b/include/osg/Image index 7a6651145..89ddc91d9 100644 --- a/include/osg/Image +++ b/include/osg/Image @@ -13,6 +13,24 @@ #include #include +#ifndef GL_VERSION_1_2 + /* 1.2 definitions...*/ + #define GL_BGR 0x80E0 + #define GL_BGRA 0x80E1 + #define GL_UNSIGNED_BYTE_3_3_2 0x8032 + #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 + #define GL_UNSIGNED_SHORT_5_6_5 0x8363 + #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 + #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 + #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 + #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 + #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 + #define GL_UNSIGNED_INT_8_8_8_8 0x8035 + #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 + #define GL_UNSIGNED_INT_10_10_10_2 0x8036 + #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#endif + namespace osg { /** Image class for encapsulating the storage texture image data.*/ diff --git a/include/osg/Math b/include/osg/Math index b044c6979..4a79ddaa3 100644 --- a/include/osg/Math +++ b/include/osg/Math @@ -7,6 +7,11 @@ #include +#if defined(_MSC_VER) && (_MSC_VER >= 1300) + #include +#endif + + #if (defined(WIN32) && !(defined(_MSC_VER) && (_MSC_VER >= 1300)) ) || \ defined (macintosh)|| \ defined (sun) || \ diff --git a/src/osg/Image.cpp b/src/osg/Image.cpp index c11357c01..f49e5000a 100644 --- a/src/osg/Image.cpp +++ b/src/osg/Image.cpp @@ -65,23 +65,6 @@ void Image::setFileName(const std::string& fileName) _fileName = fileName; } -#ifndef GL_VERSION_1_2 - /* 1.2 definitions...*/ - #define GL_BGR 0x80E0 - #define GL_BGRA 0x80E1 - #define GL_UNSIGNED_BYTE_3_3_2 0x8032 - #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 - #define GL_UNSIGNED_SHORT_5_6_5 0x8363 - #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 - #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 - #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 - #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 - #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 - #define GL_UNSIGNED_INT_8_8_8_8 0x8035 - #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 - #define GL_UNSIGNED_INT_10_10_10_2 0x8036 - #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#endif const bool Image::isPackedType(GLenum type) {