Add 3DGS D3D12 MVS bootstrap and PLY loader
This commit is contained in:
39
MVS/3DGS-D3D12/src/main.cpp
Normal file
39
MVS/3DGS-D3D12/src/main.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "XC3DGSD3D12/App.h"
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE instance, HINSTANCE, PWSTR, int showCommand) {
|
||||
XC3DGSD3D12::App app;
|
||||
|
||||
int argumentCount = 0;
|
||||
LPWSTR* arguments = CommandLineToArgvW(GetCommandLineW(), &argumentCount);
|
||||
for (int index = 1; index + 1 < argumentCount; ++index) {
|
||||
if (std::wstring(arguments[index]) == L"--frame-limit") {
|
||||
app.SetFrameLimit(static_cast<unsigned int>(_wtoi(arguments[index + 1])));
|
||||
++index;
|
||||
} else if (std::wstring(arguments[index]) == L"--scene") {
|
||||
app.SetGaussianScenePath(arguments[index + 1]);
|
||||
++index;
|
||||
} else if (std::wstring(arguments[index]) == L"--summary-file") {
|
||||
app.SetSummaryPath(arguments[index + 1]);
|
||||
++index;
|
||||
}
|
||||
}
|
||||
if (arguments != nullptr) {
|
||||
LocalFree(arguments);
|
||||
}
|
||||
|
||||
if (!app.Initialize(instance, showCommand)) {
|
||||
const std::wstring message =
|
||||
app.GetLastErrorMessage().empty()
|
||||
? L"Failed to initialize XC 3DGS D3D12 MVS."
|
||||
: app.GetLastErrorMessage();
|
||||
MessageBoxW(nullptr, message.c_str(), L"Initialization Error", MB_OK | MB_ICONERROR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return app.Run();
|
||||
}
|
||||
Reference in New Issue
Block a user