浏览代码

Set "WasCleared" flag in uploadTexturePixels

ShiroSmith 6 年之前
父节点
当前提交
680271af69
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      h3d/impl/DirectXDriver.hx
  2. 1 0
      h3d/impl/GlDriver.hx

+ 1 - 0
h3d/impl/DirectXDriver.hx

@@ -580,6 +580,7 @@ class DirectXDriver extends h3d.impl.Driver {
 		}
 		}
 		t.t.res.updateSubresource(mipLevel + side * t.t.mips, null, (pixels.bytes:hl.Bytes).offset(pixels.offset), stride, 0);
 		t.t.res.updateSubresource(mipLevel + side * t.t.mips, null, (pixels.bytes:hl.Bytes).offset(pixels.offset), stride, 0);
 		updateResCount++;
 		updateResCount++;
+		t.flags.set(WasCleared);
 	}
 	}
 
 
 	static inline var SCISSOR_BIT = Pass.reserved_mask;
 	static inline var SCISSOR_BIT = Pass.reserved_mask;

+ 1 - 0
h3d/impl/GlDriver.hx

@@ -1153,6 +1153,7 @@ class GlDriver extends Driver {
 		#else
 		#else
 		throw "Not implemented";
 		throw "Not implemented";
 		#end
 		#end
+		t.flags.set(WasCleared);
 		restoreBind();
 		restoreBind();
 	}
 	}