فهرست منبع

added setTarget to make sure shader is reset when doing 2d multipass

ncannasse 11 سال پیش
والد
کامیت
6d9a514d8c
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      h2d/RenderContext.hx

+ 6 - 0
h2d/RenderContext.hx

@@ -61,6 +61,12 @@ class RenderContext {
 		currentObj = null;
 	}
 
+	public function setTarget( t : h3d.mat.Texture ) {
+		flush();
+		engine.setTarget(t);
+		begin();
+	}
+
 	public function flush() {
 		if( bufPos == 0 ) return;
 		beforeDraw();