Function loadTexture

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

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

Parameters

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

Returns

dsdl.Texture of the loaded image

Throws

dsdl.SDLException if failed to load the image