MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / WinMain

Function WinMain

source/MRViewerApp/MRViewerApp.cpp:15–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13extern "C" __declspec( dllexport ) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
14
15extern "C" int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, char* /*lpCmdLine*/, int /*nCmdShow*/)
16{
17 // Initialize getting stacktraces before loading DLLs
18 // https://stackoverflow.com/q/78468776/7325599
19 (void)MR::getCurrentStacktraceInline();
20
21 auto args = MR::ConvertArgv();
22 std::vector<char*> argv;
23 argv.reserve( args.size() );
24 for ( auto& arg : args )
25 argv.push_back( arg.data() );
26
27 // Init the viewer
28 MR::Viewer::LaunchParams launchParams;
29 launchParams.enableTransparentBackground = true;// default false, set true for MR and MRE
30 launchParams.name = std::string( MR_PROJECT_NAME );
31 launchParams.splashWindow = std::make_shared<MR::DefaultSplashWindow>();
32 launchParams.showMRVersionInTitle = true;
33 launchParams.argc = int( argv.size() );
34 launchParams.argv = argv.data();
35
36 MR::Viewer::parseLaunchParams( launchParams );
37
38 // Starts console if needed, free it on destructor
39 MR::ConsoleRunner console( launchParams.console );
40
41 return MR::launchDefaultViewer( launchParams, MR::ViewerSetup() );
42}
43
44#else //Unix
45

Callers

nothing calls this directly

Calls 8

ConvertArgvFunction · 0.85
launchDefaultViewerFunction · 0.85
push_backMethod · 0.80
ViewerSetupClass · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected