Commit 569d6d89 authored by bitplane's avatar bitplane

fixed getOriginalSize in textures in Burning's renderer. Had to add a new...

fixed getOriginalSize in textures in Burning's renderer. Had to add a new method to get the size of the largest mipmap (getMaxSize), as the texelarea functions needed this value.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@769 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9cd0eca1
Changes in version 1.4 (... 2007)
- Fixed CSoftwareTexture2::getOriginalSize, reported by CaptainPants. Added a
new method CSoftwareTexture2::getMaxSize to return the size of the largest
mipmap, which is used by texelarea instead of getOriginalSize.
- Changed parameter order of addArrowMesh and added default parameters such
that it's enough to set the color (or even just the name).
......
......@@ -802,7 +802,7 @@ inline f32 CSoftwareDriver2::texelarea ( const s4DVertex *v, int tex ) const
z = x0*y1 - x1*y0;
const core::dimension2d<s32> &d = Texmap[tex].Texture->getOriginalSize();
const core::dimension2d<s32> &d = Texmap[tex].Texture->getMaxSize();
z *= d.Height;
z *= d.Width;
return z;
......@@ -829,7 +829,7 @@ inline f32 CSoftwareDriver2::texelarea2 ( const s4DVertex **v, s32 tex ) const
(v[1]->Tex[tex].y - v[0]->Tex[tex].y )
;
const core::dimension2d<s32> &d = Texmap[tex].Texture->getOriginalSize();
const core::dimension2d<s32> &d = Texmap[tex].Texture->getMaxSize();
z *= d.Height;
z *= d.Width;
return z;
......
......@@ -42,9 +42,15 @@ public:
//! Returns original size of the texture.
virtual const core::dimension2d<s32>& getOriginalSize()
{
//return MipMap[0]->getDimension();
return OrigSize;
}
//! Returns the size of the largest mipmap.
const core::dimension2d<s32>& getMaxSize()
{
return MipMap[0]->getDimension();
//return OrigSize;
}
//! Returns (=size) of the texture.
......
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