texturegroup_get_textures


Description

This function can be used to retrieve the texture page IDs of the individual pages that make up a texture group. You supply the texture group ID string (as defined in the Texture Group Editor), and the function will return a 1D array, where each entry in the array is a single texture page ID. If the function fails - ie: an invalid group is given, or the group has no texture assigned to it - then the array will be empty (0 length).


Syntax:

texturegroup_get_textures(tex_id);

Argument Description
tex_id The name of the texture group to check (a string)


Returns:

1D array


Example:

var _tex_array = texturegroup_get_textures( "MainMenu");
for (var i = 0; i < array_length_1d(_tex_array); ++i;)
    {
    if texture_is_ready(_tex_array[i])
        {
        texture_prefetch(_tex_array[i]);
        }
    }

The above code will retrieve the texture page IDs for the texture group "MainMenu", then check to see if they are unpacked, and if they are them they are placed into VRAM.