Texture.update

Wraps SDL_UpdateTexture which updates the dsdl2.Texture's pixel data at a certain dsdl2.Rect boundary

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

Parameters

rect Rect

dsdl2.Rect boundary marking the part of the texture whose pixels are to be updated

pixels void[]

array of pixels for the dsdl2.Texture's rect 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