Texture.update

Update part of the texture from an array of pixels. * The size of the pixel array must match the width and height arguments, and it must contain 32-bits RGBA pixels. * No additional check is performed on the size of the pixel array or the bounds of the area to update, passing invalid arguments will lead to an undefined behaviour. * This function does nothing if pixels is empty or if the texture was not previously created. *

  1. void update(const(ubyte)[] pixels)
  2. void update(const(ubyte)[] pixels, uint width, uint height, uint x, uint y)
    class Texture
    void
    update
    (
    const(ubyte)[] pixels
    ,
    uint width
    ,
    uint height
    ,
    uint x
    ,
    uint y
    )
  3. void update(const(Image) image)
  4. void update(const(Image) image, uint x, uint y)
  5. void update(const(T) window)
  6. void update(const(T) window, uint x, uint y)

Parameters

pixels
Type: const(ubyte)[]

Array of pixels to copy to the texture.

width
Type: uint

Width of the pixel region contained in pixels

height
Type: uint

Height of the pixel region contained in pixels

x
Type: uint

X offset in the texture where to copy the source pixels

y
Type: uint

Y offset in the texture where to copy the source pixels

Meta