Show / Hide Table of Contents

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).

Inheritance
object
MacOSVulkanComponent
Implements
IVulkanComponent
IPalComponent
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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
ILogger
Logger

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
GetRequiredInstanceExtensions()

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 VkInstance to physical device belongs to.

VkPhysicalDevice device

The VkPhysicalDevice that the queueFamily belongs to.

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()

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 VkInstance.

Declaration
public ReadOnlySpan<string> GetRequiredInstanceExtensions()
Returns
Type Description
ReadOnlySpan<string>

A list of required extensions for IVulkanComponent functions to work.

See Also
GetPhysicalDevicePresentationSupport(VkInstance, VkPhysicalDevice, uint)
CreateWindowSurface(VkInstance, WindowHandle, VkAllocationCallbacks*, out VkSurfaceKHR)

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
ToolkitOptions
Init(ToolkitOptions)

Uninitialize()

Uninitialize the component. Frees any native resources used by the component.

Declaration
public void Uninitialize()
See Also
Uninit()

Implements

IVulkanComponent
IPalComponent
In this article
Back to top Generated by DocFX