Explorar o código

sceneProf "draw" part also tells the pass name.

clementlandrin hai 9 meses
pai
achega
25c33f61f2
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      h3d/pass/Output.hx

+ 3 - 1
h3d/pass/Output.hx

@@ -74,7 +74,9 @@ class Output {
 	public function draw( passes : h3d.pass.PassList, ?sort : h3d.pass.PassList -> Void ) {
 	public function draw( passes : h3d.pass.PassList, ?sort : h3d.pass.PassList -> Void ) {
 		if( passes.isEmpty() )
 		if( passes.isEmpty() )
 			return;
 			return;
-		#if sceneprof h3d.impl.SceneProf.begin("draw", ctx.frame); #end
+		#if sceneprof
+		h3d.impl.SceneProf.begin('draw_${@:privateAccess passes.current.pass.name}', ctx.frame);
+		#end
 		ctx.setupTarget();
 		ctx.setupTarget();
 		setupShaders(passes);
 		setupShaders(passes);
 		if( sort == null )
 		if( sort == null )