Browse Source

set WasCleared flag on uploadBitmap() and uploadPixels()

bstouls 9 năm trước cách đây
mục cha
commit
15388747dc
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      h3d/mat/Texture.hx

+ 2 - 0
h3d/mat/Texture.hx

@@ -163,11 +163,13 @@ class Texture {
 	public function uploadBitmap( bmp : hxd.BitmapData, mipLevel = 0, side = 0 ) {
 		alloc();
 		mem.driver.uploadTextureBitmap(this, bmp, mipLevel, side);
+		flags.set(WasCleared);
 	}
 
 	public function uploadPixels( pixels : hxd.Pixels, mipLevel = 0, side = 0 ) {
 		alloc();
 		mem.driver.uploadTexturePixels(this, pixels, mipLevel, side);
+		flags.set(WasCleared);
 	}
 
 	public function dispose() {