background_prefetch_multi(array);
Argument | Description |
---|---|
array | Array with the background indices to fetch |
Returns: N/A
This function can be used to prefetch (place into texture
memory) a number of texture pages that contain the background
given. You supply an array populated with the background indices
(as defined when you created the background asset) and the texture
pages that they are on will be loaded into memory.
NOTE: There is a performance hit as the texture is uploaded to texture memory on most devices, so it's recommended that you call background_preftech_multi on any required graphics at the start of a level to avoid any stalls.
bck_a[0] = bck_Trees;
bck_a[1] = bck_Clouds;
bck_a[2] = bck_Mountains;
bck_a[3] = bck_Tileset;
background_prefetch_multi(bck_a);
The above code creates an array where each element holds a background index. This array is then used to place those background textures into memory.