Преглед на файлове

added -D hl-profile to mark end-of-frame while profiling samples (requires hl 1.11)

Nicolas Cannasse преди 5 години
родител
ревизия
a5e2d26455
променени са 1 файла, в които са добавени 10 реда и са изтрити 1 реда
  1. 10 1
      hxd/System.hl.hx

+ 10 - 1
hxd/System.hl.hx

@@ -71,7 +71,16 @@ class System {
 
 		// present
 		var cur = h3d.Engine.getCurrent();
-		if( cur != null && cur.ready ) cur.driver.present();
+		if( cur != null && cur.ready ) {
+			#if hl_profile
+			hl.Profile.event(-1); // pause
+			#end
+			cur.driver.present();
+			#if hl_profile
+			hl.Profile.event(0); // next frame
+			hl.Profile.event(-2); // resume
+			#end
+		}
 		return true;
 	}