فهرست منبع

allow null texture

Nicolas Cannasse 11 سال پیش
والد
کامیت
b4835a50d2
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  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;