1
0
Files
BasaltMeter/BasaltPresenter/Presenter/main.cpp

22 lines
671 B
C++
Raw Normal View History

2026-01-04 23:11:58 +08:00
#include "dll_loader.hpp"
#include <basalt_char.hpp>
#include <engine.hpp>
namespace Presenter = ::Basalt::Presenter;
namespace Shared = ::Basalt::Shared;
2025-11-25 13:38:17 +08:00
int main(int argc, char* argv[]) {
2026-01-04 23:11:58 +08:00
auto engine_dll = Presenter::DllLoader(Presenter::DllKind::Engine, BSTEXT("BasaltDirectX11Engine"));
auto* engine = engine_dll.CreateInstance<Shared::Engine::IEngine>();
2026-01-05 16:51:58 +08:00
Shared::Engine::EngineConfig engine_config{.headless = false, .title = BSTEXT("Fuck You"), .width = 800, .height = 600};
2026-01-04 23:11:58 +08:00
engine->Startup(std::move(engine_config));
while (true) {
2026-01-05 16:51:58 +08:00
if (engine->Tick()) break;
2026-01-04 23:11:58 +08:00
}
engine->Shutdown();
2026-01-05 16:51:58 +08:00
engine_dll.DestroyInstance(engine);
2025-11-25 13:38:17 +08:00
}