Add 3DGS D3D12 MVS bootstrap and PLY loader

This commit is contained in:
2026-04-13 00:36:50 +08:00
parent 6f876678f5
commit 64212a53c7
8 changed files with 1534 additions and 0 deletions

View 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();
}