ImageTextureSetData Method |
Replaces the texture's data with a new Image.
Note: The texture has to be initialized first with the CreateFromImage(Image, UInt32) method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the CreateFromImage(Image, UInt32) method.
Use this method over CreateFromImage(Image, UInt32) if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.
Namespace: Godot
public void SetData( Image image )
[Missing <param name="image"/> documentation for "M:Godot.ImageTexture.SetData(Godot.Image)"]