Texture2D.from_image

Loads an image and afterwards loads it into a Texture2D struct. Image can be loaded by stb and SDLImage. To select specific way use versions stb, SDLImage2 (SDL2) or SDLImage (SDL1).

SDLImage must be loaded and initialized manually!

  1. Texture2D from_image(string filename)
    class Texture2D
    version(stb)
    static
    from_image
    (
    string filename
    )
  2. Texture2D from_image(string filename)

Meta