瀏覽代碼

Adding benchmark current ID (to restore previous mark).

clementlandrin 1 年之前
父節點
當前提交
d8c9e230a5
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      h3d/impl/Benchmark.hx

+ 6 - 0
h3d/impl/Benchmark.hx

@@ -386,6 +386,12 @@ class Benchmark extends h2d.Graphics {
 		if( measureCpu ) q.value = haxe.Timer.stamp() * 1e9;
 	}
 
+	public function getCurrentId() {
+		if ( currentFrame != null )
+			return currentFrame.name;
+		return null;
+	}
+
 	public static function takeControl( app : hxd.App, ?s3d : h3d.scene.Scene ) @:privateAccess {
 		if( s3d == null ) s3d = app.s3d;
 		var cur = hxd.System.getCurrentLoop();