Browse Source

allow null texture

Nicolas Cannasse 11 năm trước cách đây
mục cha
commit
b4835a50d2
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      h2d/RenderContext.hx

+ 1 - 0
h2d/RenderContext.hx

@@ -74,6 +74,7 @@ class RenderContext {
 	}
 
 	public function beforeDraw() {
+		if( texture == null ) texture = h3d.mat.Texture.fromColor(0xFFFF00FF);
 		baseShader.texture = texture;
 		texture.filter = currentObj.filter ? Linear : Nearest;
 		texture.wrap = currentObj.tileWrap ? Repeat : Clamp;