Texture.update

Update the whole texture from an array of pixels.

The pixel array is assumed to have the same size as the area rectangle, and to contain 32-bits RGBA pixels.

No additional check is performed on the size of the pixel array, passing invalid arguments will lead to an undefined behavior.

This function does nothing if pixels is empty or if the texture was not previously created.

Parameters

pixels const(ubyte)[]

Array of pixels to copy to the texture.

Meta