2
0
Эх сурвалжийг харах

Merge pull request #1102 from Azaezel/mipmap_emission

extraneous mipmap generation prune
Anis 9 жил өмнө
parent
commit
fe5bf90153

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

@@ -326,7 +326,7 @@ void GBitmap::allocateBitmap(const U32 in_width, const U32 in_height, const bool
 
          mNumMipLevels++;
          allocPixels += currWidth * currHeight * mBytesPerPixel;
-      } while (currWidth != 1 || currHeight != 1);
+      } while (currWidth != 1 && currHeight != 1);
    }
    AssertFatal(mNumMipLevels <= c_maxMipLevels, "GBitmap::allocateBitmap: too many miplevels");
 

+ 1 - 1
Engine/source/gfx/gfxTextureManager.cpp

@@ -1099,7 +1099,7 @@ void GFXTextureManager::_validateTexParams( const U32 width, const U32 height,
                currHeight = 1;
 
             inOutNumMips++;
-         } while ( currWidth != 1 || currHeight != 1 );
+         } while ( currWidth != 1 && currHeight != 1 );
       }
    }
 }