SDL_CreateTexture

Create a texture for a rendering context.

The contents of a texture when first created are not defined.

extern (C) nothrow @nogc extern
SDL_CreateTexture

Parameters

renderer SDL_Renderer*

The rendering context.

format SDL_PixelFormat

One of the enumerated values in SDL_PixelFormat.

access SDL_TextureAccess

One of the enumerated values in SDL_TextureAccess.

w int

The width of the texture in pixels.

h int

The height of the texture in pixels.

Return Value

The created texture or null on failure; call SDL_GetError for more information.

Threadsafety: This function should only be called on the main thread.

See Also

Meta