public unsafe VkNonDispatchableHandle Create <T>(VkHandle instance, T *allocator) where T : unmanaged { VkNonDispatchableHandle ret; if (_view.Sdl.VulkanCreateSurface(_view.SdlWindow, instance, &ret) == SdlBool.False) { throw new PlatformException("Failed to create surface.", _view.Sdl.GetErrorAsException()); } return(ret); }
public unsafe VulkanInstance(Vk vk, IVkSurface vkSurface, VulkanInstanceInfo info, string[] requestedExtensions, string[]?validationLayers) { VK = vk; Info = info; CreateInstance(vkSurface, requestedExtensions, validationLayers, out _VKInstance); SurfaceExtension = GetInstanceExtension <SurfaceExtension>(); Handle = _VKInstance.ToHandle(); Surface = vkSurface.Create(Handle, (AllocationCallbacks *)null !).ToSurface(); Log.Debug(string.Format(FormatHelper.DEFAULT_LOGGING, nameof(VulkanInstance), "Created.")); }
public static SurfaceKHR ToSurface(this VkHandle handle) { return(new SurfaceKHR { Handle = (ulong)handle.Handle.ToInt64() }); }
public static extern int glfwCreateWindowSurface(VkHandle instance, Window *window, void *allocator, out VkHandle surface);
public static extern int glfwGetPhysicalDevicePresentationSupport(VkHandle instance, VkHandle device, int queueFamily);
public static extern IntPtr glfwGetInstanceProcAddress(VkHandle instance, byte *procName);