diff src/vulkan.nim @ 10:0660ba9d1930

did: make it work on windows
author sam <sam@basx.dev>
date Sat, 24 Dec 2022 22:32:46 +0700
parents 4ed9cb098315
children 90e117952f74
line wrap: on
line diff
--- a/src/vulkan.nim	Thu Dec 22 19:35:54 2022 +0700
+++ b/src/vulkan.nim	Sat Dec 24 22:32:46 2022 +0700
@@ -30,15 +30,7 @@
 if isNil(vkHandleDLL):
   quit("could not load: " & vkDLL)
 
-let vkGetProcAddress = cast[proc(s: cstring): pointer {.stdcall.}](symAddr(vkHandleDLL, "vkGetInstanceProcAddr"))
-if vkGetProcAddress == nil:
-  quit("failed to load `vkGetInstanceProcAddr` from " & vkDLL)
-
 vkGetProc = proc(procName: cstring): pointer {.cdecl.} =
-  when defined(windows):
-    result = vkGetProcAddress(procName)
-    if result != nil:
-      return
   result = symAddr(vkHandleDLL, procName)
   if result == nil:
     raiseInvalidLibrary(procName)