mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
pnmimagetypes: Changes to support compilation with OpenEXR 3.0.1
This commit is contained in:
parent
be03011f21
commit
9410418840
@ -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"))
|
||||
|
@ -25,6 +25,10 @@
|
||||
#include <ImfChannelList.h>
|
||||
#include <ImfVersion.h>
|
||||
#include <ImfIO.h>
|
||||
#include <ImfFrameBuffer.h>
|
||||
#include <ImfHeader.h>
|
||||
|
||||
#include <ImathBox.h>
|
||||
|
||||
#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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user