loadTextureRaw

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

  1. Texture loadTextureRaw(Renderer renderer, void[] data)
    @safe @trusted
    static if(bindSDLImage)
    loadTextureRaw
    (,
    const void[] data
    )
  2. Texture loadTextureRaw(Renderer renderer, void[] data, string type)

Parameters

renderer Renderer

given dsdl2.Renderer to initialize the texture

data void[]

data buffer of the image

Return Value

Type: Texture

dsdl2.Texture of the loaded image

Throws

dsdl2.SDLException if failed to load the image

Meta