Skip to content

Commit

Permalink
[General] Document that you can't create buffers larger than 2 Gibiby…
Browse files Browse the repository at this point in the history
  • Loading branch information
gurpreetsinghmatharoo committed Jan 15, 2024
1 parent 1bf5e4e commit 15ab1ef
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ <h1><span data-field="title" data-format="default">buffer_create</span></h1>
<li>Floats of up to 64bits should be aligned to 8 bytes.</li>
</ul>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> Byte alignment can be very important as the wrong choice may adversely affect performance.</p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_important.hts"> </span> You cannot create buffers that are 2 Gibibytes (<span>2,147,483,648 bytes) or larger.</span></p>
<div data-conref="../../../assets/snippets/Note_Buffer_Delete_Dynamic.hts"> </div>
<p> </p>
<h4>Syntax:</h4>
Expand All @@ -44,24 +45,24 @@ <h4>Syntax:</h4>
</tr>
<tr>
<td>size</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The size (in bytes) of the buffer.</td>
</tr>
<tr>
<td>type</td>
<td><span data-keyref="Type_Constant_Buffer_Type"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer Type Constant</a></span></td>
<td><span data-keyref="Type_Constant_Buffer_Type"><a href="buffer_create.htm" target="_blank">Buffer Type Constant</a></span></td>
<td>The type of buffer to create (see the constants list above).</td>
</tr>
<tr>
<td>alignment</td>
<td><span data-keyref="Type_Real"><a href="../../../../GameMaker_Language/GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td><span data-keyref="Type_Real"><a href="../../GML_Overview/Data_Types.htm" target="_blank">Real</a></span></td>
<td>The byte alignment for the buffer</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Returns:</h4>
<p class="code"><span data-keyref="Type_ID_Buffer"><a href="../../../../GameMaker_Language/GML_Reference/Buffers/buffer_create.htm" target="_blank">Buffer</a></span></p>
<p class="code"><span data-keyref="Type_ID_Buffer"><a href="buffer_create.htm" target="_blank">Buffer</a></span></p>
<p> </p>
<h4>Example:</h4>
<p class="code">player_buffer = <span data-field="title" data-format="default">buffer_create</span>(16384, buffer_fixed, 2);</p>
Expand Down

0 comments on commit 15ab1ef

Please sign in to comment.