mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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 "TGAReader.h"
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
#include "OpenEXRReader.h"
|
||||
|
||||
#endif
|
||||
#include "ImageLogging.h"
|
||||
|
||||
using namespace gpu;
|
||||
|
@ -249,12 +250,15 @@ QImage processRawImageData(QIODevice& content, const std::string& filename) {
|
|||
return image;
|
||||
}
|
||||
content.reset();
|
||||
} else if (filenameExtension == "exr") {
|
||||
}
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
else if (filenameExtension == "exr") {
|
||||
QImage image = image::readOpenEXR(content, filename);
|
||||
if (!image.isNull()) {
|
||||
return image;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QImageReader imageReader(&content, filenameExtension.c_str());
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#include <QIODevice>
|
||||
#include <QDebug>
|
||||
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
|
||||
#include <OpenEXR/ImfIO.h>
|
||||
#include <OpenEXR/ImfRgbaFile.h>
|
||||
#include <OpenEXR/ImfArray.h>
|
||||
|
@ -54,7 +56,10 @@ private:
|
|||
QIODevice& _device;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
QImage image::readOpenEXR(QIODevice& content, const std::string& filename) {
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
QIODeviceImfStream device(content, filename);
|
||||
|
||||
if (Imf::isOpenExrFile(device)) {
|
||||
|
@ -88,6 +93,7 @@ QImage image::readOpenEXR(QIODevice& content, const std::string& filename) {
|
|||
} else {
|
||||
qWarning(imagelogging) << "OpenEXR - File " << filename.c_str() << " doesn't have the proper format";
|
||||
}
|
||||
#endif
|
||||
|
||||
return QImage();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue