Function SDL_CreateGPUDevice

pub unsafe extern "C" fn SDL_CreateGPUDevice(
    format_flags: u32,
    debug_mode: bool,
    name: *const i8,
) -> *mut SDL_GPUDevice
Available on crate feature dep_sdl3 only.
Expand description

Creates a GPU context.

§Parameters

  • format_flags: a bitflag indicating which shader formats the app is able to provide.
  • debug_mode: enable debug mode properties and validations.
  • name: the preferred GPU driver, or NULL to let SDL pick the optimal driver.

§Return value

Returns a GPU context on success or NULL on failure; call [SDL_GetError()] for more information.

§Availability

This function is available since SDL 3.2.0.

§See also