-
-
Notifications
You must be signed in to change notification settings - Fork 320
Expand file tree
/
Copy pathStatsInfo.hx
More file actions
26 lines (21 loc) · 840 Bytes
/
StatsInfo.hx
File metadata and controls
26 lines (21 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package funkin.backend.system.framerate;
#if (gl_stats && !disable_cffi && (!html5 || !canvas))
import openfl.display._internal.stats.Context3DStats;
import openfl.display._internal.stats.DrawCallContext;
import funkin.backend.system.macros.StringMacro;
class StatsInfo extends FramerateCategory {
public function new() {
super("Asset Libraries Tree Info");
}
public override function __enterFrame(t:Int) {
if (alpha <= 0.05) return;
var buf = new StringBuf();
StringMacro.addLine(buf, 'totalDC: ${Context3DStats.totalDrawCalls()}');
StringMacro.addLine(buf, '\nstageDC: ${Context3DStats.contextDrawCalls(DrawCallContext.STAGE)}');
StringMacro.addLine(buf, '\nstage3DDC: ${Context3DStats.contextDrawCalls(DrawCallContext.STAGE3D)}');
_text = buf.toString();
this.text.text = _text;
super.__enterFrame(t);
}
}
#end