Skip to content

TSdlGpuDriver

A GPU driver compiled into SDL.

Definition

Unit: Neslib.Sdl3.Gpu

type TSdlGpuDriver = record ... end;

Properties

Name Description
Count The number of GPU drivers compiled into SDL.
Default The default GPU driver. This driver does not have a name.
Drivers The GPU drivers compiled into SDL.
Name Get the name of a built in GPU driver.

Methods

Name Description
CreateDevice Creates a GPU context.
SupportsFormats Checks for GPU runtime support.
SupportsProperties Checks for GPU runtime support.

Property Descriptions

Count

The number of GPU drivers compiled into SDL.

class property Count: Integer read GetCount

Type: Integer

See Also


Default

The default GPU driver. This driver does not have a name.

class property Default: TSdlGpuDriver read GetDefault

Type: TSdlGpuDriver


Drivers

The GPU drivers compiled into SDL.

class property Drivers[const AIndex: Integer]: TSdlGpuDriver read GetDriver; default

Type: TSdlGpuDriver

See Also


Name

Get the name of a built in GPU driver.

The GPU drivers are presented in the order in which they are normally checked during initialization.

The names of drivers are all simple, low-ASCII identifiers, like "vulkan", "metal" or "direct3d12". These never have Unicode characters, and are not meant to be proper names.

Note that the default driver (Default) does not have a name.

property Name: String read GetName

Type: String

See Also


Method Descriptions

CreateDevice(TSdlGpuShaderFormats, Boolean)

Creates a GPU context.

function CreateDevice(const AFormats: TSdlGpuShaderFormats; const ADebugMode: Boolean = False{$ENDIF}): TSdlGpuDevice

Exceptions

ESdlError: Raised on failure.

Parameters

AFormats: TSdlGpuShaderFormats : Which shader formats the app is able to provide.

ADebugMode: Boolean = False{$ENDIF} : (Optional) True to enable debug mode properties and validations. If not given, this will be True in when the app is compiled in DEBUG mode, or False otherwise

Returns

TSdlGpuDevice

See Also


SupportsFormats(TSdlGpuShaderFormats)

Checks for GPU runtime support.

function SupportsFormats(const AFormats: TSdlGpuShaderFormats): Boolean; inline

Parameters

AFormats: TSdlGpuShaderFormats : Which shader formats the app is able to provide.

Returns

Boolean: True if supported, False otherwise.

See Also


SupportsProperties(TSdlProperties)

Checks for GPU runtime support.

class function SupportsProperties(const AProps: TSdlProperties): Boolean; inline; static

Parameters

AProps: TSdlProperties : The properties to use.

Returns

Boolean: True if supported, False otherwise.

See Also