background_prefetch

Fetch the texture page for a given background asset.

Syntax:

background_prefetch(ind);


Argument Description
ind The background index to fetch


Returns: N/A


Description

This function can be used to prefetch (place into texture memory) a texture page with the given background. You supply the background index as defined when you created the background asset, and the texture page it is 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 on any required graphics at the start of a level to avoid any stalls.


Example:

background_prefetch(bck_Trees);

The above code will place the referenced background into texture memory ready for use.


Back: Backgrounds
Next: background_prefetch_multi
© Copyright YoYo Games Ltd. 2018 All Rights Reserved