Texture.updateFromPixels

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 null or if the texture was not previously created.

class Texture
deprecated
void
updateFromPixels
(
const(ubyte)[] pixels
,
uint width
,
uint height
,
uint x
,
uint y
)

Parameters

pixels const(ubyte)[]

Array of pixels to copy to the texture.

width uint

Width of the pixel region contained in pixels

height uint

Height of the pixel region contained in pixels

x uint

X offset in the texture where to copy the source pixels

y uint

Y offset in the texture where to copy the source pixels

Meta