Used to control the scaling of the texture pages on load from the WAD file.



Argument Description
pow2integer The scale factor to use (1, no scale, 2, half scale, 4, quarter scale, etc...)

Returns: N/A


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. Note that textures pages are created on demand from the WAD, and so you can either call this at the start of the game to load all textures scaled, or you can call it at specific times to load specific textures, in which case you'd probably want to call draw_texture_flush before calling this function, then use the pre-fetch functions to get the correct texture pages into memory.



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.

Back: Textures
Next: draw_texture_flush
© Copyright YoYo Games Ltd. 2018 All Rights Reserved