Esempio n. 1
0
        public static Vk GetApi()
        {
            var sym = new VkLoader(PlatformLoaderBase.PlatformLoader);
            var ret = LibraryLoader <Vk> .Load(new VulkanLibraryNameContainer(), sym);

            sym.Vulkan = ret;
            return(ret);
        }
Esempio n. 2
0
        public static Vk GetApi()
        {
            var sym = new VkLoader(LibraryLoader.GetPlatformDefaultLoader());
            var ret = LibraryLoader <Vk> .Load(new VulkanLibraryNameContainer(), sym);

            sym.Vulkan = ret;
            return(ret);
        }
Esempio n. 3
0
        public static Vk GetApi(ref InstanceCreateInfo info, ref AllocationCallbacks callbacks, out Instance instance)
        {
            var sym = new VkLoader(LibraryLoader.GetPlatformDefaultLoader());
            var ret = LibraryLoader <Vk> .Load(new VulkanLibraryNameContainer(), sym);

            sym.Vulkan = ret;
            ret.CreateInstance(ref info, ref callbacks, out instance);
            return(ret);
        }
Esempio n. 4
0
        public static unsafe Vk GetApi(ref InstanceCreateInfo info)
        {
            var sym = new VkLoader(LibraryLoader.GetPlatformDefaultLoader());
            var ret = LibraryLoader <Vk> .Load(new VulkanLibraryNameContainer(), sym);

            sym.Vulkan = ret;
            Instance instance;

            fixed(InstanceCreateInfo *infoPtr = &info)
            {
                ret.CreateInstance(infoPtr, null, &instance);
            }

            ret.CurrentInstance = instance;
            return(ret);
        }