GRSilkNetBackendContext Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A Vulkan backend context that uses Silk.NET types for Vulkan interoperability.
public class GRSilkNetBackendContext : SkiaSharp.GRVkBackendContext
- Inheritance
Examples
static GRContext CreateContext(
Silk.NET.Vulkan.Instance instance,
Silk.NET.Vulkan.PhysicalDevice physicalDevice,
Silk.NET.Vulkan.Device device,
Silk.NET.Vulkan.Queue queue,
uint graphicsQueueIndex,
Silk.NET.Vulkan.PhysicalDeviceFeatures features,
GRSilkNetGetProcedureAddressDelegate getProc)
{
using var extensions = new GRVkExtensions();
extensions.Initialize(getProc, instance, physicalDevice);
using var backendContext = new GRSilkNetBackendContext
{
VkInstance = instance,
VkPhysicalDevice = physicalDevice,
VkDevice = device,
VkQueue = queue,
GraphicsQueueIndex = graphicsQueueIndex,
Extensions = extensions,
GetProcedureAddress = getProc,
VkPhysicalDeviceFeatures = features,
};
return GRContext.CreateVulkan(backendContext)
?? throw new System.InvalidOperationException("Unable to create the Vulkan context.");
}
Remarks
Use this type to pass Vulkan objects created with Silk.NET to CreateVulkan(GRVkBackendContext). The typed properties update the corresponding native handles on the base Vulkan backend context. The context does not own the Vulkan instance, physical device, logical device, or queue.
Constructors
| Name | Description |
|---|---|
| GRSilkNetBackendContext() |
Initializes a new instance of the GRSilkNetBackendContext class. |
Properties
| Name | Description |
|---|---|
| GetProcedureAddress |
Gets or sets the delegate for resolving Vulkan function addresses. |
| VkDevice |
Gets or sets the Vulkan logical device. |
| VkInstance |
Gets or sets the Vulkan instance. |
| VkPhysicalDevice |
Gets or sets the Vulkan physical device. |
| VkPhysicalDeviceFeatures |
Gets or sets the optional Vulkan physical device features. |
| VkQueue |
Gets or sets the Vulkan queue. |
Methods
| Name | Description |
|---|---|
| Dispose(Boolean) |
Releases the unmanaged resources used by the object and optionally releases the managed resources. |