diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-04 23:29:08 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-04-04 23:29:08 +0200 |
commit | 8970c40ce9a9a4e5f582b48f69b77bd90d8e678e (patch) | |
tree | 4f79981115baee14a25228755cdc81088ade2431 /main | |
parent | f3ba19b162a89b2081c0598b4a0bf126146e3671 (diff) |
Add DLL API
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
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 <deimos/core/api_registry.h>
#include <deimos/core/log.h>
+#include <deimos/core/os.h>
using namespace deimos;
@@ -7,10 +8,17 @@ int main(int /* argc */, char* /* argv */[]) {
auto* api_registry = InitializeGlobalApiRegistry();
auto* log_api = api_registry->Get<LogApi>();
+ auto* os_api = api_registry->Get<OsApi>();
- 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;
}
|