gm-docs-parser 1.0.0

A collection of typings for GameMaker Studio 2 manual pages
Documentation
<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>

  <script type="text/javascript" language="JavaScript">
    //<![CDATA[
    function reDo() {
      if (innerWidth != origWidth || innerHeight != origHeight)
        location.reload();
    }
    if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
      origWidth = innerWidth;
      origHeight = innerHeight;
      onresize = reDo;
    }
    onerror = null;
  //]]>
  </script>
  <style type="text/css">/*<![CDATA[*/

    < !-- div.WebHelpPopupMenu {
      position: absolute;
      left: 0px;
      top: 0px;
      z-index: 4;
      visibility: hidden;
    }

    p.WebHelpNavBar {
      text-align: right;
    }

    -->
  
/*]]>*/</style>

  <script type="text/javascript">//<![CDATA[

    gRootRelPath = "../../../..";
    gCommonRootRelPath = "../../../..";
    gTopicId = "9.2.5.11.0_7";
  
//]]></script>

  <script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script>
<script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script>
  <link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"/>
  <link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"/>
  <meta name="topic-status" content="Draft"/>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>texture_global_scale</title>
  <meta name="generator" content="Adobe RoboHelp 2019"/>
  <link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"/>
  <meta name="rh-authors" content="Mark Alexander"/>
  <meta name="topic-comment" content="Reference page for ​texture_global_scale"/>
  <meta name="rh-index-keywords" content="texture_global_scale"/>
  <meta name="search-keywords" content="texture_global_scale"/>
</head>

<body>
  <div class="topic-header rh-hide" id="rh-topic-header" onclick="rh._.goToFullLayout()">
    <div class="logo">
    </div>
    <div class="nav">
      <div class="title" title="texture_global_scale">
        <span>texture_global_scale</span>
      </div>
      <div class="gotohome" title="Click here to see this page in full context">
        <span>Click here to see this page in full context</span>
      </div>
    </div>
  </div>
  <div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div>



  <!--<div class="body-scroll" style="top: 150px;">-->
  <h1>texture_global_scale</h1>
  <p>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:</p>
  <ul class="colour">
    <li>To set the texture pages to be 1:1 use <tt>texture_global_scale(1)</tt></li>
    <li>To half textures all the time use <tt>texture_global_scale(2)</tt></li>
    <li>To quarter them use <tt>texture_global_scale(4)</tt>, etc...</li>
  </ul>
  <p>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&#39;d probably want to call <a href="draw_texture_flush.htm"><tt>draw_texture_flush()</tt></a> before calling this function, then use the pre-fetch functions to get the correct
    texture pages into memory.</p>
  <p> </p>
  <h4>Syntax:</h4>
  <p class="code">texture_global_scale(pow2integer);</p>
  <table>
    <tbody>
      <tr>
        <th>Argument</th>
        <th>Description</th>
      </tr>
      <tr>
        <td>pow2integer</td>
        <td>The scale factor to use (1, no scale, 2, half scale, 4, quarter scale, etc...)</td>
      </tr>
    </tbody>
  </table>
  <p> </p>
  <h4>Returns:</h4>
  <p class="code">N/A</p>
  <p> </p>
  <h4>Example:</h4>
  <p class="code">draw_texture_flush();<br/> texture_global_scale(2);
    <br/> sprite_prefetch(spr_Trees);
  </p>
  <p>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 &quot;spr_Trees&quot; is contained within.</p>
  <p> </p>
  <p> </p>
  <p> </p>
  <div class="footer">
    <div class="buttons">
      <div class="clear">
        <div style="float:left">Back: <a href="Textures.htm">Textures</a></div>
        <div style="float:right">Next: <a href="draw_texture_flush.htm">draw_texture_flush</a></div>
      </div>
    </div>
    <h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
  </div>
  <!-- KEYWORDS
texture_global_scale
-->
  <!-- TAGS
texture_global_scale
-->

</body></html>