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("Use update function.")
void
updateFromPixels
(
const(ubyte)[] pixels
,
uint width
,
uint height
,
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