mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Merge pull request #1490 from marauder2k9-torque/development
Update bitmapSTB.cpp
This commit is contained in:
commit
ed2cd11709
|
|
@ -100,8 +100,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
S32 x, y, n, channels;
|
||||
String ext = path.getExtension();
|
||||
|
||||
U32 prevWaterMark = FrameAllocator::getWaterMark();
|
||||
|
||||
// if this is an ies profile we need to create a texture for it.
|
||||
if (ext.equal("ies"))
|
||||
{
|
||||
|
|
@ -131,8 +129,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
|
||||
stbi_image_free(data);
|
||||
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
|
@ -190,8 +186,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
|
||||
stbi_image_free(dataChar);
|
||||
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
|
||||
sWriteSTB(textureName, bitmap, 10);
|
||||
|
||||
return true;
|
||||
|
|
@ -201,7 +195,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
|
||||
if (!stbi_info(path.getFullPath().c_str(), &x, &y, &channels))
|
||||
{
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
const char* stbErr = stbi_failure_reason();
|
||||
|
||||
if (!stbErr)
|
||||
|
|
@ -243,8 +236,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
|
||||
stbi_image_free(data);
|
||||
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -271,8 +262,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
//stbi_image_free(data);
|
||||
stbi_image_free(dataChar);
|
||||
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -296,7 +285,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
format = GFXFormatR8G8B8A8;
|
||||
break;
|
||||
default:
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -316,8 +304,6 @@ bool sReadSTB(const Torque::Path& path, GBitmap* bitmap)
|
|||
if (channels == 4)
|
||||
bitmap->checkForTransparency();
|
||||
|
||||
FrameAllocator::setWaterMark(prevWaterMark);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue