Documentation

nvg::LoadTexture

Function

Texture@ nvg::LoadTexture(const string&in filename, int flags = 0)

Load a texture for the NanoVG API.

string filename

The path of the texture to load. Must be relative to the root of your plugin. For legacy reasons, this can also be the user textures folder, or Openplanet's own textures folder.

int flags

Returns nvg::Texture@
Texture@ nvg::LoadTexture(MemoryBuffer&in buffer, int flags = 0)

Load a texture for the NanoVG API from a memory buffer.

MemoryBuffer buffer

The buffer to load the texture from. This must contain the raw bytes of an encoded image.

int flags

Returns nvg::Texture@