Fixed negative unsigned integer bug normal map generator

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2448 dfc29bdd-3216-0410-991c-e03cc46cb475
master
bitplane 2009-07-06 09:43:21 +00:00
parent f0e4959484
commit 1c9169372a
1 changed files with 4 additions and 4 deletions

View File

@ -1097,8 +1097,8 @@ void CNullDriver::makeNormalMapTexture(video::ITexture* texture, f32 amplitude)
s32* in = new s32[dim.Height * pitch]; s32* in = new s32[dim.Height * pitch];
memcpy(in, p, dim.Height * pitch * 4); memcpy(in, p, dim.Height * pitch * 4);
for (u32 x=0; x<pitch; ++x) for (s32 x=0; x < s32(pitch); ++x)
for (u32 y=0; y<dim.Height; ++y) for (s32 y=0; y < s32(dim.Height); ++y)
{ {
// TODO: this could be optimized really a lot // TODO: this could be optimized really a lot
@ -1146,8 +1146,8 @@ void CNullDriver::makeNormalMapTexture(video::ITexture* texture, f32 amplitude)
s16* in = new s16[dim.Height * pitch]; s16* in = new s16[dim.Height * pitch];
memcpy(in, p, dim.Height * pitch * 2); memcpy(in, p, dim.Height * pitch * 2);
for (u32 x=0; x<pitch; ++x) for (s32 x=0; x < s32(pitch); ++x)
for (u32 y=0; y<dim.Height; ++y) for (s32 y=0; y < s32(dim.Height); ++y)
{ {
// TODO: this could be optimized really a lot // TODO: this could be optimized really a lot