Commit 19435a22 authored by cutealien's avatar cutealien

- Fix: CGUIImage no longer scales wrong when working with textures which don't...

- Fix: CGUIImage no longer scales wrong when working with textures which don't have the original image size.
- Fix CSoftwareTexture2 calculation for OriginalSize of ITexture. It had returned the changed texture size instead of the original one.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5138 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 1741e3e4
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- Fix: CGUIImage no longer scales wrong when working with textures which don't have the original image size.
- Fix CSoftwareTexture2 calculation for OriginalSize of ITexture. It was returning the changed texture size instead of the original one before.
- Fix skinned meshes not playing their last frame. Also clarified animation documentation to describe current behavior more exactly. - Fix skinned meshes not playing their last frame. Also clarified animation documentation to describe current behavior more exactly.
- Add IWriteFile::flush interface (thx @ JLouisB for the patch). - Add IWriteFile::flush interface (thx @ JLouisB for the patch).
- CLightSceneNode::updateAbsolutePosition does now light recalculations. This is to fix using animators with lights. - CLightSceneNode::updateAbsolutePosition does now light recalculations. This is to fix using animators with lights.
......
...@@ -81,7 +81,7 @@ void CGUIImage::draw() ...@@ -81,7 +81,7 @@ void CGUIImage::draw()
core::rect<s32> sourceRect(SourceRect); core::rect<s32> sourceRect(SourceRect);
if (sourceRect.getWidth() == 0 || sourceRect.getHeight() == 0) if (sourceRect.getWidth() == 0 || sourceRect.getHeight() == 0)
{ {
sourceRect = core::rect<s32>(core::dimension2di(Texture->getOriginalSize())); sourceRect = core::rect<s32>(core::dimension2di(Texture->getSize()));
} }
if (ScaleImage) if (ScaleImage)
......
...@@ -76,7 +76,6 @@ CSoftwareTexture2::CSoftwareTexture2(IImage* image, const io::path& name, ...@@ -76,7 +76,6 @@ CSoftwareTexture2::CSoftwareTexture2(IImage* image, const io::path& name,
BURNINGSHADER_COLOR_FORMAT BURNINGSHADER_COLOR_FORMAT
); );
OriginalSize = optSize;
os::Printer::log ( buf, ELL_WARNING ); os::Printer::log ( buf, ELL_WARNING );
MipMap[0] = new CImage(BURNINGSHADER_COLOR_FORMAT, optSize); MipMap[0] = new CImage(BURNINGSHADER_COLOR_FORMAT, optSize);
...@@ -125,7 +124,7 @@ void CSoftwareTexture2::regenerateMipMapLevels(void* mipmapData) ...@@ -125,7 +124,7 @@ void CSoftwareTexture2::regenerateMipMapLevels(void* mipmapData)
} }
core::dimension2d<u32> newSize; core::dimension2d<u32> newSize;
core::dimension2d<u32> origSize = OriginalSize; core::dimension2d<u32> origSize = Size;
for (i=1; i < SOFTWARE_DRIVER_2_MIPMAPPING_MAX; ++i) for (i=1; i < SOFTWARE_DRIVER_2_MIPMAPPING_MAX; ++i)
{ {
......
Tests finished. 1 test of 1 passed. Tests finished. 1 test of 1 passed.
Compiled as DEBUG Compiled as DEBUG
Test suite pass at GMT Sun Apr 19 19:36:40 2015 Test suite pass at GMT Wed Sep 16 21:05:42 2015
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment