瀏覽代碼

sceneProf "draw" part also tells the pass name.

clementlandrin 9 月之前
父節點
當前提交
25c33f61f2
共有 1 個文件被更改,包括 3 次插入1 次删除
  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 ) {
 		if( passes.isEmpty() )
 			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();
 		setupShaders(passes);
 		if( sort == null )