Texture.update

Wraps SDL_UpdateTexture which updates the entire dsdl2.Texture's pixel data

  1. void update(void[] pixels, size_t pitch)
    class Texture
    @trusted
    void
    update
    (
    const void[] pixels
    ,
    size_t pitch
    )
  2. void update(Rect rect, void[] pixels, size_t pitch)

Parameters

pixels void[]

array of pixels for the entire dsdl2.Texture's pixels to be replaced with

pitch size_t

skips in bytes per line/row of the pixels

Throws

dsdl2.SDLException if failed to update the texture pixel data

Meta