MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / Main

Method Main

Examples/StereoKitTest/Program.cs:59–100  ·  view source on GitHub ↗
(string[] args)

Source from the content-addressed store, hash-verified

57 }
58
59 static void Main(string[] args)
60 {
61 bool headless = Array.IndexOf(args, "-headless") != -1;
62 Tests.IsTesting = Array.IndexOf(args, "-test") != -1;
63 Tests.MakeScreenshots = Array.IndexOf(args, "-noscreens") == -1;
64 if (Array.IndexOf(args, "-screenfolder") != -1)
65 Tests.ScreenshotRoot = args[Array.IndexOf(args, "-screenfolder")+1];
66 if (Array.IndexOf(args, "-gltf") != -1)
67 Tests.GltfFolders = args[Array.IndexOf(args, "-gltf") + 1];
68 if (Array.IndexOf(args, "-gltfscreenfolder") != -1)
69 Tests.GltfScreenshotRoot = args[Array.IndexOf(args, "-gltfscreenfolder") + 1];
70 if (Array.IndexOf(args, "-start") != -1)
71 {
72 startTest = args[Array.IndexOf(args, "-start") + 1];
73 Tests.TestSingle = true;
74 }
75
76 if (Tests.IsTesting)
77 {
78 settings.mode = headless ? AppMode.Offscreen : AppMode.Simulator;
79 settings.disableUnfocusedSleep = true;
80 }
81
82 // Preload the StereoKit library for access to Time.Scale before
83 // initialization occurs.
84 SK.PreLoadLibrary();
85
86 SK.AddStepper<PassthroughFBExt>();
87 //SK.AddStepper<Win32PerformanceCounterExt>();
88 logWindow = SK.AddStepper<LogWindow>();
89 logWindow.Enabled = false;
90
91 // Initialize StereoKit
92 if (!SK.Initialize(settings))
93 Environment.Exit(1);
94
95 Time.Scale = Tests.IsTesting ? 0 : 1;
96
97 Init();
98
99 SK.Run(Step, Tests.Shutdown);
100 }
101
102 static void Init()
103 {

Callers

nothing calls this directly

Calls 3

PreLoadLibraryMethod · 0.80
InitializeMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected