The texture argument refers to a texture that must exist as long as the
shape uses it. Indeed, the shape doesn't store its own copy of the
texture, but rather keeps a pointer to the one that you passed to this
function. If the source texture is destroyed and the shape tries to use
it, the behaviour is undefined. texture can be NULL to disable texturing.
If resetRect is true, the TextureRect property of the shape is
automatically adjusted to the size of the new texture. If it is false,
the texture rect is left unchanged.
Change the source texture of the shape.
The texture argument refers to a texture that must exist as long as the shape uses it. Indeed, the shape doesn't store its own copy of the texture, but rather keeps a pointer to the one that you passed to this function. If the source texture is destroyed and the shape tries to use it, the behaviour is undefined. texture can be NULL to disable texturing.
If resetRect is true, the TextureRect property of the shape is automatically adjusted to the size of the new texture. If it is false, the texture rect is left unchanged.