Function SDL_CreateTextureWithProperties

pub unsafe extern "C" fn SDL_CreateTextureWithProperties(
    renderer: *mut SDL_Renderer,
    props: u32,
) -> *mut SDL_Texture
Available on crate feature dep_sdl3 only.
Expand description

Create a texture for a rendering context with the specified properties.

These are the supported properties:

With the direct3d11 renderer:

With the direct3d12 renderer:

With the metal renderer:

With the opengl renderer:

With the opengles2 renderer:

With the vulkan renderer:

§Parameters

  • renderer: the rendering context.
  • props: the properties to use.

§Return value

Returns the created texture or NULL on failure; call SDL_GetError() for more information.

§Thread safety

This function should only be called on the main thread.

§Availability

This function is available since SDL 3.2.0.

§See also