Table of Contents

Struct NativeGraphicsHandles

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Contains native graphics API handles for XR or other external interop. LogicalDevice is populated for all native backends. PhysicalDevice and Queue are populated for Vulkan and DirectX12. Other fields depend on Backend.

public readonly struct NativeGraphicsHandles
Inherited Members

Constructors

NativeGraphicsHandles(GraphicsBackend, nint, nint, nint, nint, int, int)

Creates a new NativeGraphicsHandles instance that holds the provided handles (pointers).

public NativeGraphicsHandles(GraphicsBackend backend, nint instance, nint physicalDevice, nint device, nint queue, int queueFamilyIndex, int queueIndex)

Parameters

backend GraphicsBackend
instance nint
physicalDevice nint
device nint
queue nint
queueFamilyIndex int
queueIndex int

Fields

Backend

The active graphics backend.

public readonly GraphicsBackend Backend

Field Value

GraphicsBackend

Instance

Handle for the session between the application and the graphics API.

public readonly nint Instance

Field Value

nint

Remarks

Vulkan: VkInstance handle. Others: Zero.

LogicalDevice

The logical graphics device handle.

public readonly nint LogicalDevice

Field Value

nint

Remarks

Vulkan: VkDevice handle. DX12: ID3D12Device*. OpenGL: SDL_GLContext (platform OpenGL context handle, e.g. HGLRC, GLXContext, or NSOpenGLContext). Others: Zero.

PhysicalDevice

The physical adapter handle.

public readonly nint PhysicalDevice

Field Value

nint

Remarks

Vulkan: VkPhysicalDevice handle. DX12: IDXGIAdapter1*. Others: Zero.

Queue

The graphics queue handle.

public readonly nint Queue

Field Value

nint

Remarks

Vulkan: VkQueue handle. DX12: ID3D12CommandQueue*. Others: Zero.

QueueFamilyIndex

Index of the queue family/type.

public readonly int QueueFamilyIndex

Field Value

int

Remarks

Vulkan: queue family index. Others: Zero.

QueueIndex

Index of the queue within its family/type.

public readonly int QueueIndex

Field Value

int

Remarks

Vulkan: queue index within family. Others: Zero.