load

fun load(path: String): Texture2D

Loads a texture from the specified file path.

Return

A Texture2D object representing the loaded texture.

Parameters

path

The file path of the texture to load.


fun load(file: File): Texture2D

Loads a texture from the specified file path.

Return

A Texture2D object representing the loaded texture.

Parameters

file

The file of the texture to load