Function loadTexture

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

Texture loadTexture (
  Renderer renderer,
  string file
) @trusted;

Parameters

NameDescription
renderer given dsdl2.Renderer to initialize the texture
file path to the image file

Returns

dsdl2.Texture of the loaded image

Throws

dsdl2.SDLException if failed to load the image