Created
February 18, 2016 14:19
-
-
Save ratchetfreak/f30fc2362b2d7c362738 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HMODULE vulkanLib = LoadLibrary("vulkan-1.dll"); | |
if(vulkanLib == null) //no vulkan installed error out | |
exit(1); | |
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) GetProcAddress(vulkanLib, "vkGetInstanceProcAddr"); | |
PFN_vkCreateInstance vkCreateInstance = (FPN_vkCreateInstance) vkGetInstanceProcAddr(null, "vkCreateInstance"); | |
VkInstance instance; | |
VkResult result = vkCreateInstance(..., null, &instance); | |
if( result!= VK_SUCCESS) //no vulkan installed error out | |
exit(1); | |
//load the remaining function pointers using vkGetInstanceProcAddr(instace, "..."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment