mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:58:27 +02:00
Android compilation fix
This commit is contained in:
parent
a93a081a9d
commit
12e8056e1f
2 changed files with 12 additions and 2 deletions
|
@ -26,8 +26,9 @@
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
|
|
||||||
#include "TGAReader.h"
|
#include "TGAReader.h"
|
||||||
|
#if !defined(Q_OS_ANDROID)
|
||||||
#include "OpenEXRReader.h"
|
#include "OpenEXRReader.h"
|
||||||
|
#endif
|
||||||
#include "ImageLogging.h"
|
#include "ImageLogging.h"
|
||||||
|
|
||||||
using namespace gpu;
|
using namespace gpu;
|
||||||
|
@ -249,12 +250,15 @@ QImage processRawImageData(QIODevice& content, const std::string& filename) {
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
content.reset();
|
content.reset();
|
||||||
} else if (filenameExtension == "exr") {
|
}
|
||||||
|
#if !defined(Q_OS_ANDROID)
|
||||||
|
else if (filenameExtension == "exr") {
|
||||||
QImage image = image::readOpenEXR(content, filename);
|
QImage image = image::readOpenEXR(content, filename);
|
||||||
if (!image.isNull()) {
|
if (!image.isNull()) {
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QImageReader imageReader(&content, filenameExtension.c_str());
|
QImageReader imageReader(&content, filenameExtension.c_str());
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include <QIODevice>
|
#include <QIODevice>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
|
#if !defined(Q_OS_ANDROID)
|
||||||
|
|
||||||
#include <OpenEXR/ImfIO.h>
|
#include <OpenEXR/ImfIO.h>
|
||||||
#include <OpenEXR/ImfRgbaFile.h>
|
#include <OpenEXR/ImfRgbaFile.h>
|
||||||
#include <OpenEXR/ImfArray.h>
|
#include <OpenEXR/ImfArray.h>
|
||||||
|
@ -54,7 +56,10 @@ private:
|
||||||
QIODevice& _device;
|
QIODevice& _device;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
QImage image::readOpenEXR(QIODevice& content, const std::string& filename) {
|
QImage image::readOpenEXR(QIODevice& content, const std::string& filename) {
|
||||||
|
#if !defined(Q_OS_ANDROID)
|
||||||
QIODeviceImfStream device(content, filename);
|
QIODeviceImfStream device(content, filename);
|
||||||
|
|
||||||
if (Imf::isOpenExrFile(device)) {
|
if (Imf::isOpenExrFile(device)) {
|
||||||
|
@ -88,6 +93,7 @@ QImage image::readOpenEXR(QIODevice& content, const std::string& filename) {
|
||||||
} else {
|
} else {
|
||||||
qWarning(imagelogging) << "OpenEXR - File " << filename.c_str() << " doesn't have the proper format";
|
qWarning(imagelogging) << "OpenEXR - File " << filename.c_str() << " doesn't have the proper format";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return QImage();
|
return QImage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue