Skip to content

Commit

Permalink
Main: Texture::convertToImage - fix mipmaps (#3282)
Browse files Browse the repository at this point in the history
If the method is called with includeMipMaps = FALSE or if the Texture has only one/primary mipmap in that case numMips = 0. Therefore the code just creates an empty Ogre::Image without filling its content.

Co-authored-by: stupak <[email protected]>
  • Loading branch information
CsabaStupak and CsabaX authored Feb 1, 2025
1 parent 84b4bea commit 4309459
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OgreMain/src/OgreTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ namespace Ogre {

for (uint32 face = 0; face < getNumFaces(); ++face)
{
for (uint32 mip = 0; mip < numMips; ++mip)
for (uint32 mip = 0; mip <= numMips; ++mip)
{
getBuffer(face, mip)->blitToMemory(destImage.getPixelBox(face, mip));
}
Expand Down

0 comments on commit 4309459

Please sign in to comment.