diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 1563040026..19aa7cc626 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -783,6 +783,7 @@ if (COMPILER == "MSVC"): else: LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half" + suffix + ".lib") IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/OpenEXR") + IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/Imath") if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/jpeg-static.lib") if (PkgSkip("ZLIB")==0): LibName("ZLIB", GetThirdpartyDir() + "zlib/lib/zlibstatic.lib") if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/vrpn.lib") @@ -992,7 +993,7 @@ if (COMPILER=="GCC"): SmartPkgEnable("OPENAL", "openal", ("openal"), "AL/al.h", framework = "OpenAL") SmartPkgEnable("SQUISH", "", ("squish"), "squish.h") SmartPkgEnable("TIFF", "libtiff-4", ("tiff"), "tiff.h") - SmartPkgEnable("OPENEXR", "OpenEXR", ("IlmImf", "Imath", "Half", "Iex", "IexMath", "IlmThread"), ("OpenEXR", "OpenEXR/ImfOutputFile.h")) + SmartPkgEnable("OPENEXR", "OpenEXR", ("IlmImf", "Imath", "Half", "Iex", "IexMath", "IlmThread"), ("OpenEXR", "Imath", "OpenEXR/ImfOutputFile.h")) SmartPkgEnable("VRPN", "", ("vrpn", "quat"), ("vrpn", "quat.h", "vrpn/vrpn_Types.h")) SmartPkgEnable("BULLET", "bullet", ("BulletSoftBody", "BulletDynamics", "BulletCollision", "LinearMath"), ("bullet", "bullet/btBulletDynamicsCommon.h")) SmartPkgEnable("VORBIS", "vorbisfile",("vorbisfile", "vorbis", "ogg"), ("ogg/ogg.h", "vorbis/vorbisfile.h")) diff --git a/panda/src/pnmimagetypes/pnmFileTypeEXR.cxx b/panda/src/pnmimagetypes/pnmFileTypeEXR.cxx index 83d7cf5bb4..3680571509 100644 --- a/panda/src/pnmimagetypes/pnmFileTypeEXR.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypeEXR.cxx @@ -25,6 +25,10 @@ #include #include #include +#include +#include + +#include #ifndef IMATH_NAMESPACE #define IMATH_NAMESPACE Imath @@ -50,6 +54,15 @@ public: _strm.write(c, n); } +#if OPENEXR_VERSION_MAJOR >= 3 + virtual uint64_t tellp() { + return _strm.tellp(); + } + + virtual void seekp(uint64_t pos) { + _strm.seekp(pos); + } +#else virtual IMF::Int64 tellp() { return _strm.tellp(); } @@ -57,6 +70,7 @@ public: virtual void seekp(IMF::Int64 pos) { _strm.seekp(pos); } +#endif private: std::ostream &_strm; @@ -88,6 +102,15 @@ public: return not_eof; } +#if OPENEXR_VERSION_MAJOR >= 3 + virtual uint64_t tellg() { + return _strm.tellg(); + } + + virtual void seekg(uint64_t pos) { + _strm.seekg(pos); + } +#else virtual IMF::Int64 tellg() { return _strm.tellg(); } @@ -95,6 +118,7 @@ public: virtual void seekg(IMF::Int64 pos) { _strm.seekg(pos); } +#endif virtual void clear() { _strm.clear();