浏览代码

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;