diff --git a/src/osgPlugins/pvr/ReaderWriterPVR.cpp b/src/osgPlugins/pvr/ReaderWriterPVR.cpp index 443fbb561..4150c6715 100644 --- a/src/osgPlugins/pvr/ReaderWriterPVR.cpp +++ b/src/osgPlugins/pvr/ReaderWriterPVR.cpp @@ -1,5 +1,9 @@ // ReaderWriter for pvr images +#if defined(_MSC_VER) +#include +#endif + #include #include @@ -14,7 +18,17 @@ #include #include #include + +#if defined(_MSC_VER) +typedef UINT64 uint64_t; +typedef INT64 int64_t; +typedef UINT32 uint32_t; +typedef INT32 int32_t; +typedef UINT16 uint16_t; +typedef UINT8 uint8_t; +#else #include +#endif using namespace osg; @@ -193,8 +207,8 @@ public: dataOffset += widthBlocks * heightBlocks * ((blockSize * bpp) / 8); - width = std::max(width >> 1, (uint32_t)1); - height = std::max(height >> 1, (uint32_t)1); + width = osg::maximum(width >> 1, (uint32_t)1); + height = osg::maximum(height >> 1, (uint32_t)1); } if(!mipmapdata.empty())