Class MacOSVulkanComponent
macOS vulkan component using VK_EXT_metal_surface or VK_MVK_macos_surface extensions to create a vulkan surface using MoltenVK (part of the macOS Vulkan SDK).
Inherited Members
Namespace: OpenTK.Platform.Native.macOS
Assembly: OpenTK.Platform.dll
Syntax
public class MacOSVulkanComponent : IVulkanComponent, IPalComponent
Properties
Logger
The logger that this component uses to log diagnostic messages.
Declaration
public ILogger? Logger { get; set; }
Property Value
| Type | Description |
|---|---|
| ILogger |
See Also
Name
Name of the abstraction layer component.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Provides
Specifies which PAL components this object provides.
Declaration
public PalComponents Provides { get; }
Property Value
| Type | Description |
|---|---|
| PalComponents |
Methods
CreateWindowSurface(VkInstance, WindowHandle, VkAllocationCallbacks*, out VkSurfaceKHR)
Creates a Vulkan surface for the specified window.
Declaration
public VkResult CreateWindowSurface(VkInstance instance, WindowHandle window, VkAllocationCallbacks* allocator, out VkSurfaceKHR surface)
Parameters
| Type | Name | Description |
|---|---|---|
| VkInstance | instance | The instance to create the surface with. |
| WindowHandle | window | The window to create the surface in. |
| VkAllocationCallbacks* | allocator | The allocator to use or null to use the default allocator. |
| VkSurfaceKHR | surface | The created surface. |
Returns
| Type | Description |
|---|---|
| VkResult | The Vulkan result code of this operation. |
See Also
GetPhysicalDevicePresentationSupport(VkInstance, VkPhysicalDevice, uint)
Returns true if the given queue family supports presentation to a surface created with CreateWindowSurface(VkInstance, WindowHandle, VkAllocationCallbacks*, out VkSurfaceKHR).
Declaration
public bool GetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint queueFamily)
Parameters
| Type | Name | Description |
|---|---|---|
| VkInstance | instance | The OpenTK.Graphics.Vulkan.VkInstance to physical device belongs to. |
| VkPhysicalDevice | device | The OpenTK.Graphics.Vulkan.VkPhysicalDevice that the |
| uint | queueFamily | The index of the queue family to query for presentation support. |
Returns
| Type | Description |
|---|---|
| bool | If this queue family supports presentation. |
See Also
GetRequiredInstanceExtensions()
Returns a list of required instance extensions required for GetPhysicalDevicePresentationSupport(VkInstance, VkPhysicalDevice, uint) and CreateWindowSurface(VkInstance, WindowHandle, VkAllocationCallbacks*, out VkSurfaceKHR) to work. Include these extensions when creating OpenTK.Graphics.Vulkan.VkInstance.
Declaration
public ReadOnlySpan<string> GetRequiredInstanceExtensions()
Returns
| Type | Description |
|---|---|
| ReadOnlySpan<string> | A list of required extensions for IVulkanComponent functions to work. |
See Also
Initialize(ToolkitOptions)
Initialize the component.
Declaration
public void Initialize(ToolkitOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ToolkitOptions | options | The options to initialize the component with. |
See Also
Uninitialize()
Uninitialize the component. Frees any native resources used by the component.
Declaration
public void Uninitialize()