|ind||The index (resource name) of the sprite asset to flush|
With this function you can remove the given sprite texture - and
the texture page it is on - from video memory (the texture page
will be reloaded on next use). You supply the sprite index (as
defined when creating the sprite resource) and it will be removed
from the texture memory. It is worth noting that by default
on the Windows platforms (YYC and standard) all textures will
always be loaded into memory on start-up. If you are making a cross
platform game, then you can leave this function in your code for
the Windows target as it will not give any error and just not do
anything. However you can also force the Windows target to not load
any textures on startup and so use the flush and prefetch functions
as you would on all other platforms (the setting can be found in
Windows Global Game Settings window).
NOTE: There is a performance hit as the texture is uploaded to texture memory on most devices, so you can call sprite_prefetch on any required graphics at the start of a level to avoid any stalls.
The above code flushes the sprite "spr_Player_Aura" from memory.