mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
Compile fixes for older OpenEXR versions
This commit is contained in:
parent
38fdb80276
commit
a898911a5c
@ -24,6 +24,11 @@
|
|||||||
#include <ImfOutputFile.h>
|
#include <ImfOutputFile.h>
|
||||||
#include <ImfChannelList.h>
|
#include <ImfChannelList.h>
|
||||||
#include <ImfVersion.h>
|
#include <ImfVersion.h>
|
||||||
|
#include <ImfIO.h>
|
||||||
|
|
||||||
|
#ifndef IMATH_NAMESPACE
|
||||||
|
#define IMATH_NAMESPACE Imath
|
||||||
|
#endif
|
||||||
|
|
||||||
TypeHandle PNMFileTypeEXR::_type_handle;
|
TypeHandle PNMFileTypeEXR::_type_handle;
|
||||||
|
|
||||||
@ -214,7 +219,7 @@ Reader(PNMFileType *type, istream *file, bool owns_file, string magic_number) :
|
|||||||
const char *possible_channel_names[] = { "R", "G", "B", "Y", "A", NULL };
|
const char *possible_channel_names[] = { "R", "G", "B", "Y", "A", NULL };
|
||||||
for (const char **pni = possible_channel_names; *pni != NULL; ++pni) {
|
for (const char **pni = possible_channel_names; *pni != NULL; ++pni) {
|
||||||
std::string name = *pni;
|
std::string name = *pni;
|
||||||
IMF::ChannelList::ConstIterator ci = channels.find(name);
|
IMF::ChannelList::ConstIterator ci = channels.find(name.c_str());
|
||||||
if (ci != channels.end()) {
|
if (ci != channels.end()) {
|
||||||
// Found a match.
|
// Found a match.
|
||||||
if (name == "Y" && !_channel_names.empty()) {
|
if (name == "Y" && !_channel_names.empty()) {
|
||||||
|
@ -23,9 +23,13 @@
|
|||||||
#include "pnmWriter.h"
|
#include "pnmWriter.h"
|
||||||
|
|
||||||
#include <ImfInputFile.h>
|
#include <ImfInputFile.h>
|
||||||
#include <ImfNamespace.h>
|
#include <OpenEXRConfig.h>
|
||||||
|
|
||||||
|
#ifdef OPENEXR_IMF_NAMESPACE
|
||||||
namespace IMF = OPENEXR_IMF_NAMESPACE;
|
namespace IMF = OPENEXR_IMF_NAMESPACE;
|
||||||
|
#else
|
||||||
|
namespace IMF = Imf;
|
||||||
|
#endif
|
||||||
|
|
||||||
class ImfStdIstream;
|
class ImfStdIstream;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user