texturegroup_load

This function is used to load a Dynamic Texture Group from disk into RAM.

By default, it will also decompress and fetch the group into VRAM. This can be disabled by setting the second argument to false, which will leave you to manually pre-fetch it later or have it fetched automatically when an image is drawn from it.

If the Texture Group was loaded successfully, the function returns 0, otherwise it returns -1.

For information on its use, see: Dynamic Textures

 

Syntax:

texturegroup_load(groupname, [prefetch=true]);

ArgumentTypeDescription
groupnameStringThe name of the Texture Group as a string. These are defined in the Texture Groups window.
prefetchBooleanOPTIONAL If true (default), the group is decompressed and fetched into VRAM. If false, it's only loaded into RAM, remaining compressed.

 

Returns:

Real

 

Example:

var _loaded = texturegroup_load("tg_UI");

if (_loaded < 0)
{
    show_debug_message("tg_UI could not be loaded.");
}

This will attempt to load the Dynamic Texture Group with the name "tg_UI" into memory and also pre-fetch it.

If the Texture Group wasn't loaded, it prints a message to the output log.