loadTextureRaw - multiple declarations

Function loadTextureRaw

Wraps IMG_LoadTexture_RW which loads an image from a data buffer into a hardware dsdl2.Texture

Texture loadTextureRaw (
  Renderer renderer,
  const(void[]) data
) @trusted;

Parameters

NameDescription
renderer given dsdl2.Renderer to initialize the texture
data data buffer of the image

Returns

dsdl2.Texture of the loaded image

Throws

dsdl2.SDLException if failed to load the image

Function loadTextureRaw

Wraps IMG_LoadTextureTyped_RW which loads a typed image from a data buffer into a hardware dsdl2.Texture

Texture loadTextureRaw (
  Renderer renderer,
  const(void[]) data,
  string type
) @trusted;

Parameters

NameDescription
renderer given dsdl2.Renderer to initialize the texture
data data buffer of the image
type specified type of the image

Returns

dsdl2.Texture of the loaded image

Throws

dsdl2.SDLException if failed to load the image