Fix float support.
This commit is contained in:
parent
0b13b6d0d9
commit
13e2d2e447
|
@ -24,9 +24,10 @@
|
||||||
#include <string.h> // memcpy
|
#include <string.h> // memcpy
|
||||||
|
|
||||||
#include <nvcore/Containers.h> // nextPowerOfTwo
|
#include <nvcore/Containers.h> // nextPowerOfTwo
|
||||||
|
|
||||||
#include <nvcore/Memory.h>
|
#include <nvcore/Memory.h>
|
||||||
|
|
||||||
|
#include <nvmath/Color.h>
|
||||||
|
|
||||||
#include "nvtt.h"
|
#include "nvtt.h"
|
||||||
#include "InputOptions.h"
|
#include "InputOptions.h"
|
||||||
|
|
||||||
|
@ -273,9 +274,9 @@ bool InputOptions::setMipmapChannelData(const void * data, int channel, int widt
|
||||||
if (m.images[idx].uint8data == NULL)
|
if (m.images[idx].uint8data == NULL)
|
||||||
{
|
{
|
||||||
m.images[idx].uint8data = new Image();
|
m.images[idx].uint8data = new Image();
|
||||||
|
m.images[idx].uint8data->allocate(width, height);
|
||||||
|
m.images[idx].uint8data->fill(Color32(0,0,0,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
m.images[idx].uint8data->allocate(width, height);
|
|
||||||
}
|
}
|
||||||
else if (m.inputFormat == InputFormat_RGBA_32F)
|
else if (m.inputFormat == InputFormat_RGBA_32F)
|
||||||
{
|
{
|
||||||
|
@ -283,9 +284,11 @@ bool InputOptions::setMipmapChannelData(const void * data, int channel, int widt
|
||||||
if (m.images[idx].floatdata == NULL)
|
if (m.images[idx].floatdata == NULL)
|
||||||
{
|
{
|
||||||
m.images[idx].floatdata = new FloatImage();
|
m.images[idx].floatdata = new FloatImage();
|
||||||
|
m.images[idx].floatdata->allocate(4, width, height);
|
||||||
|
m.images[idx].floatdata->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
m.images[idx].floatdata->allocate(4, width, height);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user