瀏覽代碼

Set format in read stream

Forgot to pass the decided format in read from stream
marauder2k7 1 年之前
父節點
當前提交
8632468a9c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Engine/source/gfx/bitmap/loaders/bitmapSTB.cpp

+ 1 - 1
Engine/source/gfx/bitmap/loaders/bitmapSTB.cpp

@@ -254,7 +254,7 @@ bool sReadStreamSTB(Stream& stream, GBitmap* bitmap, U32 len)
    case 4: fmt = GFXFormatR8G8B8A8; break;
    }
 
-   bitmap->allocateBitmap(width, height, false, GFXFormatA8);
+   bitmap->allocateBitmap(width, height, false, fmt);
 
    U8* pBase = bitmap->getWritableBits(0);
    U32 rowBytes = bitmap->getByteSize();