Ver Fonte

Update tile beforeEmit

ShiroSmith há 6 anos atrás
pai
commit
bd506d0eaf
1 ficheiros alterados com 3 adições e 3 exclusões
  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);
 	}