TextureResource
Constructs a TextureResource from a file path.
Parameters
The file path of the texture.
The loading method; defaults to FROM_ASSETS.
Options for creating the texture resource.
Throws
If an error occurs during the loading process.
Constructs a TextureResource from a file path.
Parameters
The file path of the texture.
The loading method; defaults to FROM_ASSETS.
Throws
If an error occurs during the loading process.
Creates a TextureResource from a Bitmap.
Only a part of format is supported now:
Bitmap.Config.ARGB_8888
Bitmap.Config.RGBA_F16
If a Bitmap with unsupported format is given, an IllegalArgumentException will be thrown.
Note: Do not modify the bitmap while creating the texture resource.
Return
The created TextureResource.
Parameters
The source bitmap.
Throws
If an error occurs during the loading process.
If the bitmap has an unsupported format.