Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 10, 2024
2 parents 02860ca + f95a1b7 commit ab01953
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="../../../assets/css/default.css" type="text/css" />
<script src="../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
<meta name="topic-comment" content="Page outlining the do / until functions" />
<meta name="topic-comment" content="Page outlining the do / until loop" />
<meta name="rh-index-keywords" content="do,until" />
<meta name="search-keywords" content="do,until" />
</head>
Expand Down Expand Up @@ -37,9 +37,9 @@ <h1>hacer / hasta que</h1>
do<br />
{<br />
    _id = list[| 0];<br />
    if (instance_exists(_id)) <br />
    if (instance_exists(_id))<br />
    {<br />
        _break;<br />
        break;<br />
    }<br />
    ds_list_delete(list, 0);<br />
}<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h4>Example 1: Basic Use</h4>
<h4>Example 2: Step Size</h4>
<p class="code_heading">Create Event</p>
<p class="code">my_var = 1.2;<br />
<span data-field="title" data-format="default">dbg_slider</span>(ref_create(self, &quot;my_var&quot;), 0, 10, 0.2);
<span data-field="title" data-format="default">dbg_slider</span>(ref_create(self, &quot;my_var&quot;), 0, 10, &quot;my_var&quot;, 0.2);
</p>
<p>The above code is executed in an <a href="../Asset_Management/Objects/Objects.htm">object</a>&#39;s Create event, or in any other event that isn&#39;t performed continuously. An instance variable <span class="inline2">my_var</span> is initialised and a slider control is created. The slider receives a reference to the variable and its minimum and maximum value are set to 0 and 10 respectively. Dragging the slider changes the value of the <span class="inline2">my_var</span> variable in increments of 0.2.</p>
<p> </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h4>Returns:</h4>
<h4>Example:</h4>
<p class="code_heading">Create Event</p>
<p class="code">my_var = 127;<br />
<span data-field="title" data-format="default">dbg_slider_int</span>(ref_create(my_var), 0, 200, &quot;Variable&quot;);
<span data-field="title" data-format="default">dbg_slider_int</span>(ref_create(self, &quot;my_var&quot;), 0, 200, &quot;Variable&quot;);
</p>
<p>The above code is executed in an <a href="../Asset_Management/Objects/Objects.htm">object</a>&#39;s Create event, or in any other event that isn&#39;t performed continuously. First, an <a href="../../GML_Overview/Variables/Instance_Variables.htm">instance variable</a> <span class="inline2">my_var</span> is set. Then, an integer slider control is created using <span class="inline3_func"><span data-field="title" data-format="default">dbg_slider_int</span></span>. The function receives a reference to the variable, returned by <span class="inline3_func"><a data-xref="{title}" href="../Variable_Functions/ref_create.htm">ref_create</a></span>, values of 0 and 200 for the <span class="inline2">minimum</span> and <span class="inline2">maximum</span> parameters and a label <span class="inline2">&quot;Variable&quot;</span>. Dragging the slider changes the value of the instance&#39;s <span class="inline2">my_var</span> variable in steps of 1.</p>
<p> </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>gpu_set_colorwriteenable</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<title>gpu_set_colourwriteenable</title>
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css" />
<script src="../../../../assets/scripts/main_script.js"></script>
<meta name="rh-authors" content="Mark Alexander" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@
<body>
<h1><span data-field="title" data-format="default">gpu_set_sprite_cull</span></h1>
<p>This function sets whether (frustum) culling of sprites is enabled globally or not.</p>
<p>When enabled, sprites will be <em>culled</em> against the view frustum, i.e. they&#39;re not submitted to the GPU and aren&#39;t drawn when fully out of sight.</p>
<h3>(View) Frustum Culling</h3>
<p>When enabled, sprites are checked against the view frustum on the CPU and <em>culled</em> (i.e. removed) if they&#39;re fully outside. Sprites that are culled are not submitted to the GPU (i.e. drawn).</p>
<p class="note"><span data-conref="../../../../assets/snippets/Tag_note.hts"> </span> Sprite culling applies to all sprites that are drawn in your game, either manually using the <span class="inline3_func">draw_sprite_*</span> functions, as elements on asset layers or as part of sequences. Culling is only performed on sprites.</p>
<h3 id="frustum_culling">(View) Frustum Culling</h3>
<p>The <em>view frustum</em> is the region of the game world that a camera sees. It is determined by the camera&#39;s position and orientation in the game world as well as by the projection it has set: </p>
<ul class="colour">
<li>in case of an <a href="../../Maths_And_Numbers/Matrix_Functions/matrix_build_projection_ortho.htm" title="matrix_build_projection_ortho">orthographic projection</a> it is a box shape.</li>
<li>in case of a <a href="../../Maths_And_Numbers/Matrix_Functions/matrix_build_projection_perspective.htm" title="matrix_build_projection_perspective">perspective</a> <a href="../../Maths_And_Numbers/Matrix_Functions/matrix_build_projection_perspective_fov.htm" title="matrix_build_projection_perspective_fov">projection</a> it is a truncated pyramid shape.</li>
</ul>
<p> </p>
<figure><img class="center" height="387" src="../../../../assets/Images/Asset_Editors/Camera_Example.png" title="" width="854" />
<figcaption>Any sprites that are fully outside of the Camera View (or Frustum) are culled, i.e. not submitted to the GPU for drawing</figcaption>
</figure>
<p>View frustum culling is one type of visibility culling, where the CPU checks if a shape is inside the view frustum or not.</p>
<p>To determine if a sprite is visible <span data-keyref="GameMaker Name">GameMaker</span> calculates a sphere around the sprite and checks if this sphere is inside the view frustum. When the sphere is fully outside of it, the sprite must be, too, and is culled, i.e. not submitted for drawing.</p>
<p><img class="center" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/sprite_cull_bounding_sphere.png" /></p>
<p class="note"><span data-conref="../../../../assets/snippets/Tag_note.hts"> </span> The sprite&#39;s scale factor and the <a href="../../Maths_And_Numbers/Matrix_Functions/matrix_set.htm" title="matrix_set()">world matrix</a> are taken into account when performing sprite culling.</p>
<p> </p>
<h4>Syntax:</h4>
<p class="code"><span data-field="title" data-format="default">gpu_set_sprite_cull</span>(enable);</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h2>Automatic Optimisations</h2>
</li>
</ul>
<p class="note"><span><span data-conref="../../assets/snippets/Tag_note.hts"> </span> The compiler will only optimise when the arguments are constants that it can evaluate.</span></p>
<p>The following functions are optimised by the compiler: </p>
<p>The following functions are optimised by the compiler, according to the rule for deterministic functions when it detects that the parameters are constant (i.e. they cannot change at runtime)</p>
<ul class="colour">
<li><a data-xref="{title}" href="../../GameMaker_Language/GML_Reference/Drawing/Colour_And_Alpha/make_colour_rgb.htm">make_colour_rgb</a></li>
<li><a data-xref="{title}" href="../../GameMaker_Language/GML_Reference/Strings/string_lower.htm">string_lower</a></li>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ab01953

Please sign in to comment.