Fixed Texture::Update behavior
Former-commit-id: 8d1de49226b72b3f1e063b9da87c3391bce9ea95
This commit is contained in:
@@ -970,7 +970,7 @@ bool NzTexture::Update(const NzImage& image, const NzBoxui& box, nzUInt8 level)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const nzUInt8* pixels = image.GetConstPixels(box.x, box.y, box.z, level);
|
const nzUInt8* pixels = image.GetConstPixels(0, 0, 0, level);
|
||||||
if (!pixels)
|
if (!pixels)
|
||||||
{
|
{
|
||||||
NazaraError("Failed to access image's pixels");
|
NazaraError("Failed to access image's pixels");
|
||||||
@@ -996,7 +996,7 @@ bool NzTexture::Update(const NzImage& image, const NzRectui& rect, unsigned int
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const nzUInt8* pixels = image.GetConstPixels(rect.x, rect.y, z, level);
|
const nzUInt8* pixels = image.GetConstPixels(0, 0, 0, level);
|
||||||
if (!pixels)
|
if (!pixels)
|
||||||
{
|
{
|
||||||
NazaraError("Failed to access image's pixels");
|
NazaraError("Failed to access image's pixels");
|
||||||
|
|||||||
Reference in New Issue
Block a user