From 8970c40ce9a9a4e5f582b48f69b77bd90d8e678e Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 4 Apr 2024 23:29:08 +0200 Subject: Add DLL API --- main/main.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 03c2097..4d1834d 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1,5 +1,6 @@ #include #include +#include using namespace deimos; @@ -7,10 +8,17 @@ int main(int /* argc */, char* /* argv */[]) { auto* api_registry = InitializeGlobalApiRegistry(); auto* log_api = api_registry->Get(); + auto* os_api = api_registry->Get(); - log_api->LogInfo("Hello, world!"); - log_api->LogDebug("Hello, $!", "world"); - log_api->LogError("This is an error OMG $ $ $", 1, 2, 3); + log_api->LogInfo("Hello"); + + auto* vulkan_dll = os_api->dll->Open("vulkan-1.dll"); + Ensures(vulkan_dll != nullptr); + log_api->LogInfo("Vulkan DLL loaded"); + + auto* vkGetInstanceProcAddr = os_api->dll->GetSymbol(vulkan_dll, "vkGetInstanceProcAddr"); + Ensures(vkGetInstanceProcAddr != nullptr); + log_api->LogInfo("vkGetInstanceProcAddr found"); return 0; } -- cgit