mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:27:04 +02:00
Fixed warnings on Mac & Ubuntu
This commit is contained in:
parent
a79e7a2587
commit
6b876e6a27
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
using namespace image;
|
using namespace image;
|
||||||
|
|
||||||
Image Image::getScaled(glm::uvec2 dstSize, AspectRatioMode ratioMode, TransformationMode transformMode) const {
|
Image Image::getScaled(glm::uvec2 dstSize, AspectRatioMode ratioMode, TransformationMode transformMode) const {
|
||||||
if (_data.format() == Image::Format_PACKED_FLOAT) {
|
if ((Image::Format)_data.format() == Image::Format_PACKED_FLOAT) {
|
||||||
// Start by converting to full float
|
// Start by converting to full float
|
||||||
glm::vec4* floatPixels = new glm::vec4[getWidth()*getHeight()];
|
glm::vec4* floatPixels = new glm::vec4[getWidth()*getHeight()];
|
||||||
auto unpackFunc = getHDRUnpackingFunction();
|
auto unpackFunc = getHDRUnpackingFunction();
|
||||||
|
@ -33,7 +33,7 @@ Image Image::getScaled(glm::uvec2 dstSize, AspectRatioMode ratioMode, Transforma
|
||||||
if (transformMode == Qt::TransformationMode::FastTransformation) {
|
if (transformMode == Qt::TransformationMode::FastTransformation) {
|
||||||
filter = nvtt::ResizeFilter_Box;
|
filter = nvtt::ResizeFilter_Box;
|
||||||
}
|
}
|
||||||
surface.resize(dstSize.x, dstSize.y, 1, nvtt::ResizeFilter_Box);
|
surface.resize(dstSize.x, dstSize.y, 1, filter);
|
||||||
|
|
||||||
// And convert back to original format
|
// And convert back to original format
|
||||||
QImage resizedImage((int)dstSize.x, (int)dstSize.y, (QImage::Format)Image::Format_PACKED_FLOAT);
|
QImage resizedImage((int)dstSize.x, (int)dstSize.y, (QImage::Format)Image::Format_PACKED_FLOAT);
|
||||||
|
|
Loading…
Reference in a new issue