|pow2integer||The scale factor to use (1, no scale, 2, half scale, 4, quarter scale, etc...)|
This function allows you to control the scaling of the texture pages on load from the WAD file that is part of your final game executable. The input value must be a power of two value and will work such that:
In this way you can better control texture page memory usage on
platforms with low memory issues, although note that for Windows,
you will need to have checked the Create Textures On Demand
option in the
Global Game Settings - Graphics and then call the function
before loading any scaled textures.
The above code will flush all textures from memory, then set the texture scaling to 2 (so texture pages are half size) and then finally pre-fetch the texture page that the sprite "spr_Trees" is contained within.