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.7.0_17";
  
//]]></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>vertex_create_buffer</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 for vertex_create_buffer"/>
  <meta name="rh-index-keywords" content="vertex_create_buffer"/>
  <meta name="search-keywords" content="vertex_create_buffer"/>
</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="vertex_create_buffer">
        <span>vertex_create_buffer</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>vertex_create_buffer</h1>
  <p>With this function you can create a new vertex buffer. This is a special <i>grow</i> buffer created by GameMaker Studio 2 which is pre-formatted for use when building primitives (for use with shaders, for example). The function will return a
    &quot;Pointer&quot; (index) for the buffer which should then be used in all further calls to it.</p>
  <p>When using a vertex buffer created with this function you simply call <a href="vertex_begin.htm"><tt>vertex_begin()</tt></a> to start assigning vertex data to it to start to define your custom primitive, which will then be held in the buffer ready for
    submission to the shader. The buffer can be re-used when necessary (unless you have used the <a href="vertex_freeze.htm"><tt>vertex_freeze()</tt></a> function), with each call of <a href="vertex_begin.htm"><tt>vertex_begin()</tt></a> wiping the previous
    buffer data ready to accept the new data.</p>
  <p> </p>
  <h4>Syntax:</h4>
  <p class="code">vertex_create_buffer();</p>
  <p> </p>
  <h4>Returns:</h4>
  <p class="code">Pointer</p>
  <p> </p>
  <h4>Example:</h4>
  <p class="code">v_buff = vertex_create_buffer();</p>
  <p>The above code will create a new a new vertex buffer and store its handle in the variable &quot;v_buff&quot;.</p>
  <p> </p>
  <p> </p>
  <p> </p>
  <div class="footer">
    <div class="buttons">
      <div class="clear">
        <div style="float:left">Back: <a href="Primitives_And_Vertex_Formats.htm">Primitives And Vertex Formats</a></div>
        <div style="float:right">Next: <a href="vertex_create_buffer_ext.htm">vertex_create_buffer_ext</a></div>
      </div>
    </div>
    <h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
  </div>
  <!-- KEYWORDS
vertex_create_buffer
-->
  <!-- TAGS
vertex_create_buffer
-->

</body></html>