Pārlūkot izejas kodu

Merge pull request #566 from Azaezel/alpha40/previewPixelfix

don't try to generate mipmaps for images that aren't n^2 dureing prev…
Brian Roberts 4 gadi atpakaļ
vecāks
revīzija
1e7a932a9e
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      Engine/source/gfx/bitmap/gBitmap.cpp

+ 2 - 2
Engine/source/gfx/bitmap/gBitmap.cpp

@@ -1385,8 +1385,8 @@ DefineEngineFunction(saveScaledImage, bool, (const char* bitmapSource, const cha
          }
       }
    }*/
-
-   image->extrudeMipLevels();
+   if (isPow2(image->getWidth())&& isPow2(image->getHeight()))
+      image->extrudeMipLevels();
 
    U32 mipCount = image->getNumMipLevels();
    U32 targetMips = mFloor(mLog2((F32)resolutionSize)) + 1;