Fixed Image::GetPixels returning wrong pointer when level is over 0

Former-commit-id: c54b77b3b7aee5ee9aeff9a022e94f33f4b45453
This commit is contained in:
Lynix 2014-06-27 21:18:22 +02:00
parent 126cd75e4d
commit 6e936b6120
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include <Nazara/Utility/Debug.hpp>
///TODO: Rajouter des warnings (Formats compressés avec les méthodes Copy/Update, tests taille dans Copy)
///TODO: Rendre les méthodes exception-safe
namespace
{
@ -768,7 +769,7 @@ nzUInt8* NzImage::GetPixels(unsigned int x, unsigned int y, unsigned int z, nzUI
EnsureOwnership();
return GetPixelPtr(m_sharedImage->pixels[level], NzPixelFormat::GetBytesPerPixel(m_sharedImage->format), x, y, z, m_sharedImage->width, m_sharedImage->height);
return GetPixelPtr(m_sharedImage->pixels[level], NzPixelFormat::GetBytesPerPixel(m_sharedImage->format), x, y, z, width, height);
}
unsigned int NzImage::GetSize() const