瀏覽代碼

Update tile beforeEmit

ShiroSmith 6 年之前
父節點
當前提交
bd506d0eaf
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      h3d/scene/pbr/terrain/Tile.hx

+ 3 - 3
h3d/scene/pbr/terrain/Tile.hx

@@ -530,13 +530,13 @@ class Tile extends h3d.scene.Mesh {
 		}
 	}
 
-	public dynamic function beforeEmit() {};
+	public dynamic function beforeEmit() : Bool { return true; };
 	override function emit( ctx:RenderContext ){
 		if( !isReady() ) return;
 		computeBounds();
 		insideFrustrum = ctx.camera.frustum.hasBounds(cachedBounds);
-		beforeEmit();
-		if( insideFrustrum )
+		var b = beforeEmit();
+		if( b && insideFrustrum )
 			super.emit(ctx);
 	}