loadTexture

Wraps IMG_LoadTexture which loads an image from a filesystem path into a hardware dsdl2.Texture

@safe @trusted
static if(bindSDLImage)
loadTexture

Parameters

renderer Renderer

given dsdl2.Renderer to initialize the texture

file string

path to the image file

Return Value

Type: Texture

dsdl2.Texture of the loaded image

Throws

dsdl2.SDLException if failed to load the image

Meta