loadTexture function

Texture2D loadTexture(
  1. String fileName
)

Load texture from file into GPU memory (VRAM).

Implementation

Texture2D loadTexture(String fileName) {
  return Texture2D.fromRef(
    library.LoadTexture(
      string.toNative(fileName),
    ),
  );
}