<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * @example graphics/printing/both-screen-text/source/main.c</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> * @example graphics/printing/colored-text/source/main.c</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> * @example graphics/printing/multiple-windows-text/source/main.c</span></div>
-<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"></span></div>
+<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> * @example graphics/gpu/fragment_light/source/main.c</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"> * @example graphics/gpu/geoshader/source/main.c</span></div>
-<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"> graphics/gpu/geoshader/source/gpu.h</span></div>
-<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> @include graphics/gpu/geoshader/source/gpu.h</span></div>
-<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"> graphics/gpu/geoshader/source/gpu.c</span></div>
-<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> @include graphics/gpu/geoshader/source/gpu.c</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> graphics/gpu/geoshader/source/3dmath.h</span></div>
-<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> @include graphics/gpu/geoshader/source/3dmath.h</span></div>
-<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> graphics/gpu/geoshader/source/3dmath.c</span></div>
-<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> @include graphics/gpu/geoshader/source/3dmath.c</span></div>
-<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> graphics/gpu/geoshader/source/vshader.pica</span></div>
-<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> @include graphics/gpu/geoshader/source/vshader.pica</span></div>
-<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> graphics/gpu/geoshader/source/gshader.pica</span></div>
-<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> @include graphics/gpu/geoshader/source/gshader.pica</span></div>
-<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"></span></div>
-<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> </span></div>
-<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> * @example graphics/gpu/simple_tri/source/main.c</span></div>
-<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> graphics/gpu/simple_tri/source/gpu.h</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> @include graphics/gpu/simple_tri/source/gpu.h</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> graphics/gpu/simple_tri/source/gpu.c</span></div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> @include graphics/gpu/simple_tri/source/gpu.c</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> graphics/gpu/simple_tri/source/3dmath.h</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> @include graphics/gpu/simple_tri/source/3dmath.h</span></div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> graphics/gpu/simple_tri/source/3dmath.c</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> @include graphics/gpu/simple_tri/source/3dmath.c</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> graphics/gpu/simple_tri/source/vshader.pica</span></div>
-<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> @include graphics/gpu/simple_tri/source/vshader.pica</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"></span></div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> </span></div>
-<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * @example graphics/gpu/textured_cube/source/main.c</span></div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> graphics/gpu/textured_cube/source/gpu.h</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> @include graphics/gpu/textured_cube/source/gpu.h</span></div>
-<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> graphics/gpu/textured_cube/source/gpu.c</span></div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> @include graphics/gpu/textured_cube/source/gpu.c</span></div>
-<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> graphics/gpu/textured_cube/source/3dmath.h</span></div>
-<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> @include graphics/gpu/textured_cube/source/3dmath.h</span></div>
-<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> graphics/gpu/textured_cube/source/3dmath.c</span></div>
-<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> @include graphics/gpu/textured_cube/source/3dmath.c</span></div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> graphics/gpu/textured_cube/source/vshader.pica</span></div>
-<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> @include graphics/gpu/textured_cube/source/vshader.pica</span></div>
-<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"></span></div>
-<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> * @example http/source/main.c</span></div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"> * @example input/read-controls/source/main.c</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> * @example input/touch-screen/source/main.c</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> * @example libapplet_launch/source/main.c</span></div>
-<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> * @example mvd/source/main.c</span></div>
-<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"> * @example qtm/source/main.c</span></div>
-<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment"> * @example sdmc/source/main.c</span></div>
-<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment"> * @example threads/thread-basic/source/main.c</span></div>
-<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"> * @example threads/event/source/main.c</span></div>
-<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"> * @example time/rtc/source/main.c</span></div>
-<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div>
+<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"> * @example graphics/gpu/gpusprites/source/main.c</span></div>
+<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> * @example graphics/gpu/immediate/source/main.c</span></div>
+<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"> * @example graphics/gpu/simple_tri/source/main.c</span></div>
+<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * @example graphics/gpu/textured_cube/source/main.c</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * @example http/source/main.c</span></div>
+<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * @example input/read-controls/source/main.c</span></div>
+<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * @example input/touch-screen/source/main.c</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * @example libapplet_launch/source/main.c</span></div>
+<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> * @example mvd/source/main.c</span></div>
+<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> * @example qtm/source/main.c</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * @example sdmc/source/main.c</span></div>
+<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * @example threads/thread-basic/source/main.c</span></div>
+<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> * @example threads/event/source/main.c</span></div>
+<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * @example time/rtc/source/main.c</span></div>
+<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div>
<div class="ttc" id="gsplcd_8h_html"><div class="ttname"><a href="gsplcd_8h.html">gsplcd.h</a></div><div class="ttdoc">GSPLCD service. </div></div>
<div class="ttc" id="srvpm_8h_html"><div class="ttname"><a href="srvpm_8h.html">srvpm.h</a></div><div class="ttdoc">srv:pm service. </div></div>
<div class="ttc" id="shaderProgram_8h_html"><div class="ttname"><a href="shaderProgram_8h.html">shaderProgram.h</a></div><div class="ttdoc">Functions for working with shaders. </div></div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<a class="el" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="am_8h.html#a022d7fdd04454fd2300588b539a9da4a">AM_InstallNativeFirm</a> (void)</td></tr>
<tr class="memdesc:a022d7fdd04454fd2300588b539a9da4a"><td class="mdescLeft"> </td><td class="mdescRight">Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/) <br /></td></tr>
<tr class="separator:a022d7fdd04454fd2300588b539a9da4a"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a04a92770482e500d5da2995e0d4a1bc1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04a92770482e500d5da2995e0d4a1bc1"></a>
+<a class="el" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="am_8h.html#a04a92770482e500d5da2995e0d4a1bc1">AM_InstallFirm</a> (<a class="el" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> titleID)</td></tr>
+<tr class="memdesc:a04a92770482e500d5da2995e0d4a1bc1"><td class="mdescLeft"> </td><td class="mdescRight">Similar to InstallNativeFirm, but doesn't use AMPXI_GetTitleList (NATIVE_FIRM: 0004013800000002 or 0004013820000002 (N3DS)) <br /></td></tr>
+<tr class="separator:a04a92770482e500d5da2995e0d4a1bc1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a90c6dfe2f8f65a5842811fb2cd0589af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="am_8h.html#a90c6dfe2f8f65a5842811fb2cd0589af">AM_GetTitleProductCode</a> (<a class="el" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> mediatype, <a class="el" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> titleID, char *productCode)</td></tr>
<tr class="memdesc:a90c6dfe2f8f65a5842811fb2cd0589af"><td class="mdescLeft"> </td><td class="mdescRight">Gets the product code of a title. <a href="#a90c6dfe2f8f65a5842811fb2cd0589af">More...</a><br /></td></tr>
<tr class="separator:a90c6dfe2f8f65a5842811fb2cd0589af"><td class="memSeparator" colspan="2"> </td></tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment">/// Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a022d7fdd04454fd2300588b539a9da4a">AM_InstallNativeFirm</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"></span></div>
-<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> * @brief Gets the product code of a title.</span></div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> * @param mediatype Mediatype of the title.</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> * @param titleID ID of the title.</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> * @param productCode Buffer to output the product code to. (length = 16)</span></div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a90c6dfe2f8f65a5842811fb2cd0589af">AM_GetTitleProductCode</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> mediatype, <a class="code" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> titleID, <span class="keywordtype">char</span>* productCode);</div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"></span></div>
-<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> * @brief Gets an AM_TitleEntry instance for a CIA file.</span></div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> * @param mediatype Mediatype that this CIA would be installed to.</span></div>
-<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * @param titleEntry Pointer to write the AM_TitleEntry instance to.</span></div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> * @param fileHandle Handle of the CIA file to read.</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#ab24393616aede722605b83f17b021a7a">AM_GetCiaFileInfo</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> mediatype, <a class="code" href="structAM__TitleEntry.html">AM_TitleEntry</a> *titleEntry, <a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> fileHandle);</div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"></span></div>
-<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> * @brief Initializes the external (SD) title database.</span></div>
-<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> * @param overwrite Overwrites the database if it already exists.</span></div>
-<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a469ba855d3817fa86091baa17d136676">AM_InitializeExternalTitleDatabase</a>(<span class="keywordtype">bool</span> overwrite);</div>
-<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"></span></div>
-<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> * @brief Queries whether the external title database is available.</span></div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"> * @param[out] available Pointer to output the availability status to.</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a505ee8fcca3984f1ebc21930c5a99813">AM_QueryAvailableExternalTitleDatabase</a>(<span class="keywordtype">bool</span>* available);</div>
+<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment">/// Similar to InstallNativeFirm, but doesn't use AMPXI_GetTitleList (NATIVE_FIRM: 0004013800000002 or 0004013820000002 (N3DS))</span></div>
+<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a04a92770482e500d5da2995e0d4a1bc1">AM_InstallFirm</a>(<a class="code" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> titleID);</div>
+<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"></span></div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> * @brief Gets the product code of a title.</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> * @param mediatype Mediatype of the title.</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> * @param titleID ID of the title.</span></div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * @param productCode Buffer to output the product code to. (length = 16)</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a90c6dfe2f8f65a5842811fb2cd0589af">AM_GetTitleProductCode</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> mediatype, <a class="code" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> titleID, <span class="keywordtype">char</span>* productCode);</div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"></span></div>
+<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> * @brief Gets an AM_TitleEntry instance for a CIA file.</span></div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * @param mediatype Mediatype that this CIA would be installed to.</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> * @param titleEntry Pointer to write the AM_TitleEntry instance to.</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> * @param fileHandle Handle of the CIA file to read.</span></div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#ab24393616aede722605b83f17b021a7a">AM_GetCiaFileInfo</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> mediatype, <a class="code" href="structAM__TitleEntry.html">AM_TitleEntry</a> *titleEntry, <a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> fileHandle);</div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"></span></div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> * @brief Initializes the external (SD) title database.</span></div>
+<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> * @param overwrite Overwrites the database if it already exists.</span></div>
+<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a469ba855d3817fa86091baa17d136676">AM_InitializeExternalTitleDatabase</a>(<span class="keywordtype">bool</span> overwrite);</div>
+<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"></span></div>
+<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> * @brief Queries whether the external title database is available.</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> * @param[out] available Pointer to output the availability status to.</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="am_8h.html#a505ee8fcca3984f1ebc21930c5a99813">AM_QueryAvailableExternalTitleDatabase</a>(<span class="keywordtype">bool</span>* available);</div>
<div class="ttc" id="am_8h_html_a791fb482056b39b063bcffb987b9e7f0"><div class="ttname"><a href="am_8h.html#a791fb482056b39b063bcffb987b9e7f0">AM_DeleteAppTitle</a></div><div class="ttdeci">Result AM_DeleteAppTitle(u8 mediatype, u64 titleID)</div><div class="ttdoc">Deletes a title, provided that it is not a system title. </div></div>
<div class="ttc" id="am_8h_html_aceae39c1e445980f5a23a7cc70d45843"><div class="ttname"><a href="am_8h.html#aceae39c1e445980f5a23a7cc70d45843">AM_GetTitleIdList</a></div><div class="ttdeci">Result AM_GetTitleIdList(u8 mediatype, u32 count, u64 *titleIDs)</div><div class="ttdoc">Gets a list of title IDs present in a mediatype. </div></div>
<div class="ttc" id="am_8h_html_af5163db1ac0ca50112e403cfc6f4f52a"><div class="ttname"><a href="am_8h.html#af5163db1ac0ca50112e403cfc6f4f52a">AM_FinishCiaInstall</a></div><div class="ttdeci">Result AM_FinishCiaInstall(u8 mediatype, Handle *ciaHandle)</div><div class="ttdoc">Finalizes the CIA install process. </div></div>
<div class="ttc" id="am_8h_html_aa14c82d746e8e7912f45ca94d4275de1"><div class="ttname"><a href="am_8h.html#aa14c82d746e8e7912f45ca94d4275de1">AM_CancelCIAInstall</a></div><div class="ttdeci">Result AM_CancelCIAInstall(Handle *ciaHandle)</div><div class="ttdoc">Aborts the CIA install process. </div></div>
<div class="ttc" id="types_8h_html_ab6d744c6b5de129f12937e482dc674fb"><div class="ttname"><a href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a></div><div class="ttdeci">u32 Handle</div><div class="ttdoc">Resource handle. </div><div class="ttdef"><b>Definition:</b> types.h:41</div></div>
<div class="ttc" id="am_8h_html_a3d9438a9ed27a0372c4845520a685c9e"><div class="ttname"><a href="am_8h.html#a3d9438a9ed27a0372c4845520a685c9e">AM_StartDlpChildCiaInstall</a></div><div class="ttdeci">Result AM_StartDlpChildCiaInstall(Handle *ciaHandle)</div><div class="ttdoc">Initializes the CIA install process for Download Play CIAs, returning a handle to write CIA data to...</div></div>
+<div class="ttc" id="am_8h_html_a04a92770482e500d5da2995e0d4a1bc1"><div class="ttname"><a href="am_8h.html#a04a92770482e500d5da2995e0d4a1bc1">AM_InstallFirm</a></div><div class="ttdeci">Result AM_InstallFirm(u64 titleID)</div><div class="ttdoc">Similar to InstallNativeFirm, but doesn't use AMPXI_GetTitleList (NATIVE_FIRM: 0004013800000002 or 00...</div></div>
<div class="ttc" id="types_8h_html_a92c50087ca0e64fa93fc59402c55f8ca"><div class="ttname"><a href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdoc">would be nice if newlib had this already </div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
<div class="ttc" id="types_8h_html_a3f7e2bcbb0b4c338f3c4f6c937cd4234"><div class="ttname"><a href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a></div><div class="ttdeci">uint64_t u64</div><div class="ttdoc">64-bit unsigned integer </div><div class="ttdef"><b>Definition:</b> types.h:24</div></div>
<div class="ttc" id="am_8h_html_a0c5fe613e72c2906b52cec80143d5953"><div class="ttname"><a href="am_8h.html#a0c5fe613e72c2906b52cec80143d5953">AM_ListTitles</a></div><div class="ttdeci">Result AM_ListTitles(u8 mediatype, u32 titleCount, u64 *titleIdList, AM_TitleEntry *titleList)</div><div class="ttdoc">Gets a list of details about installed titles. </div></div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<p>Processes the current APT status. </p>
<p>Generally used within a main loop. </p><dl class="section return"><dt>Returns</dt><dd>Whether the application is closing. </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a1">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a8">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a5">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a7">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a67">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a66">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a77">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a6">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a3">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a3">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a6">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a17">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a3">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a3">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a3">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a20">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a6">qtm/source/main.c</a>, <a class="el" href="sdmc_2source_2main_8c-example.html#a4">sdmc/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a8">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a8">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a3">time/rtc/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a1">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a8">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a5">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a7">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a27">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a23">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a31">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a20">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a22">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a26">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a6">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a3">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a3">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a6">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a17">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a3">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a3">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a3">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a20">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a6">qtm/source/main.c</a>, <a class="el" href="sdmc_2source_2main_8c-example.html#a4">sdmc/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a8">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a8">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a3">time/rtc/source/main.c</a>.</dd>
</dl>
</div>
</div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li><a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html">graphics/bitmap/24bit-color/source/main.c</a></li>
+<li><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html">graphics/gpu/fragment_light/source/main.c</a></li>
+
<li><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html">graphics/gpu/geoshader/source/main.c</a></li>
+<li><a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html">graphics/gpu/gpusprites/source/main.c</a></li>
+
+<li><a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html">graphics/gpu/immediate/source/main.c</a></li>
+
<li><a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html">graphics/gpu/simple_tri/source/main.c</a></li>
<li><a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html">graphics/gpu/textured_cube/source/main.c</a></li>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr class="memitem:a7b5743ba9ce490263b12d1575af7ebc1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a7b5743ba9ce490263b12d1575af7ebc1">gfxSet3D</a> (bool enable)</td></tr>
<tr class="memdesc:a7b5743ba9ce490263b12d1575af7ebc1"><td class="mdescLeft"> </td><td class="mdescRight">Enables the 3D stereoscopic effect. <a href="#a7b5743ba9ce490263b12d1575af7ebc1">More...</a><br /></td></tr>
<tr class="separator:a7b5743ba9ce490263b12d1575af7ebc1"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a07c2e95d490e338a8b87030124f58a60"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a07c2e95d490e338a8b87030124f58a60">gfxIs3D</a> (void)</td></tr>
+<tr class="memdesc:a07c2e95d490e338a8b87030124f58a60"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the status of the 3D stereoscopic effect. <a href="#a07c2e95d490e338a8b87030124f58a60">More...</a><br /></td></tr>
+<tr class="separator:a07c2e95d490e338a8b87030124f58a60"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3bfb0d00d8bbf7be08ece053a1b6ce8a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a3bfb0d00d8bbf7be08ece053a1b6ce8a">gfxSetScreenFormat</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="el" href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708">GSPGPU_FramebufferFormats</a> format)</td></tr>
<tr class="memdesc:a3bfb0d00d8bbf7be08ece053a1b6ce8a"><td class="mdescLeft"> </td><td class="mdescRight">Changes the color format of a screen. <a href="#a3bfb0d00d8bbf7be08ece053a1b6ce8a">More...</a><br /></td></tr>
<tr class="separator:a3bfb0d00d8bbf7be08ece053a1b6ce8a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aea1808bd74fe0c00f9794e455fc8499b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#aea1808bd74fe0c00f9794e455fc8499b">gfxFlushBuffers</a> (void)</td></tr>
<tr class="memdesc:aea1808bd74fe0c00f9794e455fc8499b"><td class="mdescLeft"> </td><td class="mdescRight">Flushes the current framebuffers. <a href="#aea1808bd74fe0c00f9794e455fc8499b">More...</a><br /></td></tr>
<tr class="separator:aea1808bd74fe0c00f9794e455fc8499b"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a848357d4a31b6ccd7ead1e9feb69b935"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a848357d4a31b6ccd7ead1e9feb69b935">gfxConfigScreen</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> scr, bool immediate)</td></tr>
+<tr class="memdesc:a848357d4a31b6ccd7ead1e9feb69b935"><td class="mdescLeft"> </td><td class="mdescRight">Updates the configuration of the specified screen (swapping the buffers if double-buffering is enabled). <a href="#a848357d4a31b6ccd7ead1e9feb69b935">More...</a><br /></td></tr>
+<tr class="separator:a848357d4a31b6ccd7ead1e9feb69b935"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f338920111994110975dc0d1360bb1f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a0f338920111994110975dc0d1360bb1f">gfxSwapBuffers</a> (void)</td></tr>
<tr class="memdesc:a0f338920111994110975dc0d1360bb1f"><td class="mdescLeft"> </td><td class="mdescRight">Swaps the buffers and sets the gsp state. <a href="#a0f338920111994110975dc0d1360bb1f">More...</a><br /></td></tr>
<tr class="separator:a0f338920111994110975dc0d1360bb1f"><td class="memSeparator" colspan="2"> </td></tr>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
+<a class="anchor" id="a848357d4a31b6ccd7ead1e9feb69b935"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void gfxConfigScreen </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> </td>
+ <td class="paramname"><em>scr</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool </td>
+ <td class="paramname"><em>immediate</em> </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Updates the configuration of the specified screen (swapping the buffers if double-buffering is enabled). </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">scr</td><td>Screen to configure. </td></tr>
+ <tr><td class="paramname">immediate</td><td>Whether to apply the updated configuration immediately or let GSPGPU apply it after the next GX transfer completes. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
<a class="anchor" id="aa446ccfdfdd4c575e648956ae96f2a3b"></a>
<div class="memitem">
<div class="memproto">
<p>Closes the gsp service and frees the framebuffers. </p>
<p>Just call it when you're done. </p>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a12">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a33">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a13">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a14">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a73">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a72">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a83">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a13">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a10">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a10">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a13">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a22">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a18">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a14">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a13">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a25">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a26">qtm/source/main.c</a>, <a class="el" href="sdmc_2source_2main_8c-example.html#a12">sdmc/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a19">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a18">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a10">time/rtc/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a12">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a33">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a13">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a14">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a32">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a27">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a35">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a24">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a26">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a30">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a13">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a10">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a10">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a13">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a22">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a18">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a14">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a13">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a25">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a26">qtm/source/main.c</a>, <a class="el" href="sdmc_2source_2main_8c-example.html#a12">sdmc/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a19">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a18">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a10">time/rtc/source/main.c</a>.</dd>
</dl>
</div>
</div>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the current framebuffer of the choosen screen.</dd></dl>
<p>Please remember that the returned pointer will change after each call to gfxSwapBuffers if double buffering is enabled. </p>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a5">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a37">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a37">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a37">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a6">http/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a0">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a11">qtm/source/main.c</a>, and <a class="el" href="sdmc_2source_2main_8c-example.html#a0">sdmc/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a5">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a6">http/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a0">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a11">qtm/source/main.c</a>, and <a class="el" href="sdmc_2source_2main_8c-example.html#a0">sdmc/source/main.c</a>.</dd>
</dl>
</div>
</div>
<p>Initializes the LCD framebuffers with default parameters. </p>
<p>By default ctrulib will configure the LCD framebuffers with the <a class="el" href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708a7e2e54f5d000504cd971d23bf2d2b58f">GSP_BGR8_OES</a> format in linear memory. This is the same as calling :</p><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> gfxInit(GSP_BGR8_OES,GSP_BGR8_OES,false); </div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>You should always call <a class="el" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a> once done to free the memory and services </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a0">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a0">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a0">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a0">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a66">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a65">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a76">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a0">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a0">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a0">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a0">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a11">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a0">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a0">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a0">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a18">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a1">qtm/source/main.c</a>, <a class="el" href="sdmc_2source_2main_8c-example.html#a3">sdmc/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a3">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a2">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a0">time/rtc/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a0">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a0">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a0">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a0">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a20">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a18">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a26">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a15">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a17">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a21">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a0">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a0">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a0">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a0">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a11">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a0">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a0">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a0">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a18">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a1">qtm/source/main.c</a>, <a class="el" href="sdmc_2source_2main_8c-example.html#a3">sdmc/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a3">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a2">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a0">time/rtc/source/main.c</a>.</dd>
</dl>
+</div>
+</div>
+<a class="anchor" id="a07c2e95d490e338a8b87030124f58a60"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">bool gfxIs3D </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Retrieves the status of the 3D stereoscopic effect. </p>
+<dl class="section return"><dt>Returns</dt><dd>true if 3D enabled, false otherwise. </dd></dl>
+
</div>
</div>
<a class="anchor" id="a7b5743ba9ce490263b12d1575af7ebc1"></a>
</table>
</dd>
</dl>
-
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a21">graphics/gpu/fragment_light/source/main.c</a>.</dd>
+</dl>
</div>
</div>
<a class="anchor" id="ad5c1216a99f555bbc619a157b4295dcb"></a>
<p>Swaps the framebuffers. </p>
<p>This is the version to be used with the GPU since the GPU will use the gsp shared memory, so the gsp state mustn't be set directly by the user. </p>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a69">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a68">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a79">graphics/gpu/textured_cube/source/main.c</a>, and <a class="el" href="sdmc_2source_2main_8c-example.html#a9">sdmc/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="sdmc_2source_2main_8c-example.html#a9">sdmc/source/main.c</a>.</dd>
</dl>
</div>
</div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a7b5743ba9ce490263b12d1575af7ebc1">gfxSet3D</a>(<span class="keywordtype">bool</span> enable);</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"></span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> * @brief Changes the color format of a screen</span></div>
-<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"> * @param screen The screen of which format should be changed</span></div>
-<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * @param format One of the gsp pixel formats.</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a3bfb0d00d8bbf7be08ece053a1b6ce8a">gfxSetScreenFormat</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="code" href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708">GSPGPU_FramebufferFormats</a> format);</div>
-<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"></span></div>
-<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> * @brief Gets a screen pixel format.</span></div>
-<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> * @param screen Screen to get the pixel format of.</span></div>
-<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * @return the pixel format of the chosen screen set by ctrulib.</span></div>
-<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <a class="code" href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708">GSPGPU_FramebufferFormats</a> <a class="code" href="gfx_8h.html#ae93ce8f657958343a5c2c9db35f0eabb">gfxGetScreenFormat</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen);</div>
-<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"></span></div>
-<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> * @brief Sets whether to use ctrulib's double buffering</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @param screen Screen to toggle double buffering for.</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> * @param doubleBuffering Whether to use double buffering.</span></div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> * ctrulib is by default using a double buffering scheme.</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> * If you do not want to swap one of the screen framebuffers when @ref gfxSwapBuffers or @ref gfxSwapBuffers is called,</span></div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> * then you have to disable double buffering.</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * It is however recommended to call @ref gfxSwapBuffers even if double buffering is disabled</span></div>
-<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> * for both screens if you want to keep the gsp configuration up to date.</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#ad5c1216a99f555bbc619a157b4295dcb">gfxSetDoubleBuffering</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <span class="keywordtype">bool</span> doubleBuffering);</div>
-<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"></span></div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * @brief Flushes the current framebuffers</span></div>
-<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> * Use this if the data within your framebuffers changes a lot and that you want to make sure everything was updated correctly.</span></div>
-<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> * This shouldn't be needed and has a significant overhead.</span></div>
-<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#aea1808bd74fe0c00f9794e455fc8499b">gfxFlushBuffers</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"></span></div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> * @brief Swaps the buffers and sets the gsp state</span></div>
-<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> * This is to be called to update the gsp state and swap the framebuffers.</span></div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"> * LCD rendering should start as soon as the gsp state is set.</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> * When using the GPU, call @ref gfxSwapBuffers instead.</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a0f338920111994110975dc0d1360bb1f">gfxSwapBuffers</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"></span></div>
-<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment"> * @brief Swaps the framebuffers</span></div>
-<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"> * This is the version to be used with the GPU since the GPU will use the gsp shared memory,</span></div>
-<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment"> * so the gsp state mustn't be set directly by the user.</span></div>
-<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a3306df28835a647734cf8e299f041527">gfxSwapBuffersGpu</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment"></span></div>
-<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment">///@}</span></div>
-<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment"></span></div>
-<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"></span></div>
-<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment">///@name Helper</span></div>
-<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="comment">///@{</span></div>
-<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment"></span><span class="comment">/**</span></div>
-<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment"> * @brief Retrieves a framebuffer information.</span></div>
-<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment"> * @param screen Screen to retrieve framebuffer information for.</span></div>
-<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> * @param side Side of the screen to retrieve framebuffer information for.</span></div>
-<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"> * @param width Pointer that will hold the width of the framebuffer in pixels.</span></div>
-<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment"> * @param height Pointer that will hold the height of the framebuffer in pixels.</span></div>
-<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"> * @return A pointer to the current framebuffer of the choosen screen.</span></div>
-<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment"> * Please remember that the returned pointer will change after each call to gfxSwapBuffers if double buffering is enabled.</span></div>
-<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* <a class="code" href="gfx_8h.html#a332447352568e250a75397a1b2e452db">gfxGetFramebuffer</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a> side, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a>* width, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a>* height);<span class="comment"></span></div>
-<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment">///@}</span></div>
-<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment"></span></div>
-<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment">//global variables</span></div>
-<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxTopLeftFramebuffers[2];</div>
-<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxTopRightFramebuffers[2];</div>
-<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxBottomFramebuffers[2];</div>
+<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> * @brief Retrieves the status of the 3D stereoscopic effect.</span></div>
+<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"> * @return true if 3D enabled, false otherwise.</span></div>
+<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">bool</span> <a class="code" href="gfx_8h.html#a07c2e95d490e338a8b87030124f58a60">gfxIs3D</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"></span></div>
+<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * @brief Changes the color format of a screen</span></div>
+<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> * @param screen The screen of which format should be changed</span></div>
+<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> * @param format One of the gsp pixel formats.</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a3bfb0d00d8bbf7be08ece053a1b6ce8a">gfxSetScreenFormat</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="code" href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708">GSPGPU_FramebufferFormats</a> format);</div>
+<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"></span></div>
+<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> * @brief Gets a screen pixel format.</span></div>
+<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> * @param screen Screen to get the pixel format of.</span></div>
+<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @return the pixel format of the chosen screen set by ctrulib.</span></div>
+<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <a class="code" href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708">GSPGPU_FramebufferFormats</a> <a class="code" href="gfx_8h.html#ae93ce8f657958343a5c2c9db35f0eabb">gfxGetScreenFormat</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen);</div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"></span></div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> * @brief Sets whether to use ctrulib's double buffering</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> * @param screen Screen to toggle double buffering for.</span></div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * @param doubleBuffering Whether to use double buffering.</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> * ctrulib is by default using a double buffering scheme.</span></div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> * If you do not want to swap one of the screen framebuffers when @ref gfxSwapBuffers or @ref gfxSwapBuffers is called,</span></div>
+<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * then you have to disable double buffering.</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * It is however recommended to call @ref gfxSwapBuffers even if double buffering is disabled</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> * for both screens if you want to keep the gsp configuration up to date.</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#ad5c1216a99f555bbc619a157b4295dcb">gfxSetDoubleBuffering</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <span class="keywordtype">bool</span> doubleBuffering);</div>
+<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"></span></div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> * @brief Flushes the current framebuffers</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> * Use this if the data within your framebuffers changes a lot and that you want to make sure everything was updated correctly.</span></div>
+<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"> * This shouldn't be needed and has a significant overhead.</span></div>
+<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#aea1808bd74fe0c00f9794e455fc8499b">gfxFlushBuffers</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"></span></div>
+<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> * @brief Updates the configuration of the specified screen (swapping the buffers if double-buffering is enabled).</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"> * @param scr Screen to configure.</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment"> * @param immediate Whether to apply the updated configuration immediately or let GSPGPU apply it after the next GX transfer completes.</span></div>
+<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a848357d4a31b6ccd7ead1e9feb69b935">gfxConfigScreen</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> scr, <span class="keywordtype">bool</span> immediate);</div>
+<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"></span></div>
+<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment"> * @brief Swaps the buffers and sets the gsp state</span></div>
+<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment"> * This is to be called to update the gsp state and swap the framebuffers.</span></div>
+<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment"> * LCD rendering should start as soon as the gsp state is set.</span></div>
+<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment"> * When using the GPU, call @ref gfxSwapBuffers instead.</span></div>
+<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a0f338920111994110975dc0d1360bb1f">gfxSwapBuffers</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="comment"></span></div>
+<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment"> * @brief Swaps the framebuffers</span></div>
+<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> * This is the version to be used with the GPU since the GPU will use the gsp shared memory,</span></div>
+<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"> * so the gsp state mustn't be set directly by the user.</span></div>
+<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="keywordtype">void</span> <a class="code" href="gfx_8h.html#a3306df28835a647734cf8e299f041527">gfxSwapBuffersGpu</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"></span></div>
+<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment">///@}</span></div>
+<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"></span></div>
+<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment"></span></div>
+<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment">///@name Helper</span></div>
+<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment">///@{</span></div>
+<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"></span><span class="comment">/**</span></div>
+<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="comment"> * @brief Retrieves a framebuffer information.</span></div>
+<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="comment"> * @param screen Screen to retrieve framebuffer information for.</span></div>
+<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="comment"> * @param side Side of the screen to retrieve framebuffer information for.</span></div>
+<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"> * @param width Pointer that will hold the width of the framebuffer in pixels.</span></div>
+<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> * @param height Pointer that will hold the height of the framebuffer in pixels.</span></div>
+<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="comment"> * @return A pointer to the current framebuffer of the choosen screen.</span></div>
+<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="comment"> * Please remember that the returned pointer will change after each call to gfxSwapBuffers if double buffering is enabled.</span></div>
+<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* <a class="code" href="gfx_8h.html#a332447352568e250a75397a1b2e452db">gfxGetFramebuffer</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a> side, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a>* width, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a>* height);<span class="comment"></span></div>
+<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="comment">///@}</span></div>
+<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="comment"></span></div>
+<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> <span class="comment">//global variables</span></div>
+<div class="line"><a name="l00169"></a><span class="lineno"> 169</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxTopLeftFramebuffers[2];</div>
+<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxTopRightFramebuffers[2];</div>
+<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxBottomFramebuffers[2];</div>
<div class="ttc" id="types_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div><div class="ttdoc">Various system types. </div></div>
+<div class="ttc" id="gfx_8h_html_a848357d4a31b6ccd7ead1e9feb69b935"><div class="ttname"><a href="gfx_8h.html#a848357d4a31b6ccd7ead1e9feb69b935">gfxConfigScreen</a></div><div class="ttdeci">void gfxConfigScreen(gfxScreen_t scr, bool immediate)</div><div class="ttdoc">Updates the configuration of the specified screen (swapping the buffers if double-buffering is enable...</div></div>
<div class="ttc" id="types_8h_html_ace9d960e74685e2cd84b36132dbbf8aa"><div class="ttname"><a href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a></div><div class="ttdeci">uint16_t u16</div><div class="ttdoc">16-bit unsigned integer </div><div class="ttdef"><b>Definition:</b> types.h:22</div></div>
<div class="ttc" id="gspgpu_8h_html"><div class="ttname"><a href="gspgpu_8h.html">gspgpu.h</a></div><div class="ttdoc">GSPGPU service. </div></div>
<div class="ttc" id="gfx_8h_html_a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541"><div class="ttname"><a href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541">GFX_BOTTOM</a></div><div class="ttdoc">Bottom screen. </div><div class="ttdef"><b>Definition:</b> gfx.h:23</div></div>
<div class="ttc" id="gspgpu_8h_html_a4c8d43241faec4b99bf24791375c3708"><div class="ttname"><a href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708">GSPGPU_FramebufferFormats</a></div><div class="ttdeci">GSPGPU_FramebufferFormats</div><div class="ttdoc">Framebuffer format. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:22</div></div>
<div class="ttc" id="gfx_8h_html_a0f338920111994110975dc0d1360bb1f"><div class="ttname"><a href="gfx_8h.html#a0f338920111994110975dc0d1360bb1f">gfxSwapBuffers</a></div><div class="ttdeci">void gfxSwapBuffers(void)</div><div class="ttdoc">Swaps the buffers and sets the gsp state. </div></div>
+<div class="ttc" id="gfx_8h_html_a07c2e95d490e338a8b87030124f58a60"><div class="ttname"><a href="gfx_8h.html#a07c2e95d490e338a8b87030124f58a60">gfxIs3D</a></div><div class="ttdeci">bool gfxIs3D(void)</div><div class="ttdoc">Retrieves the status of the 3D stereoscopic effect. </div></div>
<div class="ttc" id="gfx_8h_html_ad5c1216a99f555bbc619a157b4295dcb"><div class="ttname"><a href="gfx_8h.html#ad5c1216a99f555bbc619a157b4295dcb">gfxSetDoubleBuffering</a></div><div class="ttdeci">void gfxSetDoubleBuffering(gfxScreen_t screen, bool doubleBuffering)</div><div class="ttdoc">Sets whether to use ctrulib's double buffering. </div></div>
<div class="ttc" id="types_8h_html_a92c50087ca0e64fa93fc59402c55f8ca"><div class="ttname"><a href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdoc">would be nice if newlib had this already </div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
<div class="ttc" id="gfx_8h_html_a236a005ae029247c8bfe4a4a649206fc"><div class="ttname"><a href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a></div><div class="ttdeci">void gfxInitDefault(void)</div><div class="ttdoc">Initializes the LCD framebuffers with default parameters. </div></div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li>__strex()
: <a class="el" href="synchronization_8h.html#ae5b6bc8b7ae74b57efbb0707c1d6cea9">synchronization.h</a>
</li>
+<li>__sync_get_arbiter()
+: <a class="el" href="synchronization_8h.html#abfc0f49f74fdd98c039a670ecacd23de">synchronization.h</a>
+</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li>AM_InitializeExternalTitleDatabase()
: <a class="el" href="am_8h.html#a469ba855d3817fa86091baa17d136676">am.h</a>
</li>
+<li>AM_InstallFirm()
+: <a class="el" href="am_8h.html#a04a92770482e500d5da2995e0d4a1bc1">am.h</a>
+</li>
<li>AM_InstallNativeFirm()
: <a class="el" href="am_8h.html#a022d7fdd04454fd2300588b539a9da4a">am.h</a>
</li>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li>__strex()
: <a class="el" href="synchronization_8h.html#ae5b6bc8b7ae74b57efbb0707c1d6cea9">synchronization.h</a>
</li>
+<li>__sync_get_arbiter()
+: <a class="el" href="synchronization_8h.html#abfc0f49f74fdd98c039a670ecacd23de">synchronization.h</a>
+</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li>AM_InitializeExternalTitleDatabase()
: <a class="el" href="am_8h.html#a469ba855d3817fa86091baa17d136676">am.h</a>
</li>
+<li>AM_InstallFirm()
+: <a class="el" href="am_8h.html#a04a92770482e500d5da2995e0d4a1bc1">am.h</a>
+</li>
<li>AM_InstallNativeFirm()
: <a class="el" href="am_8h.html#a022d7fdd04454fd2300588b539a9da4a">am.h</a>
</li>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li>getThreadStaticBuffers()
: <a class="el" href="svc_8h.html#a7f804146f815c96c98e7712bce3993bf">svc.h</a>
</li>
+<li>gfxConfigScreen()
+: <a class="el" href="gfx_8h.html#a848357d4a31b6ccd7ead1e9feb69b935">gfx.h</a>
+</li>
<li>gfxExit()
: <a class="el" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfx.h</a>
</li>
<li>gfxInitDefault()
: <a class="el" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfx.h</a>
</li>
+<li>gfxIs3D()
+: <a class="el" href="gfx_8h.html#a07c2e95d490e338a8b87030124f58a60">gfx.h</a>
+</li>
<li>gfxSet3D()
: <a class="el" href="gfx_8h.html#a7b5743ba9ce490263b12d1575af7ebc1">gfx.h</a>
</li>
<li>gspLcdInit()
: <a class="el" href="gsplcd_8h.html#a3e3d897ec34cb4f64efd6dbfed777f0c">gsplcd.h</a>
</li>
+<li>gspSetEventCallback()
+: <a class="el" href="gspgpu_8h.html#a38080f47e69bd240156ca043c7946b29">gspgpu.h</a>
+</li>
<li>gspSubmitGxCommand()
: <a class="el" href="gspgpu_8h.html#aa4e931a0de3b33497503fc063127af0c">gspgpu.h</a>
</li>
+<li>gspWaitForAnyEvent()
+: <a class="el" href="gspgpu_8h.html#a7280943da0262bb75eacc779bf54be87">gspgpu.h</a>
+</li>
<li>gspWaitForEvent()
: <a class="el" href="gspgpu_8h.html#a91a03ad378747bc554ff611742727958">gspgpu.h</a>
</li>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<li>GFX_TOP
: <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">gfx.h</a>
</li>
+<li>gfxConfigScreen()
+: <a class="el" href="gfx_8h.html#a848357d4a31b6ccd7ead1e9feb69b935">gfx.h</a>
+</li>
<li>gfxExit()
: <a class="el" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfx.h</a>
</li>
<li>gfxInitDefault()
: <a class="el" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfx.h</a>
</li>
+<li>gfxIs3D()
+: <a class="el" href="gfx_8h.html#a07c2e95d490e338a8b87030124f58a60">gfx.h</a>
+</li>
<li>gfxScreen_t
: <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfx.h</a>
</li>
<li>gspLcdInit()
: <a class="el" href="gsplcd_8h.html#a3e3d897ec34cb4f64efd6dbfed777f0c">gsplcd.h</a>
</li>
+<li>gspSetEventCallback()
+: <a class="el" href="gspgpu_8h.html#a38080f47e69bd240156ca043c7946b29">gspgpu.h</a>
+</li>
<li>gspSubmitGxCommand()
: <a class="el" href="gspgpu_8h.html#aa4e931a0de3b33497503fc063127af0c">gspgpu.h</a>
</li>
+<li>gspWaitForAnyEvent()
+: <a class="el" href="gspgpu_8h.html#a7280943da0262bb75eacc779bf54be87">gspgpu.h</a>
+</li>
<li>gspWaitForDMA
: <a class="el" href="gspgpu_8h.html#a95267f3508badebdcd0788cf262c99d8">gspgpu.h</a>
</li>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a13">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a13">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a13">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a4aecce954e20dee2e37e2e774361e9dd"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000022">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a62">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a61">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a72">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a829e0411f5a51f8c0ed4a473fbbccb55"></a>
<p>Finishes drawing. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000024">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a31">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a31">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a31">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a921bb00def7171c1936fa50c6e464fba"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a3">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a3">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a3">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a896e2be6136bb62909be966cc74eeb4d"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a4">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a4">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a4">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="ac9bf249df1e7a27a56a4e57c81d19e1c"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000014">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a26">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a26">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a26">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="aec1714fa8c2684020ab10a4da8e784e0"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000008">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a30">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a30">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a30">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="ac81475073183a797d1e723770f5cf6b4"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000017">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a58">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a57">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a68">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a2ead0a88519b4197e13c6ce8e138d6c7"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000016">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a20">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a20">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a20">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a16d2f28ab67d2208b0321f817f7babb3"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000009">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a21">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a21">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a21">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a717ac338a87549c36a9d70f5c1d7a077"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000012">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a14">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a14">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a14">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="af18a38db985563a54813c2ebf86d6509"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a0">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a0">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a0">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a5bcd123602324b372662ea425786aa58"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000011">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a18">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a18">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a18">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="abc687b8c34463fd1ceacd64dab6c078e"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000010">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a16">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a16">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a16">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a7b61022c85fa068574fd6b61d55f9530"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000021">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a42">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a42">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a42">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a4145b7accf26fb3295c6e950a6ec52c5"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000019">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a61">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a7fc8f4ca807737d2d9206e1ef9144dc4"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000018">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a59">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="aba80c2d6e88cb75263de89a2d059e230"></a>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000005">Deprecated:</a></b></dt><dd></dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a11">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a11">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a11">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
</div><!-- contents -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a41">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a41">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a41">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
</div><!-- contents -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.10"/>
+<title>libctru: graphics/gpu/fragment_light/source/main.c</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">libctru
+  <span id="projectnumber">v1.1.0</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.10 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main Page</span></a></li>
+ <li><a href="pages.html"><span>Related Pages</span></a></li>
+ <li><a href="annotated.html"><span>Data Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ <li><a href="examples.html"><span>Examples</span></a></li>
+ <li>
+ <div id="MSearchBox" class="MSearchBoxInactive">
+ <span class="left">
+ <img id="MSearchSelect" src="search/mag_sel.png"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ alt=""/>
+ <input type="text" id="MSearchField" value="Search" accesskey="S"
+ onfocus="searchBox.OnSearchFieldFocus(true)"
+ onblur="searchBox.OnSearchFieldFocus(false)"
+ onkeyup="searchBox.OnSearchFieldChange(event)"/>
+ </span><span class="right">
+ <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+ </span>
+ </div>
+ </li>
+ </ul>
+ </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">graphics/gpu/fragment_light/source/main.c</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
+<div class="line"><span class="preprocessor">#include <citro3d.h></span></div>
+<div class="line"><span class="preprocessor">#include <string.h></span></div>
+<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define DISPLAY_TRANSFER_FLAGS \</span></div>
+<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
+<div class="line"></div>
+<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ <span class="keywordtype">float</span> position[3]; <span class="keywordtype">float</span> texcoord[2]; <span class="keywordtype">float</span> normal[3]; } vertex;</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keyword">const</span> vertex vertex_list[] =</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// First face (PZ)</span></div>
+<div class="line"> <span class="comment">// First triangle</span></div>
+<div class="line"> { {-0.5f, -0.5f, +0.5f}, {0.0f, 0.0f}, {0.0f, 0.0f, +1.0f} },</div>
+<div class="line"> { {+0.5f, -0.5f, +0.5f}, {1.0f, 0.0f}, {0.0f, 0.0f, +1.0f} },</div>
+<div class="line"> { {+0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {0.0f, 0.0f, +1.0f} },</div>
+<div class="line"> <span class="comment">// Second triangle</span></div>
+<div class="line"> { {+0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {0.0f, 0.0f, +1.0f} },</div>
+<div class="line"> { {-0.5f, +0.5f, +0.5f}, {0.0f, 1.0f}, {0.0f, 0.0f, +1.0f} },</div>
+<div class="line"> { {-0.5f, -0.5f, +0.5f}, {0.0f, 0.0f}, {0.0f, 0.0f, +1.0f} },</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Second face (MZ)</span></div>
+<div class="line"> <span class="comment">// First triangle</span></div>
+<div class="line"> { {-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {0.0f, 0.0f, -1.0f} },</div>
+<div class="line"> { {-0.5f, +0.5f, -0.5f}, {1.0f, 0.0f}, {0.0f, 0.0f, -1.0f} },</div>
+<div class="line"> { {+0.5f, +0.5f, -0.5f}, {1.0f, 1.0f}, {0.0f, 0.0f, -1.0f} },</div>
+<div class="line"> <span class="comment">// Second triangle</span></div>
+<div class="line"> { {+0.5f, +0.5f, -0.5f}, {1.0f, 1.0f}, {0.0f, 0.0f, -1.0f} },</div>
+<div class="line"> { {+0.5f, -0.5f, -0.5f}, {0.0f, 1.0f}, {0.0f, 0.0f, -1.0f} },</div>
+<div class="line"> { {-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {0.0f, 0.0f, -1.0f} },</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Third face (PX)</span></div>
+<div class="line"> <span class="comment">// First triangle</span></div>
+<div class="line"> { {+0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {+1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, +0.5f, -0.5f}, {1.0f, 0.0f}, {+1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {+1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> <span class="comment">// Second triangle</span></div>
+<div class="line"> { {+0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {+1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, -0.5f, +0.5f}, {0.0f, 1.0f}, {+1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {+1.0f, 0.0f, 0.0f} },</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Fourth face (MX)</span></div>
+<div class="line"> <span class="comment">// First triangle</span></div>
+<div class="line"> { {-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, -0.5f, +0.5f}, {1.0f, 0.0f}, {-1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {-1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> <span class="comment">// Second triangle</span></div>
+<div class="line"> { {-0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {-1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, +0.5f, -0.5f}, {0.0f, 1.0f}, {-1.0f, 0.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {-1.0f, 0.0f, 0.0f} },</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Fifth face (PY)</span></div>
+<div class="line"> <span class="comment">// First triangle</span></div>
+<div class="line"> { {-0.5f, +0.5f, -0.5f}, {0.0f, 0.0f}, {0.0f, +1.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, +0.5f, +0.5f}, {1.0f, 0.0f}, {0.0f, +1.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {0.0f, +1.0f, 0.0f} },</div>
+<div class="line"> <span class="comment">// Second triangle</span></div>
+<div class="line"> { {+0.5f, +0.5f, +0.5f}, {1.0f, 1.0f}, {0.0f, +1.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, +0.5f, -0.5f}, {0.0f, 1.0f}, {0.0f, +1.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, +0.5f, -0.5f}, {0.0f, 0.0f}, {0.0f, +1.0f, 0.0f} },</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Sixth face (MY)</span></div>
+<div class="line"> <span class="comment">// First triangle</span></div>
+<div class="line"> { {-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {0.0f, -1.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, -0.5f, -0.5f}, {1.0f, 0.0f}, {0.0f, -1.0f, 0.0f} },</div>
+<div class="line"> { {+0.5f, -0.5f, +0.5f}, {1.0f, 1.0f}, {0.0f, -1.0f, 0.0f} },</div>
+<div class="line"> <span class="comment">// Second triangle</span></div>
+<div class="line"> { {+0.5f, -0.5f, +0.5f}, {1.0f, 1.0f}, {0.0f, -1.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, -0.5f, +0.5f}, {0.0f, 1.0f}, {0.0f, -1.0f, 0.0f} },</div>
+<div class="line"> { {-0.5f, -0.5f, -0.5f}, {0.0f, 0.0f}, {0.0f, -1.0f, 0.0f} },</div>
+<div class="line">};</div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))</span></div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <a name="_a0"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_projection, uLoc_modelView;</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx projection;</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> C3D_LightEnv lightEnv;</div>
+<div class="line"><span class="keyword">static</span> C3D_Light light;</div>
+<div class="line"><span class="keyword">static</span> C3D_LightLut lut_Phong;</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span>* vbo_data;</div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">float</span> angleX = 0.0, angleY = 0.0;</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneInit(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Load the vertex shader, create a shader program and bind it</span></div>
+<div class="line"> vshader_dvlb = <a name="a2"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
+<div class="line"> <a name="a3"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
+<div class="line"> <a name="a4"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a5"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> C3D_BindProgram(&program);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Get the location of the uniforms</span></div>
+<div class="line"> uLoc_projection = <a name="a6"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a7"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"> uLoc_modelView = <a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"modelView"</span>);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure attributes for use with the vertex shader</span></div>
+<div class="line"> C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();</div>
+<div class="line"> AttrInfo_Init(attrInfo);</div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 0, <a name="a8"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v0=position</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 1, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 2); <span class="comment">// v1=texcoord</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 2, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v2=normal</span></div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Create the VBO (vertex buffer object)</span></div>
+<div class="line"> vbo_data = <a name="a9"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
+<div class="line"> memcpy(vbo_data, vertex_list, <span class="keyword">sizeof</span>(vertex_list));</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure buffers</span></div>
+<div class="line"> C3D_BufInfo* bufInfo = C3D_GetBufInfo();</div>
+<div class="line"> BufInfo_Init(bufInfo);</div>
+<div class="line"> BufInfo_Add(bufInfo, vbo_data, <span class="keyword">sizeof</span>(vertex), 3, 0x210);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure the first fragment shading substage to blend the fragment primary color</span></div>
+<div class="line"> <span class="comment">// with the fragment secondary color.</span></div>
+<div class="line"> <span class="comment">// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight</span></div>
+<div class="line"> C3D_TexEnv* env = C3D_GetTexEnv(0);</div>
+<div class="line"> C3D_TexEnvSrc(env, C3D_Both, <a name="a10"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a0bbc8695a5f516fd20607b11d04a4c3c">GPU_FRAGMENT_PRIMARY_COLOR</a>, <a name="a11"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0ab32b4d5fc6dfdbc4706f2d6ff955b12a">GPU_FRAGMENT_SECONDARY_COLOR</a>, 0);</div>
+<div class="line"> C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);</div>
+<div class="line"> C3D_TexEnvFunc(env, C3D_Both, <a name="a12"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1a76c8833caf6cd58a784b748d7428c4">GPU_ADD</a>);</div>
+<div class="line"></div>
+<div class="line"> <span class="keyword">static</span> <span class="keyword">const</span> C3D_Material material =</div>
+<div class="line"> {</div>
+<div class="line"> { 0.2f, 0.2f, 0.2f }, <span class="comment">//ambient</span></div>
+<div class="line"> { 0.4f, 0.4f, 0.4f }, <span class="comment">//diffuse</span></div>
+<div class="line"> { 0.8f, 0.8f, 0.8f }, <span class="comment">//specular0</span></div>
+<div class="line"> { 0.0f, 0.0f, 0.0f }, <span class="comment">//specular1</span></div>
+<div class="line"> { 0.0f, 0.0f, 0.0f }, <span class="comment">//emission</span></div>
+<div class="line"> };</div>
+<div class="line"></div>
+<div class="line"> C3D_LightEnvInit(&lightEnv);</div>
+<div class="line"> C3D_LightEnvBind(&lightEnv);</div>
+<div class="line"> C3D_LightEnvMaterial(&lightEnv, &material);</div>
+<div class="line"></div>
+<div class="line"> LightLut_Phong(&lut_Phong, 30);</div>
+<div class="line"> C3D_LightEnvLut(&lightEnv, <a name="a13"></a><a class="code" href="enums_8h.html#a207e4181777d84b837218fdeb61825b2afadcb590d677a876167c3965c1d9e325">GPU_LUT_D0</a>, <a name="a14"></a><a class="code" href="enums_8h.html#ac63e58430371c6fef616284076c22f90a542a9d0845299b89d2cd65de9ed29ad0">GPU_LUTINPUT_LN</a>, <span class="keyword">false</span>, &lut_Phong);</div>
+<div class="line"></div>
+<div class="line"> C3D_FVec lightVec = { { 1.0, -0.5, 0.0, 0.0 } };</div>
+<div class="line"></div>
+<div class="line"> C3D_LightInit(&light, &lightEnv);</div>
+<div class="line"> C3D_LightColor(&light, 1.0, 1.0, 1.0);</div>
+<div class="line"> C3D_LightPosition(&light, &lightVec);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">float</span> iod)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Compute the projection matrix</span></div>
+<div class="line"> Mtx_PerspStereoTilt(&projection, 40.0f*M_PI/180.0f, 400.0f/240.0f, 0.01f, 1000.0f, iod, 2.0f);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Calculate the modelView matrix</span></div>
+<div class="line"> C3D_Mtx modelView;</div>
+<div class="line"> Mtx_Identity(&modelView);</div>
+<div class="line"> Mtx_Translate(&modelView, 0.0, 0.0, -4.0 + sinf(angleX));</div>
+<div class="line"> Mtx_RotateX(&modelView, angleX, <span class="keyword">true</span>);</div>
+<div class="line"> Mtx_RotateY(&modelView, angleY, <span class="keyword">true</span>);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Rotate the cube each frame</span></div>
+<div class="line"> <span class="keywordflow">if</span> (iod >= 0.0f)</div>
+<div class="line"> {</div>
+<div class="line"> angleX += M_PI / 180;</div>
+<div class="line"> angleY += M_PI / 360;</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Update the uniforms</span></div>
+<div class="line"> C3D_FVUnifMtx4x4(<a name="a15"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
+<div class="line"> C3D_FVUnifMtx4x4(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_modelView, &modelView);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Draw the VBO</span></div>
+<div class="line"> C3D_DrawArrays(<a name="a16"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>, 0, vertex_list_count);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneExit(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Free the VBO</span></div>
+<div class="line"> <a name="a17"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Free the shader program</span></div>
+<div class="line"> <a name="a18"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
+<div class="line"> <a name="a19"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="keywordtype">int</span> main()</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Initialize graphics</span></div>
+<div class="line"> <a name="a20"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
+<div class="line"> <a name="a21"></a><a class="code" href="gfx_8h.html#a7b5743ba9ce490263b12d1575af7ebc1">gfxSet3D</a>(<span class="keyword">true</span>); <span class="comment">// Enable stereoscopic 3D</span></div>
+<div class="line"> C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the render targets</span></div>
+<div class="line"> C3D_RenderTarget* targetLeft = C3D_RenderTargetCreate(240, 400, <a name="a22"></a><a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a name="a23"></a><a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTarget* targetRight = C3D_RenderTargetCreate(240, 400, <a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTargetSetClear(targetLeft, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetClear(targetRight, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetOutput(targetLeft, <a name="a24"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a25"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, DISPLAY_TRANSFER_FLAGS);</div>
+<div class="line"> C3D_RenderTargetSetOutput(targetRight, <a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a26"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1e16d704e9b5a318e3f73aaaba2f38f9">GFX_RIGHT</a>, DISPLAY_TRANSFER_FLAGS);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the scene</span></div>
+<div class="line"> sceneInit();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Main loop</span></div>
+<div class="line"> <span class="keywordflow">while</span> (<a name="a27"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
+<div class="line"> {</div>
+<div class="line"> <a name="a28"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Respond to user input</span></div>
+<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a29"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
+<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a30"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
+<div class="line"> <span class="keywordflow">break</span>; <span class="comment">// break in order to return to hbmenu</span></div>
+<div class="line"></div>
+<div class="line"> <span class="keywordtype">float</span> slider = <a name="a31"></a><a class="code" href="os_8h.html#a3b62a51a9c8f111843c1fd3ef0756026">osGet3DSliderState</a>();</div>
+<div class="line"> <span class="keywordtype">float</span> iod = slider/3;</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Render the scene</span></div>
+<div class="line"> C3D_FrameBegin(C3D_FRAME_SYNCDRAW);</div>
+<div class="line"> {</div>
+<div class="line"> C3D_FrameDrawOn(targetLeft);</div>
+<div class="line"> sceneRender(-iod);</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">if</span> (iod > 0.0f)</div>
+<div class="line"> {</div>
+<div class="line"> C3D_FrameDrawOn(targetRight);</div>
+<div class="line"> sceneRender(iod);</div>
+<div class="line"> }</div>
+<div class="line"> }</div>
+<div class="line"> C3D_FrameEnd(0);</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Deinitialize the scene</span></div>
+<div class="line"> sceneExit();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Deinitialize graphics</span></div>
+<div class="line"> C3D_Fini();</div>
+<div class="line"> <a name="a32"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
+<div class="line"> <span class="keywordflow">return</span> 0;</div>
+<div class="line">}</div>
+</div><!-- fragment --> </div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by  <a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.10
+</small></address>
+</body>
+</html>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="title">graphics/gpu/geoshader/source/main.c</div> </div>
</div><!--header-->
<div class="contents">
-<p>graphics/gpu/geoshader/source/gpu.h </p><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * Bare-bones simplistic GPU wrapper</span></div>
-<div class="line"><span class="comment"> * This library is common to all libctru GPU examples</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#pragma once</span></div>
+<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
+<div class="line"><span class="preprocessor">#include <citro3d.h></span></div>
<div class="line"><span class="preprocessor">#include <string.h></span></div>
-<div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
-<div class="line"><span class="preprocessor">#include "3dmath.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuInit(<span class="keywordtype">void</span>);</div>
-<div class="line"><span class="keywordtype">void</span> gpuExit(<span class="keywordtype">void</span>);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuClearBuffers(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> clearColor);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameBegin(<span class="keywordtype">void</span>);</div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameEnd(<span class="keywordtype">void</span>);</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// Configures the specified fixed-function fragment shading substage to be a no-operation</span></div>
-<div class="line"><span class="keywordtype">void</span> GPU_SetDummyTexEnv(<span class="keywordtype">int</span> <span class="keywordtype">id</span>);</div>
+<div class="line"><span class="preprocessor">#include "program_shbin.h"</span></div>
<div class="line"></div>
-<div class="line"><span class="comment">// Uploads an uniform matrix</span></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> GPU_SetFloatUniformMatrix(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5">GPU_SHADER_TYPE</a> type, <span class="keywordtype">int</span> location, matrix_4x4* matrix)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a0"></a><a class="code" href="gpu-old_8h.html#af18a38db985563a54813c2ebf86d6509">GPU_SetFloatUniform</a>(type, location, (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)matrix, 4);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/geoshader/source/gpu.c </p><div class="fragment"><div class="line"><span class="preprocessor">#include "<a class="code" href="gpu_8h.html">gpu.h</a>"</span></div>
+<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define DISPLAY_TRANSFER_FLAGS \</span></div>
<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \</span></div>
<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *colorBuf, *depthBuf;</div>
-<div class="line"><span class="keyword">static</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *cmdBuf;</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuInit(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> colorBuf = <a name="a1"></a><a class="code" href="vram_8h.html#a00b84b8d38c127d8af9a89b9b7e2a5a4">vramAlloc</a>(400*240*4);</div>
-<div class="line"> depthBuf = <a class="code" href="vram_8h.html#a00b84b8d38c127d8af9a89b9b7e2a5a4">vramAlloc</a>(400*240*4);</div>
-<div class="line"> cmdBuf = <a name="a2"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(0x40000*4);</div>
-<div class="line"></div>
-<div class="line"> <a name="a3"></a><a class="code" href="gpu-old_8h.html#a921bb00def7171c1936fa50c6e464fba">GPU_Init</a>(NULL);</div>
-<div class="line"> <a name="a4"></a><a class="code" href="gpu-old_8h.html#a896e2be6136bb62909be966cc74eeb4d">GPU_Reset</a>(NULL, cmdBuf, 0x40000);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuExit(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a5"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(cmdBuf);</div>
-<div class="line"> <a name="a6"></a><a class="code" href="vram_8h.html#a867318cde93cdd997588d6dcbfc584e1">vramFree</a>(depthBuf);</div>
-<div class="line"> <a class="code" href="vram_8h.html#a867318cde93cdd997588d6dcbfc584e1">vramFree</a>(colorBuf);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuClearBuffers(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> clearColor)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a7"></a><a class="code" href="gx_8h.html#aa6e39b328383930b64eaa230bc9bc6a0">GX_MemoryFill</a>(</div>
-<div class="line"> colorBuf, clearColor, &colorBuf[240*400], <a name="a8"></a><a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> | <a name="a9"></a><a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a>,</div>
-<div class="line"> depthBuf, 0, &depthBuf[240*400], <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> | <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a>);</div>
-<div class="line"> <a name="a10"></a><a class="code" href="gspgpu_8h.html#a704e891a5d988f4964c24dc2b8bac787">gspWaitForPSC0</a>(); <span class="comment">// Wait for the fill to complete</span></div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameBegin(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Configure the viewport and the depth linear conversion function</span></div>
-<div class="line"> <a name="a11"></a><a class="code" href="gpu-old_8h.html#aba80c2d6e88cb75263de89a2d059e230">GPU_SetViewport</a>(</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a name="a12"></a><a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(depthBuf),</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(colorBuf),</div>
-<div class="line"> 0, 0, 240, 400); <span class="comment">// The top screen is physically 240x400 pixels</span></div>
-<div class="line"> <a name="a13"></a><a class="code" href="gpu-old_8h.html#a8b8de4eb721e55913ad0641c64fbaa75">GPU_DepthMap</a>(-1.0f, 0.0f); <span class="comment">// calculate the depth value from the Z coordinate in the following way: -1.0*z + 0.0</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure some boilerplate</span></div>
-<div class="line"> <a name="a14"></a><a class="code" href="gpu-old_8h.html#a717ac338a87549c36a9d70f5c1d7a077">GPU_SetFaceCulling</a>(<a name="a15"></a><a class="code" href="enums_8h.html#aded31eec5d2f72ea5c6141f24d8a0174a5f4f59f8f711f0bcfa9ca8b87f169ee0">GPU_CULL_BACK_CCW</a>);</div>
-<div class="line"> <a name="a16"></a><a class="code" href="gpu-old_8h.html#abc687b8c34463fd1ceacd64dab6c078e">GPU_SetStencilTest</a>(<span class="keyword">false</span>, <a name="a17"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a2021d04562bc3b47a305c57dff840c2e">GPU_ALWAYS</a>, 0x00, 0xFF, 0x00);</div>
-<div class="line"> <a name="a18"></a><a class="code" href="gpu-old_8h.html#aa2512e6c918e4ce998899d589a20dc2b">GPU_SetStencilOp</a>(<a name="a19"></a><a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>, <a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>, <a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>);</div>
-<div class="line"> <a name="a20"></a><a class="code" href="gpu-old_8h.html#a2ead0a88519b4197e13c6ce8e138d6c7">GPU_SetBlendingColor</a>(0,0,0,0);</div>
-<div class="line"> <a name="a21"></a><a class="code" href="gpu-old_8h.html#a8c32fb10ed5457b2e3a9273db61187d3">GPU_SetDepthTestAndWriteMask</a>(<span class="keyword">true</span>, <a name="a22"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a939d397eee5556dccc012bddfd0dd46a">GPU_GREATER</a>, <a name="a23"></a><a class="code" href="enums_8h.html#a7fffcfca8e93491a90d7b54cce719cd3ae6311b606a2db6df1e7358ad79e297a0">GPU_WRITE_ALL</a>);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// This is unknown</span></div>
-<div class="line"> <a name="a24"></a><a class="code" href="gpu_8h.html#a9042ca3f0e361abe2a2ede7206376cb5">GPUCMD_AddMaskedWrite</a>(GPUREG_0062, 0x1, 0);</div>
-<div class="line"> <a name="a25"></a><a class="code" href="gpu_8h.html#a1251c8456a0f92b49eecbe2c21f0a9a0">GPUCMD_AddWrite</a>(GPUREG_0118, 0);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure alpha blending and test</span></div>
-<div class="line"> <a name="a26"></a><a class="code" href="gpu-old_8h.html#ac9bf249df1e7a27a56a4e57c81d19e1c">GPU_SetAlphaBlending</a>(<a name="a27"></a><a class="code" href="enums_8h.html#ade416bc8de7b235e270c76f371d3cfb5a39318f81ae768d8a6119e7965a11bd50">GPU_BLEND_ADD</a>, <a class="code" href="enums_8h.html#ade416bc8de7b235e270c76f371d3cfb5a39318f81ae768d8a6119e7965a11bd50">GPU_BLEND_ADD</a>, <a name="a28"></a><a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1af2ec416dc4e7e8562e61d5f7963e8a36">GPU_SRC_ALPHA</a>, <a name="a29"></a><a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1a7bf978d71679e5507689e4570d3d85b2">GPU_ONE_MINUS_SRC_ALPHA</a>, <a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1af2ec416dc4e7e8562e61d5f7963e8a36">GPU_SRC_ALPHA</a>, <a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1a7bf978d71679e5507689e4570d3d85b2">GPU_ONE_MINUS_SRC_ALPHA</a>);</div>
-<div class="line"> <a name="a30"></a><a class="code" href="gpu-old_8h.html#aec1714fa8c2684020ab10a4da8e784e0">GPU_SetAlphaTest</a>(<span class="keyword">false</span>, <a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a2021d04562bc3b47a305c57dff840c2e">GPU_ALWAYS</a>, 0x00);</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">int</span> i;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 6; i ++)</div>
-<div class="line"> GPU_SetDummyTexEnv(i);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameEnd(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Finish rendering</span></div>
-<div class="line"> <a name="a31"></a><a class="code" href="gpu-old_8h.html#a0c6bf377d3b218402cca69bb16778fd5">GPU_FinishDrawing</a>();</div>
-<div class="line"> <a name="a32"></a><a class="code" href="gpu_8h.html#a418b5471dc141d47267cbc9b8facc4a3">GPUCMD_Finalize</a>();</div>
-<div class="line"> <a name="a33"></a><a class="code" href="gpu_8h.html#a7a806155f4e52af7775737d45d9342d5">GPUCMD_FlushAndRun</a>();</div>
-<div class="line"> <a name="a34"></a><a class="code" href="gspgpu_8h.html#aba84a82e0137f5dc7a5c9d0ece41d9b7">gspWaitForP3D</a>(); <span class="comment">// Wait for the rendering to complete</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Transfer the GPU output to the framebuffer</span></div>
-<div class="line"> <a name="a35"></a><a class="code" href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a>(</div>
-<div class="line"> colorBuf, <a name="a36"></a><a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(240, 400),</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a name="a37"></a><a class="code" href="gfx_8h.html#a332447352568e250a75397a1b2e452db">gfxGetFramebuffer</a>(<a name="a38"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a39"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, NULL, NULL), <a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(240, 400),</div>
-<div class="line"> DISPLAY_TRANSFER_FLAGS);</div>
-<div class="line"> <a name="a40"></a><a class="code" href="gspgpu_8h.html#a2f2aca81b76a88b6ebb121ec54f76b7e">gspWaitForPPF</a>(); <span class="comment">// Wait for the transfer to complete</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Reset the command buffer</span></div>
-<div class="line"> <a name="a41"></a><a class="code" href="gpu_8h.html#a42142a7ec0fd6ac9941d454f7e18415a">GPUCMD_SetBufferOffset</a>(0);</div>
-<div class="line">};</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> GPU_SetDummyTexEnv(<span class="keywordtype">int</span> <span class="keywordtype">id</span>)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a42"></a><a class="code" href="gpu-old_8h.html#a7b61022c85fa068574fd6b61d55f9530">GPU_SetTexEnv</a>(<span class="keywordtype">id</span>,</div>
-<div class="line"> <a name="a43"></a><a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a name="a44"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a1b960db2c45d309c5e4d9c899d051936">GPU_PREVIOUS</a>, 0, 0),</div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a1b960db2c45d309c5e4d9c899d051936">GPU_PREVIOUS</a>, 0, 0),</div>
-<div class="line"> <a name="a45"></a><a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0),</div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0),</div>
-<div class="line"> <a name="a46"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>,</div>
-<div class="line"> <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>,</div>
-<div class="line"> 0xFFFFFFFF);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/geoshader/source/3dmath.h </p><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * Bare-bones simplistic 3D math library</span></div>
-<div class="line"><span class="comment"> * This library is common to all libctru GPU examples</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#pragma once</span></div>
-<div class="line"><span class="preprocessor">#include <string.h></span></div>
-<div class="line"><span class="preprocessor">#include <stdbool.h></span></div>
-<div class="line"><span class="preprocessor">#include <math.h></span></div>
-<div class="line"></div>
-<div class="line"><span class="keyword">typedef</span> <span class="keyword">union </span>{ <span class="keyword">struct </span>{ <span class="keywordtype">float</span> w, z, y, x; }; <span class="keywordtype">float</span> c[4]; } vector_4f;</div>
-<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ vector_4f r[4]; } matrix_4x4;</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> v4f_dp4(<span class="keyword">const</span> vector_4f* a, <span class="keyword">const</span> vector_4f* b)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordflow">return</span> a->x*b->x + a->y*b->y + a->z*b->z + a->w*b->w;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> v4f_mod4(<span class="keyword">const</span> vector_4f* a)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordflow">return</span> sqrtf(v4f_dp4(a,a));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> v4f_norm4(vector_4f* vec)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">float</span> m = v4f_mod4(vec);</div>
-<div class="line"> <span class="keywordflow">if</span> (m == 0.0) <span class="keywordflow">return</span>;</div>
-<div class="line"> vec->x /= m;</div>
-<div class="line"> vec->y /= m;</div>
-<div class="line"> vec->z /= m;</div>
-<div class="line"> vec->w /= m;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> m4x4_zeros(matrix_4x4* out)</div>
-<div class="line">{</div>
-<div class="line"> memset(out, 0, <span class="keyword">sizeof</span>(*out));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> m4x4_copy(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* in)</div>
-<div class="line">{</div>
-<div class="line"> memcpy(out, in, <span class="keyword">sizeof</span>(*out));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_identity(matrix_4x4* out);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_multiply(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* a, <span class="keyword">const</span> matrix_4x4* b);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_translate(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_scale(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_x(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_y(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_z(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// Special versions of the projection matrices that take the 3DS' screen orientation into account</span></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_ortho_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_persp_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> fovy, <span class="keywordtype">float</span> aspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);</div>
-</div><!-- fragment --><p> graphics/gpu/geoshader/source/3dmath.c </p><div class="fragment"><div class="line"><span class="preprocessor">#include "3dmath.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_identity(matrix_4x4* out)</div>
-<div class="line">{</div>
-<div class="line"> m4x4_zeros(out);</div>
-<div class="line"> out->r[0].x = out->r[1].y = out->r[2].z = out->r[3].w = 1.0f;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_multiply(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* a, <span class="keyword">const</span> matrix_4x4* b)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">int</span> i, j;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 4; i ++)</div>
-<div class="line"> <span class="keywordflow">for</span> (j = 0; j < 4; j ++)</div>
-<div class="line"> out->r[j].c[i] = a->r[j].x*b->r[0].c[i] + a->r[j].y*b->r[1].c[i] + a->r[j].z*b->r[2].c[i] + a->r[j].w*b->r[3].c[i];</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_translate(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 tm, om;</div>
-<div class="line"></div>
-<div class="line"> m4x4_identity(&tm);</div>
-<div class="line"> tm.r[0].w = x;</div>
-<div class="line"> tm.r[1].w = y;</div>
-<div class="line"> tm.r[2].w = z;</div>
-<div class="line"></div>
-<div class="line"> m4x4_multiply(&om, mtx, &tm);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_scale(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">int</span> i;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 4; i ++)</div>
-<div class="line"> {</div>
-<div class="line"> mtx->r[i].x *= x;</div>
-<div class="line"> mtx->r[i].y *= y;</div>
-<div class="line"> mtx->r[i].z *= z;</div>
-<div class="line"> }</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_x(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = 1.0f;</div>
-<div class="line"> rm.r[1].y = cosAngle;</div>
-<div class="line"> rm.r[1].z = sinAngle;</div>
-<div class="line"> rm.r[2].y = -sinAngle;</div>
-<div class="line"> rm.r[2].z = cosAngle;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_y(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = cosAngle;</div>
-<div class="line"> rm.r[0].z = sinAngle;</div>
-<div class="line"> rm.r[1].y = 1.0f;</div>
-<div class="line"> rm.r[2].x = -sinAngle;</div>
-<div class="line"> rm.r[2].z = cosAngle;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_z(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = cosAngle;</div>
-<div class="line"> rm.r[0].y = sinAngle;</div>
-<div class="line"> rm.r[1].x = -sinAngle;</div>
-<div class="line"> rm.r[1].y = cosAngle;</div>
-<div class="line"> rm.r[2].z = 1.0f;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_ortho_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 mp;</div>
-<div class="line"> m4x4_zeros(&mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Build standard orthogonal projection matrix</span></div>
-<div class="line"> mp.r[0].x = 2.0f / (right - left);</div>
-<div class="line"> mp.r[0].w = (left + right) / (left - right);</div>
-<div class="line"> mp.r[1].y = 2.0f / (top - bottom);</div>
-<div class="line"> mp.r[1].w = (bottom + top) / (bottom - top);</div>
-<div class="line"> mp.r[2].z = 2.0f / (near - far);</div>
-<div class="line"> mp.r[2].w = (far + near) / (far - near);</div>
-<div class="line"> mp.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix depth range to [-1, 0]</span></div>
-<div class="line"> matrix_4x4 mp2, mp3;</div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[2].z = 0.5;</div>
-<div class="line"> mp2.r[2].w = -0.5;</div>
-<div class="line"> m4x4_multiply(&mp3, &mp2, &mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix the 3DS screens' orientation by swapping the X and Y axis</span></div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[0].x = 0.0;</div>
-<div class="line"> mp2.r[0].y = 1.0;</div>
-<div class="line"> mp2.r[1].x = -1.0; <span class="comment">// flipped</span></div>
-<div class="line"> mp2.r[1].y = 0.0;</div>
-<div class="line"> m4x4_multiply(mtx, &mp2, &mp3);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_persp_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> fovx, <span class="keywordtype">float</span> invaspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Notes:</span></div>
-<div class="line"> <span class="comment">// We are passed "fovy" and the "aspect ratio". However, the 3DS screens are sideways,</span></div>
-<div class="line"> <span class="comment">// and so are these parameters -- in fact, they are actually the fovx and the inverse</span></div>
-<div class="line"> <span class="comment">// of the aspect ratio. Therefore the formula for the perspective projection matrix</span></div>
-<div class="line"> <span class="comment">// had to be modified to be expressed in these terms instead.</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Notes:</span></div>
-<div class="line"> <span class="comment">// fovx = 2 atan(tan(fovy/2)*w/h)</span></div>
-<div class="line"> <span class="comment">// fovy = 2 atan(tan(fovx/2)*h/w)</span></div>
-<div class="line"> <span class="comment">// invaspect = h/w</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// a0,0 = h / (w*tan(fovy/2)) =</span></div>
-<div class="line"> <span class="comment">// = h / (w*tan(2 atan(tan(fovx/2)*h/w) / 2)) =</span></div>
-<div class="line"> <span class="comment">// = h / (w*tan( atan(tan(fovx/2)*h/w) )) =</span></div>
-<div class="line"> <span class="comment">// = h / (w * tan(fovx/2)*h/w) =</span></div>
-<div class="line"> <span class="comment">// = 1 / tan(fovx/2)</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// a1,1 = 1 / tan(fovy/2) = (...) = w / (h*tan(fovx/2))</span></div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> fovx_tan = tanf(fovx / 2);</div>
-<div class="line"> matrix_4x4 mp;</div>
-<div class="line"> m4x4_zeros(&mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Build standard perspective projection matrix</span></div>
-<div class="line"> mp.r[0].x = 1.0f / fovx_tan;</div>
-<div class="line"> mp.r[1].y = 1.0f / (fovx_tan*invaspect);</div>
-<div class="line"> mp.r[2].z = (near + far) / (near - far);</div>
-<div class="line"> mp.r[2].w = (2 * near * far) / (near - far);</div>
-<div class="line"> mp.r[3].z = -1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix depth range to [-1, 0]</span></div>
-<div class="line"> matrix_4x4 mp2;</div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[2].z = 0.5;</div>
-<div class="line"> mp2.r[2].w = -0.5;</div>
-<div class="line"> m4x4_multiply(mtx, &mp2, &mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Rotate the matrix one quarter of a turn CCW in order to fix the 3DS screens' orientation</span></div>
-<div class="line"> m4x4_rotate_z(mtx, M_PI / 2, <span class="keyword">true</span>);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/geoshader/source/vshader.pica </p><div class="fragment"><div class="line">; Example PICA200 vertex shader</div>
-<div class="line"></div>
-<div class="line">; Constants</div>
-<div class="line">.constf myconst(0.0, 1.0, -1.0, -0.5)</div>
-<div class="line">.alias zeros myconst.xxxx ; Vector full of zeros</div>
-<div class="line">.alias ones myconst.yyyy ; Vector full of ones</div>
-<div class="line"></div>
-<div class="line">; Outputs - since we are also using a geoshader the output type isn't really used</div>
-<div class="line">.out outpos position</div>
-<div class="line">.out outclr color</div>
-<div class="line"></div>
-<div class="line">; Inputs (defined as aliases for convenience)</div>
-<div class="line">.alias inpos v0</div>
-<div class="line">.alias inclr v1</div>
-<div class="line"></div>
-<div class="line">.proc main</div>
-<div class="line"> ; Pass through both inputs to the geoshader</div>
-<div class="line"> mov outpos.xyz, inpos</div>
-<div class="line"> mov outpos.w, ones</div>
-<div class="line"> mov outclr, inclr</div>
-<div class="line"></div>
-<div class="line"> ; We're finished</div>
-<div class="line"> end</div>
-<div class="line">.end</div>
-</div><!-- fragment --><p> graphics/gpu/geoshader/source/gshader.pica </p><div class="fragment"><div class="line">; Example PICA200 geometry shader</div>
-<div class="line"></div>
-<div class="line">; Uniforms</div>
-<div class="line">.fvec projection[4]</div>
-<div class="line"></div>
-<div class="line">; Constants</div>
-<div class="line">.constf myconst(0.0, 1.0, -1.0, 0.5)</div>
-<div class="line">.alias zeros myconst.xxxx ; Vector full of zeros</div>
-<div class="line">.alias ones myconst.yyyy ; Vector full of ones</div>
-<div class="line">.alias half myconst.wwww</div>
-<div class="line"></div>
-<div class="line">; Outputs - this time the type *is* used</div>
-<div class="line">.out outpos position</div>
-<div class="line">.out outclr color</div>
-<div class="line"></div>
-<div class="line">; Inputs: we will receive the following inputs:</div>
-<div class="line">; v0-v1: position/color of the first vertex</div>
-<div class="line">; v2-v3: position/color of the second vertex</div>
-<div class="line">; v4-v5: position/color of the third vertex</div>
-<div class="line"></div>
-<div class="line">.proc main</div>
-<div class="line"> ; Calculate the midpoints of the vertices</div>
-<div class="line"> mov r4, v0</div>
-<div class="line"> add r4, v2, r4</div>
-<div class="line"> mul r4, half, r4</div>
-<div class="line"> mov r5, v2</div>
-<div class="line"> add r5, v4, r5</div>
-<div class="line"> mul r5, half, r5</div>
-<div class="line"> mov r6, v4</div>
-<div class="line"> add r6, v0, r6</div>
-<div class="line"> mul r6, half, r6</div>
-<div class="line"></div>
-<div class="line"> ; Emit the first triangle</div>
-<div class="line"> mov r0, v0</div>
-<div class="line"> mov r1, r4</div>
-<div class="line"> mov r2, r6</div>
-<div class="line"> call emit_triangle</div>
-<div class="line"></div>
-<div class="line"> ; Emit the second triangle</div>
-<div class="line"> mov r0, r4</div>
-<div class="line"> mov r1, v2</div>
-<div class="line"> mov r2, r5</div>
-<div class="line"> call emit_triangle</div>
-<div class="line"></div>
-<div class="line"> ; Emit the third triangle</div>
-<div class="line"> mov r0, r6</div>
-<div class="line"> mov r1, r5</div>
-<div class="line"> mov r2, v4</div>
-<div class="line"> call emit_triangle</div>
-<div class="line"></div>
-<div class="line"> ; We're finished</div>
-<div class="line"> end</div>
-<div class="line">.end</div>
-<div class="line"></div>
-<div class="line">.proc emit_triangle</div>
-<div class="line"> ; Emit the first vertex</div>
-<div class="line"> setemit 0</div>
-<div class="line"> mov r8, r0</div>
-<div class="line"> mov r9, v1</div>
-<div class="line"> call process_vertex</div>
-<div class="line"> emit</div>
-<div class="line"></div>
-<div class="line"> ; Emit the second vertex</div>
-<div class="line"> setemit 1</div>
-<div class="line"> mov r8, r1</div>
-<div class="line"> mov r9, v3</div>
-<div class="line"> call process_vertex</div>
-<div class="line"> emit</div>
-<div class="line"></div>
-<div class="line"> ; Emit the third vertex and finish the primitive</div>
-<div class="line"> setemit 2, prim</div>
-<div class="line"> mov r8, r2</div>
-<div class="line"> mov r9, v5</div>
-<div class="line"> call process_vertex</div>
-<div class="line"> emit</div>
-<div class="line">.end</div>
-<div class="line"></div>
-<div class="line">; Subroutine</div>
-<div class="line">; Inputs:</div>
-<div class="line">; r8: vertex position</div>
-<div class="line">; r9: vertex color</div>
-<div class="line">.proc process_vertex</div>
-<div class="line"> ; outpos = projectionMatrix * r8</div>
-<div class="line"> dp4 outpos.x, projection[0], r8</div>
-<div class="line"> dp4 outpos.y, projection[1], r8</div>
-<div class="line"> dp4 outpos.z, projection[2], r8</div>
-<div class="line"> dp4 outpos.w, projection[3], r8</div>
-<div class="line"></div>
-<div class="line"> ; outclr = r9</div>
-<div class="line"> mov outclr, r9</div>
-<div class="line">.end</div>
-</div><!-- fragment --><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * ~~ Simple libctru GPU geometry shader example ~~</span></div>
-<div class="line"><span class="comment"> * This example demonstrates the basics of using the PICA200 in a 3DS homebrew</span></div>
-<div class="line"><span class="comment"> * application in order to render a basic scene using a geoshader.</span></div>
-<div class="line"><span class="comment"> * The example geoshader receives the vertices of a triangle and emits three</span></div>
-<div class="line"><span class="comment"> * smaller triangles, thus forming a 'triforce' shape.</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#include "<a class="code" href="gpu_8h.html">gpu.h</a>"</span></div>
-<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
-<div class="line"><span class="preprocessor">#include "gshader_shbin.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
-<div class="line"></div>
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ <span class="keywordtype">float</span> position[3]; <span class="keywordtype">float</span> color[4]; } vertex;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keyword">const</span> vertex vertex_list[] =</div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))</span></div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <a name="_a47"></a><a class="code" href="structDVLB__s.html">DVLB_s</a> *vshader_dvlb, *gshader_dvlb;</div>
-<div class="line"><span class="keyword">static</span> <a name="_a48"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a0"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* program_dvlb;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_projection;</div>
-<div class="line"><span class="keyword">static</span> matrix_4x4 projection;</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx projection;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span>* vbo_data;</div>
<div class="line"></div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Load the shaders and create a shader program</span></div>
<div class="line"> <span class="comment">// The geoshader stride is set to 6 so that it processes a triangle at a time</span></div>
-<div class="line"> vshader_dvlb = <a name="a49"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
-<div class="line"> gshader_dvlb = <a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)gshader_shbin, gshader_shbin_size);</div>
-<div class="line"> <a name="a50"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
-<div class="line"> <a name="a51"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a52"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
-<div class="line"> <a name="a53"></a><a class="code" href="shaderProgram_8h.html#a9dfb834657daeaa420744d0d55a857b4">shaderProgramSetGsh</a>(&program, &gshader_dvlb-><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0], 6);</div>
+<div class="line"> program_dvlb = <a name="a2"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)program_shbin, program_shbin_size);</div>
+<div class="line"> <a name="a3"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
+<div class="line"> <a name="a4"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &program_dvlb-><a name="a5"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> <a name="a6"></a><a class="code" href="shaderProgram_8h.html#a9dfb834657daeaa420744d0d55a857b4">shaderProgramSetGsh</a>(&program, &program_dvlb-><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[1], 6);</div>
+<div class="line"> C3D_BindProgram(&program);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Get the location of the projection matrix uniform</span></div>
-<div class="line"> uLoc_projection = <a name="a54"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a55"></a><a class="code" href="structshaderProgram__s.html#a80f25550817af2c8163bc95430542f1f">geometryShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"> uLoc_projection = <a name="a7"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a8"></a><a class="code" href="structshaderProgram__s.html#a80f25550817af2c8163bc95430542f1f">geometryShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure attributes for use with the vertex shader</span></div>
+<div class="line"> C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();</div>
+<div class="line"> AttrInfo_Init(attrInfo);</div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 0, <a name="a9"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v0=position</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 1, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 4); <span class="comment">// v1=color</span></div>
<div class="line"></div>
<div class="line"> <span class="comment">// Compute the projection matrix</span></div>
-<div class="line"> m4x4_ortho_tilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);</div>
+<div class="line"> Mtx_OrthoTilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Create the VBO (vertex buffer object)</span></div>
-<div class="line"> vbo_data = <a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
+<div class="line"> vbo_data = <a name="a10"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
<div class="line"> memcpy(vbo_data, vertex_list, <span class="keyword">sizeof</span>(vertex_list));</div>
-<div class="line">}</div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Bind the shader program</span></div>
-<div class="line"> <a name="a56"></a><a class="code" href="shaderProgram_8h.html#a29749780857245eb8860fe1bda3bcc97">shaderProgramUse</a>(&program);</div>
+<div class="line"> <span class="comment">// Configure buffers</span></div>
+<div class="line"> C3D_BufInfo* bufInfo = C3D_GetBufInfo();</div>
+<div class="line"> BufInfo_Init(bufInfo);</div>
+<div class="line"> BufInfo_Add(bufInfo, vbo_data, <span class="keyword">sizeof</span>(vertex), 2, 0x10);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Configure the first fragment shading substage to just pass through the vertex color</span></div>
<div class="line"> <span class="comment">// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight</span></div>
-<div class="line"> <a class="code" href="gpu-old_8h.html#a7b61022c85fa068574fd6b61d55f9530">GPU_SetTexEnv</a>(0,</div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a name="a57"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>), <span class="comment">// RGB channels</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>), <span class="comment">// Alpha</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0), <span class="comment">// RGB</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0), <span class="comment">// Alpha</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>, <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>, <span class="comment">// RGB, Alpha</span></div>
-<div class="line"> 0xFFFFFFFF);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure the "attribute buffers" (that is, the vertex input buffers)</span></div>
-<div class="line"> <a name="a58"></a><a class="code" href="gpu-old_8h.html#ac81475073183a797d1e723770f5cf6b4">GPU_SetAttributeBuffers</a>(</div>
-<div class="line"> 2, <span class="comment">// Number of inputs per vertex</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(vbo_data), <span class="comment">// Location of the VBO</span></div>
-<div class="line"> <a name="a59"></a><a class="code" href="enums_8h.html#aaa7337c142b909e470bbf1ce3c8e9e03">GPU_ATTRIBFMT</a>(0, 3, <a name="a60"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>) |</div>
-<div class="line"> <a class="code" href="enums_8h.html#aaa7337c142b909e470bbf1ce3c8e9e03">GPU_ATTRIBFMT</a>(1, 4, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>), <span class="comment">// Format of the inputs (in this case the only input is a 3-element float vector)</span></div>
-<div class="line"> 0xFFC, <span class="comment">// Unused attribute mask, in our case bit 0 is cleared since it is used</span></div>
-<div class="line"> 0x10, <span class="comment">// Attribute permutations (here it is the identity)</span></div>
-<div class="line"> 1, <span class="comment">// Number of buffers</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>[]) { 0x0 }, <span class="comment">// Buffer offsets (placeholders)</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a>[]) { 0x10 }, <span class="comment">// Attribute permutations for each buffer (identity again)</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>[]) { 2 }); <span class="comment">// Number of attributes for each buffer</span></div>
+<div class="line"> C3D_TexEnv* env = C3D_GetTexEnv(0);</div>
+<div class="line"> C3D_TexEnvSrc(env, C3D_Both, <a name="a11"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, 0, 0);</div>
+<div class="line"> C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);</div>
+<div class="line"> C3D_TexEnvFunc(env, C3D_Both, <a name="a12"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>);</div>
+<div class="line">}</div>
<div class="line"></div>
-<div class="line"> <span class="comment">// Upload the projection matrix</span></div>
-<div class="line"> GPU_SetFloatUniformMatrix(<a name="a61"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a3a5aa450c7d22bbeb9252de319c635db">GPU_GEOMETRY_SHADER</a>, uLoc_projection, &projection);</div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Update the uniforms</span></div>
+<div class="line"> C3D_FVUnifMtx4x4(<a name="a13"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a3a5aa450c7d22bbeb9252de319c635db">GPU_GEOMETRY_SHADER</a>, uLoc_projection, &projection);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Draw the VBO - GPU_GEOMETRY_PRIM allows the geoshader to control primitive emission</span></div>
-<div class="line"> <a name="a62"></a><a class="code" href="gpu-old_8h.html#a4aecce954e20dee2e37e2e774361e9dd">GPU_DrawArray</a>(<a name="a63"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806aa5510b7bf1f022edd1a180a2b111cf53">GPU_GEOMETRY_PRIM</a>, 0, vertex_list_count);</div>
+<div class="line"> C3D_DrawArrays(<a name="a14"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806aa5510b7bf1f022edd1a180a2b111cf53">GPU_GEOMETRY_PRIM</a>, 0, vertex_list_count);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneExit(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Free the VBO</span></div>
-<div class="line"> <a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
+<div class="line"> <a name="a15"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Free the shader program</span></div>
-<div class="line"> <a name="a64"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
-<div class="line"> <a name="a65"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
-<div class="line"> <a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(gshader_dvlb);</div>
+<div class="line"> <a name="a16"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
+<div class="line"> <a name="a17"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(program_dvlb);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main()</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Initialize graphics</span></div>
-<div class="line"> <a name="a66"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
-<div class="line"> gpuInit();</div>
+<div class="line"> <a name="a18"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
+<div class="line"> C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the render target</span></div>
+<div class="line"> C3D_RenderTarget* target = C3D_RenderTargetCreate(240, 400, <a name="a19"></a><a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a name="a20"></a><a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTargetSetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetOutput(target, <a name="a21"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a22"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, DISPLAY_TRANSFER_FLAGS);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Initialize the scene</span></div>
<div class="line"> sceneInit();</div>
-<div class="line"> gpuClearBuffers(CLEAR_COLOR);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Main loop</span></div>
-<div class="line"> <span class="keywordflow">while</span> (<a name="a67"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
+<div class="line"> <span class="keywordflow">while</span> (<a name="a23"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
<div class="line"> {</div>
-<div class="line"> <a name="a68"></a><a class="code" href="gspgpu_8h.html#abf0a992835649b5fe90e95d8a58b8c45">gspWaitForVBlank</a>(); <span class="comment">// Synchronize with the start of VBlank</span></div>
-<div class="line"> <a name="a69"></a><a class="code" href="gfx_8h.html#a3306df28835a647734cf8e299f041527">gfxSwapBuffersGpu</a>(); <span class="comment">// Swap the framebuffers so that the frame that we rendered last frame is now visible</span></div>
-<div class="line"> <a name="a70"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>(); <span class="comment">// Read the user input</span></div>
+<div class="line"> <a name="a24"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Respond to user input</span></div>
-<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a71"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
-<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a72"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
+<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a25"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
+<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a26"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
<div class="line"> <span class="keywordflow">break</span>; <span class="comment">// break in order to return to hbmenu</span></div>
<div class="line"></div>
<div class="line"> <span class="comment">// Render the scene</span></div>
-<div class="line"> gpuFrameBegin();</div>
-<div class="line"> sceneRender();</div>
-<div class="line"> gpuFrameEnd();</div>
-<div class="line"> gpuClearBuffers(CLEAR_COLOR);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Flush the framebuffers out of the data cache (not necessary with pure GPU rendering)</span></div>
-<div class="line"> <span class="comment">//gfxFlushBuffers();</span></div>
+<div class="line"> C3D_FrameBegin(C3D_FRAME_SYNCDRAW);</div>
+<div class="line"> C3D_FrameDrawOn(target);</div>
+<div class="line"> sceneRender();</div>
+<div class="line"> C3D_FrameEnd(0);</div>
<div class="line"> }</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Deinitialize the scene</span></div>
<div class="line"> sceneExit();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Deinitialize graphics</span></div>
-<div class="line"> gpuExit();</div>
-<div class="line"> <a name="a73"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
+<div class="line"> C3D_Fini();</div>
+<div class="line"> <a name="a27"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
</div><!-- fragment --> </div><!-- contents -->
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.10"/>
+<title>libctru: graphics/gpu/gpusprites/source/main.c</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">libctru
+  <span id="projectnumber">v1.1.0</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.10 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main Page</span></a></li>
+ <li><a href="pages.html"><span>Related Pages</span></a></li>
+ <li><a href="annotated.html"><span>Data Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ <li><a href="examples.html"><span>Examples</span></a></li>
+ <li>
+ <div id="MSearchBox" class="MSearchBoxInactive">
+ <span class="left">
+ <img id="MSearchSelect" src="search/mag_sel.png"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ alt=""/>
+ <input type="text" id="MSearchField" value="Search" accesskey="S"
+ onfocus="searchBox.OnSearchFieldFocus(true)"
+ onblur="searchBox.OnSearchFieldFocus(false)"
+ onkeyup="searchBox.OnSearchFieldChange(event)"/>
+ </span><span class="right">
+ <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+ </span>
+ </div>
+ </li>
+ </ul>
+ </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">graphics/gpu/gpusprites/source/main.c</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="fragment"><div class="line"><span class="comment">/*</span></div>
+<div class="line"><span class="comment"></span></div>
+<div class="line"><span class="comment"> Simple demo of sprites using citro3d, lodepng and immediate mode.</span></div>
+<div class="line"><span class="comment"></span></div>
+<div class="line"><span class="comment"> Citra doesn't yet emulate immediate mode so this is hw only.</span></div>
+<div class="line"><span class="comment"></span></div>
+<div class="line"><span class="comment">*/</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
+<div class="line"><span class="preprocessor">#include <citro3d.h></span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#include <string.h></span></div>
+<div class="line"><span class="preprocessor">#include <stdlib.h></span></div>
+<div class="line"><span class="preprocessor">#include <time.h></span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#include "lodepng.h"</span></div>
+<div class="line"></div>
+<div class="line"><span class="comment">// These headers are generated by the build process</span></div>
+<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
+<div class="line"><span class="preprocessor">#include "ballsprites_png.h"</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x000000FF</span></div>
+<div class="line"></div>
+<div class="line"><span class="comment">// Used to transfer the final rendered display to the framebuffer</span></div>
+<div class="line"><span class="preprocessor">#define DISPLAY_TRANSFER_FLAGS \</span></div>
+<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
+<div class="line"></div>
+<div class="line"><span class="comment">// Used to convert textures to 3DS tiled format</span></div>
+<div class="line"><span class="comment">// Note: vertical flip flag set so 0,0 is top left of texture</span></div>
+<div class="line"><span class="preprocessor">#define TEXTURE_TRANSFER_FLAGS \</span></div>
+<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(1) | GX_TRANSFER_OUT_TILED(1) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGBA8) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define NUM_SPRITES 256</span></div>
+<div class="line"></div>
+<div class="line"><span class="comment">//simple sprite struct</span></div>
+<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
+<div class="line"> <span class="keywordtype">int</span> x,y; <span class="comment">// screen co-ordinates </span></div>
+<div class="line"> <span class="keywordtype">int</span> dx, dy; <span class="comment">// velocity</span></div>
+<div class="line"> <span class="keywordtype">int</span> image;</div>
+<div class="line">}Sprite;</div>
+<div class="line"></div>
+<div class="line">Sprite sprites[NUM_SPRITES];</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">struct </span>{ <span class="keywordtype">float</span> left, right, top, bottom; } images[4] = {</div>
+<div class="line"> {0.0f, 0.5f, 0.0f, 0.5f},</div>
+<div class="line"> {0.5f, 1.0f, 0.0f, 0.5f},</div>
+<div class="line"> {0.0f, 0.5f, 0.5f, 1.0f},</div>
+<div class="line"> {0.5f, 1.0f, 0.5f, 1.0f},</div>
+<div class="line">};</div>
+<div class="line"></div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"><span class="keywordtype">void</span> drawSprite( <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> image ) {</div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"></div>
+<div class="line"> <span class="keywordtype">float</span> left = images[image].left;</div>
+<div class="line"> <span class="keywordtype">float</span> right = images[image].right;</div>
+<div class="line"> <span class="keywordtype">float</span> top = images[image].top;</div>
+<div class="line"> <span class="keywordtype">float</span> bottom = images[image].bottom;</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Draw a textured quad directly</span></div>
+<div class="line"> C3D_ImmDrawBegin(<a name="a0"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>);</div>
+<div class="line"> C3D_ImmSendAttrib(x, y, 0.5f, 0.0f); <span class="comment">// v0=position</span></div>
+<div class="line"> C3D_ImmSendAttrib( left, top, 0.0f, 0.0f);</div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(x+width, y+height, 0.5f, 0.0f);</div>
+<div class="line"> C3D_ImmSendAttrib( right, bottom, 0.0f, 0.0f);</div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(x+width, y, 0.5f, 0.0f);</div>
+<div class="line"> C3D_ImmSendAttrib( right, top, 0.0f, 0.0f);</div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(x, y, 0.5f, 0.0f); <span class="comment">// v0=position</span></div>
+<div class="line"> C3D_ImmSendAttrib( left, top, 0.0f, 0.0f);</div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(x, y+height, 0.5f, 0.0f);</div>
+<div class="line"> C3D_ImmSendAttrib( left, bottom, 0.0f, 0.0f);</div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(x+width, y+height, 0.5f, 0.0f);</div>
+<div class="line"> C3D_ImmSendAttrib( right, bottom, 0.0f, 0.0f);</div>
+<div class="line"></div>
+<div class="line"></div>
+<div class="line"> C3D_ImmDrawEnd();</div>
+<div class="line"></div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a2"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_projection;</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx projection;</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> C3D_Tex spritesheet_tex;</div>
+<div class="line"></div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneInit(<span class="keywordtype">void</span>) {</div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"> <span class="keywordtype">int</span> i;</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Load the vertex shader, create a shader program and bind it</span></div>
+<div class="line"> vshader_dvlb = <a name="a3"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
+<div class="line"> <a name="a4"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
+<div class="line"> <a name="a5"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a6"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> C3D_BindProgram(&program);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Get the location of the uniforms</span></div>
+<div class="line"> uLoc_projection = <a name="a7"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a8"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure attributes for use with the vertex shader</span></div>
+<div class="line"> <span class="comment">// Attribute format and element count are ignored in immediate mode</span></div>
+<div class="line"> C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();</div>
+<div class="line"> AttrInfo_Init(attrInfo);</div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 0, <a name="a9"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v0=position</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 1, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 2); <span class="comment">// v2=texcoord</span></div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Compute the projection matrix</span></div>
+<div class="line"> <span class="comment">// Note: we're setting top to 240 here so origin is at top left.</span></div>
+<div class="line"> Mtx_OrthoTilt(&projection, 0.0, 400.0, 240.0, 0.0, 0.0, 1.0);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure buffers</span></div>
+<div class="line"> C3D_BufInfo* bufInfo = C3D_GetBufInfo();</div>
+<div class="line"> BufInfo_Init(bufInfo);</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* image;</div>
+<div class="line"> <span class="keywordtype">unsigned</span> width, height;</div>
+<div class="line"></div>
+<div class="line"> lodepng_decode32(&image, &width, &height, ballsprites_png, ballsprites_png_size);</div>
+<div class="line"></div>
+<div class="line"> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> *gpusrc = <a name="a10"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(width*height*4);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// GX_DisplayTransfer needs input buffer in linear RAM</span></div>
+<div class="line"> <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* src=image; <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> *dst=gpusrc;</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// lodepng outputs big endian rgba so we need to convert</span></div>
+<div class="line"> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i<width*height; i++) {</div>
+<div class="line"> <span class="keywordtype">int</span> r = *src++;</div>
+<div class="line"> <span class="keywordtype">int</span> g = *src++;</div>
+<div class="line"> <span class="keywordtype">int</span> b = *src++;</div>
+<div class="line"> <span class="keywordtype">int</span> a = *src++;</div>
+<div class="line"></div>
+<div class="line"> *dst++ = a;</div>
+<div class="line"> *dst++ = b;</div>
+<div class="line"> *dst++ = g;</div>
+<div class="line"> *dst++ = r;</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// ensure data is in physical ram</span></div>
+<div class="line"> <a name="a11"></a><a class="code" href="gspgpu_8h.html#a24f1c78fad4e1108ddc56fb3674cdba2">GSPGPU_FlushDataCache</a>(gpusrc, width*height*4);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Load the texture and bind it to the first texture unit</span></div>
+<div class="line"> C3D_TexInit(&spritesheet_tex, width, height, <a name="a12"></a><a class="code" href="enums_8h.html#a63bb2f7fceb0f356549f0be235a0f99faff51f393b902dd545e863c24679bccd2">GPU_RGBA8</a>);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Convert image to 3DS tiled texture format</span></div>
+<div class="line"> <a name="a13"></a><a class="code" href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a> ((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)gpusrc, <a name="a14"></a><a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(width,height), (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)spritesheet_tex.data, <a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(width,height), TEXTURE_TRANSFER_FLAGS);</div>
+<div class="line"> <a name="a15"></a><a class="code" href="gspgpu_8h.html#a2f2aca81b76a88b6ebb121ec54f76b7e">gspWaitForPPF</a>();</div>
+<div class="line"></div>
+<div class="line"> C3D_TexSetFilter(&spritesheet_tex, <a name="a16"></a><a class="code" href="enums_8h.html#a2c76780b7ff5d323daf30ea310fbc8c4a18f85af3bd3785e9463dae917436cb6f">GPU_LINEAR</a>, <a name="a17"></a><a class="code" href="enums_8h.html#a2c76780b7ff5d323daf30ea310fbc8c4a916807475bc96900be35e0b8035845d0">GPU_NEAREST</a>);</div>
+<div class="line"> C3D_TexBind(0, &spritesheet_tex);</div>
+<div class="line"></div>
+<div class="line"> free(image);</div>
+<div class="line"> <a name="a18"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(gpusrc);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure the first fragment shading substage to just pass through the texture color</span></div>
+<div class="line"> <span class="comment">// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight</span></div>
+<div class="line"> C3D_TexEnv* env = C3D_GetTexEnv(0);</div>
+<div class="line"> C3D_TexEnvSrc(env, C3D_Both, <a name="a19"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0ab6436a8677bfb947fd2c085d95eb2cd0">GPU_TEXTURE0</a>, 0, 0);</div>
+<div class="line"> C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);</div>
+<div class="line"> C3D_TexEnvFunc(env, C3D_Both, <a name="a20"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>);</div>
+<div class="line"></div>
+<div class="line"> srand(time(NULL));</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">for</span>(i = 0; i < NUM_SPRITES; i++) {</div>
+<div class="line"> <span class="comment">//random place and speed</span></div>
+<div class="line"> sprites[i].x = (rand() % (400 - 32 )) << 8;</div>
+<div class="line"> sprites[i].y = (rand() % (240 - 32 )) << 8 ;</div>
+<div class="line"> sprites[i].dx = (rand() & 0xFF) + 0x100;</div>
+<div class="line"> sprites[i].dy = (rand() & 0xFF) + 0x100;</div>
+<div class="line"> sprites[i].image = rand() & 3;</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">if</span>(rand() & 1)</div>
+<div class="line"> sprites[i].dx = -sprites[i].dx;</div>
+<div class="line"> <span class="keywordflow">if</span>(rand() & 1)</div>
+<div class="line"> sprites[i].dy = -sprites[i].dy;</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure depth test to overwrite pixels with the same depth (needed to draw overlapping sprites)</span></div>
+<div class="line"> C3D_DepthTest(<span class="keyword">true</span>, <a name="a21"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a1160361c130e3b1bd576cbab921fe719">GPU_GEQUAL</a>, <a name="a22"></a><a class="code" href="enums_8h.html#a7fffcfca8e93491a90d7b54cce719cd3ae6311b606a2db6df1e7358ad79e297a0">GPU_WRITE_ALL</a>);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> moveSprites() {</div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"></div>
+<div class="line"> <span class="keywordtype">int</span> i;</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">for</span>(i = 0; i < NUM_SPRITES; i++) {</div>
+<div class="line"> sprites[i].x += sprites[i].dx;</div>
+<div class="line"> sprites[i].y += sprites[i].dy;</div>
+<div class="line"> </div>
+<div class="line"> <span class="comment">//check for collision with the screen boundaries</span></div>
+<div class="line"> <span class="keywordflow">if</span>(sprites[i].x < (1<<8) || sprites[i].x > ((400-32) << 8))</div>
+<div class="line"> sprites[i].dx = -sprites[i].dx;</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">if</span>(sprites[i].y < (1<<8) || sprites[i].y > ((240-32) << 8))</div>
+<div class="line"> sprites[i].dy = -sprites[i].dy;</div>
+<div class="line"> }</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>) {</div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"> <span class="keywordtype">int</span> i;</div>
+<div class="line"> <span class="comment">// Update the uniforms</span></div>
+<div class="line"> C3D_FVUnifMtx4x4(<a name="a23"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
+<div class="line"></div>
+<div class="line"> <span class="keywordflow">for</span>(i = 0; i < NUM_SPRITES; i++) {</div>
+<div class="line"></div>
+<div class="line"> drawSprite( sprites[i].x >> 8, sprites[i].y >> 8, 32, 32, sprites[i].image);</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneExit(<span class="keywordtype">void</span>) {</div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Free the shader program</span></div>
+<div class="line"> <a name="a24"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
+<div class="line"> <a name="a25"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv) {</div>
+<div class="line"><span class="comment">//---------------------------------------------------------------------------------</span></div>
+<div class="line"> <span class="comment">// Initialize graphics</span></div>
+<div class="line"> <a name="a26"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
+<div class="line"> C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the render target</span></div>
+<div class="line"> C3D_RenderTarget* target = C3D_RenderTargetCreate(240, 400, <a name="a27"></a><a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a name="a28"></a><a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTargetSetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetOutput(target, <a name="a29"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a30"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, DISPLAY_TRANSFER_FLAGS);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the scene</span></div>
+<div class="line"> sceneInit();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Main loop</span></div>
+<div class="line"> <span class="keywordflow">while</span> (<a name="a31"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>()) {</div>
+<div class="line"></div>
+<div class="line"> <a name="a32"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Respond to user input</span></div>
+<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a33"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
+<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a34"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
+<div class="line"> <span class="keywordflow">break</span>; <span class="comment">// break in order to return to hbmenu</span></div>
+<div class="line"></div>
+<div class="line"> moveSprites();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Render the scene</span></div>
+<div class="line"> C3D_FrameBegin(C3D_FRAME_SYNCDRAW);</div>
+<div class="line"> C3D_FrameDrawOn(target);</div>
+<div class="line"> sceneRender();</div>
+<div class="line"> C3D_FrameEnd(0);</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Deinitialize the scene</span></div>
+<div class="line"> sceneExit();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Deinitialize graphics</span></div>
+<div class="line"> C3D_Fini();</div>
+<div class="line"> <a name="a35"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
+<div class="line"> <span class="keywordflow">return</span> 0;</div>
+<div class="line">}</div>
+</div><!-- fragment --> </div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by  <a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.10
+</small></address>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.10"/>
+<title>libctru: graphics/gpu/immediate/source/main.c</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/javascript">
+ $(document).ready(function() { init_search(); });
+</script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <td id="projectalign" style="padding-left: 0.5em;">
+ <div id="projectname">libctru
+  <span id="projectnumber">v1.1.0</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.10 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main Page</span></a></li>
+ <li><a href="pages.html"><span>Related Pages</span></a></li>
+ <li><a href="annotated.html"><span>Data Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ <li><a href="examples.html"><span>Examples</span></a></li>
+ <li>
+ <div id="MSearchBox" class="MSearchBoxInactive">
+ <span class="left">
+ <img id="MSearchSelect" src="search/mag_sel.png"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ alt=""/>
+ <input type="text" id="MSearchField" value="Search" accesskey="S"
+ onfocus="searchBox.OnSearchFieldFocus(true)"
+ onblur="searchBox.OnSearchFieldFocus(false)"
+ onkeyup="searchBox.OnSearchFieldChange(event)"/>
+ </span><span class="right">
+ <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+ </span>
+ </div>
+ </li>
+ </ul>
+ </div>
+</div><!-- top -->
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">graphics/gpu/immediate/source/main.c</div> </div>
+</div><!--header-->
+<div class="contents">
+<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
+<div class="line"><span class="preprocessor">#include <citro3d.h></span></div>
+<div class="line"><span class="preprocessor">#include <string.h></span></div>
+<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
+<div class="line"></div>
+<div class="line"><span class="preprocessor">#define DISPLAY_TRANSFER_FLAGS \</span></div>
+<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \</span></div>
+<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <a name="_a0"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_projection;</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx projection;</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneInit(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Load the vertex shader, create a shader program and bind it</span></div>
+<div class="line"> vshader_dvlb = <a name="a2"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
+<div class="line"> <a name="a3"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
+<div class="line"> <a name="a4"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a5"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> C3D_BindProgram(&program);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Get the location of the uniforms</span></div>
+<div class="line"> uLoc_projection = <a name="a6"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a7"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure attributes for use with the vertex shader</span></div>
+<div class="line"> <span class="comment">// Attribute format and element count are ignored in immediate mode</span></div>
+<div class="line"> C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();</div>
+<div class="line"> AttrInfo_Init(attrInfo);</div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 0, <a name="a8"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v0=position</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 1, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v1=color</span></div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Compute the projection matrix</span></div>
+<div class="line"> Mtx_OrthoTilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Configure the first fragment shading substage to just pass through the vertex color</span></div>
+<div class="line"> <span class="comment">// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight</span></div>
+<div class="line"> C3D_TexEnv* env = C3D_GetTexEnv(0);</div>
+<div class="line"> C3D_TexEnvSrc(env, C3D_Both, <a name="a9"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, 0, 0);</div>
+<div class="line"> C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);</div>
+<div class="line"> C3D_TexEnvFunc(env, C3D_Both, <a name="a10"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Update the uniforms</span></div>
+<div class="line"> C3D_FVUnifMtx4x4(<a name="a11"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Draw the triangle directly</span></div>
+<div class="line"> C3D_ImmDrawBegin(<a name="a12"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>);</div>
+<div class="line"> C3D_ImmSendAttrib(200.0f, 200.0f, 0.5f, 0.0f); <span class="comment">// v0=position</span></div>
+<div class="line"> C3D_ImmSendAttrib(1.0f, 0.0f, 0.0f, 1.0f); <span class="comment">// v1=color</span></div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(100.0f, 40.0f, 0.5f, 0.0f);</div>
+<div class="line"> C3D_ImmSendAttrib(0.0f, 1.0f, 0.0f, 1.0f);</div>
+<div class="line"></div>
+<div class="line"> C3D_ImmSendAttrib(300.0f, 40.0f, 0.5f, 0.0f);</div>
+<div class="line"> C3D_ImmSendAttrib(0.0f, 0.0f, 1.0f, 1.0f);</div>
+<div class="line"> C3D_ImmDrawEnd();</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneExit(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Free the shader program</span></div>
+<div class="line"> <a name="a13"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
+<div class="line"> <a name="a14"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
+<div class="line">}</div>
+<div class="line"></div>
+<div class="line"><span class="keywordtype">int</span> main()</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Initialize graphics</span></div>
+<div class="line"> <a name="a15"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
+<div class="line"> C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the render target</span></div>
+<div class="line"> C3D_RenderTarget* target = C3D_RenderTargetCreate(240, 400, <a name="a16"></a><a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a name="a17"></a><a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTargetSetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetOutput(target, <a name="a18"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a19"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, DISPLAY_TRANSFER_FLAGS);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the scene</span></div>
+<div class="line"> sceneInit();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Main loop</span></div>
+<div class="line"> <span class="keywordflow">while</span> (<a name="a20"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
+<div class="line"> {</div>
+<div class="line"> <a name="a21"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Respond to user input</span></div>
+<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a22"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
+<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a23"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
+<div class="line"> <span class="keywordflow">break</span>; <span class="comment">// break in order to return to hbmenu</span></div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Render the scene</span></div>
+<div class="line"> C3D_FrameBegin(C3D_FRAME_SYNCDRAW);</div>
+<div class="line"> C3D_FrameDrawOn(target);</div>
+<div class="line"> sceneRender();</div>
+<div class="line"> C3D_FrameEnd(0);</div>
+<div class="line"> }</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Deinitialize the scene</span></div>
+<div class="line"> sceneExit();</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Deinitialize graphics</span></div>
+<div class="line"> C3D_Fini();</div>
+<div class="line"> <a name="a24"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
+<div class="line"> <span class="keywordflow">return</span> 0;</div>
+<div class="line">}</div>
+</div><!-- fragment --> </div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by  <a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/>
+</a> 1.8.10
+</small></address>
+</body>
+</html>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="title">graphics/gpu/simple_tri/source/main.c</div> </div>
</div><!--header-->
<div class="contents">
-<p>graphics/gpu/simple_tri/source/gpu.h </p><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * Bare-bones simplistic GPU wrapper</span></div>
-<div class="line"><span class="comment"> * This library is common to all libctru GPU examples</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#pragma once</span></div>
+<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
+<div class="line"><span class="preprocessor">#include <citro3d.h></span></div>
<div class="line"><span class="preprocessor">#include <string.h></span></div>
-<div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
-<div class="line"><span class="preprocessor">#include "3dmath.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuInit(<span class="keywordtype">void</span>);</div>
-<div class="line"><span class="keywordtype">void</span> gpuExit(<span class="keywordtype">void</span>);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuClearBuffers(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> clearColor);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameBegin(<span class="keywordtype">void</span>);</div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameEnd(<span class="keywordtype">void</span>);</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// Configures the specified fixed-function fragment shading substage to be a no-operation</span></div>
-<div class="line"><span class="keywordtype">void</span> GPU_SetDummyTexEnv(<span class="keywordtype">int</span> <span class="keywordtype">id</span>);</div>
+<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
<div class="line"></div>
-<div class="line"><span class="comment">// Uploads an uniform matrix</span></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> GPU_SetFloatUniformMatrix(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5">GPU_SHADER_TYPE</a> type, <span class="keywordtype">int</span> location, matrix_4x4* matrix)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a0"></a><a class="code" href="gpu-old_8h.html#af18a38db985563a54813c2ebf86d6509">GPU_SetFloatUniform</a>(type, location, (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)matrix, 4);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/simple_tri/source/gpu.c </p><div class="fragment"><div class="line"><span class="preprocessor">#include "<a class="code" href="gpu_8h.html">gpu.h</a>"</span></div>
+<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define DISPLAY_TRANSFER_FLAGS \</span></div>
<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \</span></div>
<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *colorBuf, *depthBuf;</div>
-<div class="line"><span class="keyword">static</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *cmdBuf;</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuInit(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> colorBuf = <a name="a1"></a><a class="code" href="vram_8h.html#a00b84b8d38c127d8af9a89b9b7e2a5a4">vramAlloc</a>(400*240*4);</div>
-<div class="line"> depthBuf = <a class="code" href="vram_8h.html#a00b84b8d38c127d8af9a89b9b7e2a5a4">vramAlloc</a>(400*240*4);</div>
-<div class="line"> cmdBuf = <a name="a2"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(0x40000*4);</div>
-<div class="line"></div>
-<div class="line"> <a name="a3"></a><a class="code" href="gpu-old_8h.html#a921bb00def7171c1936fa50c6e464fba">GPU_Init</a>(NULL);</div>
-<div class="line"> <a name="a4"></a><a class="code" href="gpu-old_8h.html#a896e2be6136bb62909be966cc74eeb4d">GPU_Reset</a>(NULL, cmdBuf, 0x40000);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuExit(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a5"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(cmdBuf);</div>
-<div class="line"> <a name="a6"></a><a class="code" href="vram_8h.html#a867318cde93cdd997588d6dcbfc584e1">vramFree</a>(depthBuf);</div>
-<div class="line"> <a class="code" href="vram_8h.html#a867318cde93cdd997588d6dcbfc584e1">vramFree</a>(colorBuf);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuClearBuffers(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> clearColor)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a7"></a><a class="code" href="gx_8h.html#aa6e39b328383930b64eaa230bc9bc6a0">GX_MemoryFill</a>(</div>
-<div class="line"> colorBuf, clearColor, &colorBuf[240*400], <a name="a8"></a><a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> | <a name="a9"></a><a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a>,</div>
-<div class="line"> depthBuf, 0, &depthBuf[240*400], <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> | <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a>);</div>
-<div class="line"> <a name="a10"></a><a class="code" href="gspgpu_8h.html#a704e891a5d988f4964c24dc2b8bac787">gspWaitForPSC0</a>(); <span class="comment">// Wait for the fill to complete</span></div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameBegin(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Configure the viewport and the depth linear conversion function</span></div>
-<div class="line"> <a name="a11"></a><a class="code" href="gpu-old_8h.html#aba80c2d6e88cb75263de89a2d059e230">GPU_SetViewport</a>(</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a name="a12"></a><a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(depthBuf),</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(colorBuf),</div>
-<div class="line"> 0, 0, 240, 400); <span class="comment">// The top screen is physically 240x400 pixels</span></div>
-<div class="line"> <a name="a13"></a><a class="code" href="gpu-old_8h.html#a8b8de4eb721e55913ad0641c64fbaa75">GPU_DepthMap</a>(-1.0f, 0.0f); <span class="comment">// calculate the depth value from the Z coordinate in the following way: -1.0*z + 0.0</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure some boilerplate</span></div>
-<div class="line"> <a name="a14"></a><a class="code" href="gpu-old_8h.html#a717ac338a87549c36a9d70f5c1d7a077">GPU_SetFaceCulling</a>(<a name="a15"></a><a class="code" href="enums_8h.html#aded31eec5d2f72ea5c6141f24d8a0174a5f4f59f8f711f0bcfa9ca8b87f169ee0">GPU_CULL_BACK_CCW</a>);</div>
-<div class="line"> <a name="a16"></a><a class="code" href="gpu-old_8h.html#abc687b8c34463fd1ceacd64dab6c078e">GPU_SetStencilTest</a>(<span class="keyword">false</span>, <a name="a17"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a2021d04562bc3b47a305c57dff840c2e">GPU_ALWAYS</a>, 0x00, 0xFF, 0x00);</div>
-<div class="line"> <a name="a18"></a><a class="code" href="gpu-old_8h.html#aa2512e6c918e4ce998899d589a20dc2b">GPU_SetStencilOp</a>(<a name="a19"></a><a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>, <a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>, <a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>);</div>
-<div class="line"> <a name="a20"></a><a class="code" href="gpu-old_8h.html#a2ead0a88519b4197e13c6ce8e138d6c7">GPU_SetBlendingColor</a>(0,0,0,0);</div>
-<div class="line"> <a name="a21"></a><a class="code" href="gpu-old_8h.html#a8c32fb10ed5457b2e3a9273db61187d3">GPU_SetDepthTestAndWriteMask</a>(<span class="keyword">true</span>, <a name="a22"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a939d397eee5556dccc012bddfd0dd46a">GPU_GREATER</a>, <a name="a23"></a><a class="code" href="enums_8h.html#a7fffcfca8e93491a90d7b54cce719cd3ae6311b606a2db6df1e7358ad79e297a0">GPU_WRITE_ALL</a>);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// This is unknown</span></div>
-<div class="line"> <a name="a24"></a><a class="code" href="gpu_8h.html#a9042ca3f0e361abe2a2ede7206376cb5">GPUCMD_AddMaskedWrite</a>(GPUREG_0062, 0x1, 0);</div>
-<div class="line"> <a name="a25"></a><a class="code" href="gpu_8h.html#a1251c8456a0f92b49eecbe2c21f0a9a0">GPUCMD_AddWrite</a>(GPUREG_0118, 0);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure alpha blending and test</span></div>
-<div class="line"> <a name="a26"></a><a class="code" href="gpu-old_8h.html#ac9bf249df1e7a27a56a4e57c81d19e1c">GPU_SetAlphaBlending</a>(<a name="a27"></a><a class="code" href="enums_8h.html#ade416bc8de7b235e270c76f371d3cfb5a39318f81ae768d8a6119e7965a11bd50">GPU_BLEND_ADD</a>, <a class="code" href="enums_8h.html#ade416bc8de7b235e270c76f371d3cfb5a39318f81ae768d8a6119e7965a11bd50">GPU_BLEND_ADD</a>, <a name="a28"></a><a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1af2ec416dc4e7e8562e61d5f7963e8a36">GPU_SRC_ALPHA</a>, <a name="a29"></a><a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1a7bf978d71679e5507689e4570d3d85b2">GPU_ONE_MINUS_SRC_ALPHA</a>, <a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1af2ec416dc4e7e8562e61d5f7963e8a36">GPU_SRC_ALPHA</a>, <a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1a7bf978d71679e5507689e4570d3d85b2">GPU_ONE_MINUS_SRC_ALPHA</a>);</div>
-<div class="line"> <a name="a30"></a><a class="code" href="gpu-old_8h.html#aec1714fa8c2684020ab10a4da8e784e0">GPU_SetAlphaTest</a>(<span class="keyword">false</span>, <a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a2021d04562bc3b47a305c57dff840c2e">GPU_ALWAYS</a>, 0x00);</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">int</span> i;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 6; i ++)</div>
-<div class="line"> GPU_SetDummyTexEnv(i);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameEnd(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Finish rendering</span></div>
-<div class="line"> <a name="a31"></a><a class="code" href="gpu-old_8h.html#a0c6bf377d3b218402cca69bb16778fd5">GPU_FinishDrawing</a>();</div>
-<div class="line"> <a name="a32"></a><a class="code" href="gpu_8h.html#a418b5471dc141d47267cbc9b8facc4a3">GPUCMD_Finalize</a>();</div>
-<div class="line"> <a name="a33"></a><a class="code" href="gpu_8h.html#a7a806155f4e52af7775737d45d9342d5">GPUCMD_FlushAndRun</a>();</div>
-<div class="line"> <a name="a34"></a><a class="code" href="gspgpu_8h.html#aba84a82e0137f5dc7a5c9d0ece41d9b7">gspWaitForP3D</a>(); <span class="comment">// Wait for the rendering to complete</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Transfer the GPU output to the framebuffer</span></div>
-<div class="line"> <a name="a35"></a><a class="code" href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a>(</div>
-<div class="line"> colorBuf, <a name="a36"></a><a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(240, 400),</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a name="a37"></a><a class="code" href="gfx_8h.html#a332447352568e250a75397a1b2e452db">gfxGetFramebuffer</a>(<a name="a38"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a39"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, NULL, NULL), <a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(240, 400),</div>
-<div class="line"> DISPLAY_TRANSFER_FLAGS);</div>
-<div class="line"> <a name="a40"></a><a class="code" href="gspgpu_8h.html#a2f2aca81b76a88b6ebb121ec54f76b7e">gspWaitForPPF</a>(); <span class="comment">// Wait for the transfer to complete</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Reset the command buffer</span></div>
-<div class="line"> <a name="a41"></a><a class="code" href="gpu_8h.html#a42142a7ec0fd6ac9941d454f7e18415a">GPUCMD_SetBufferOffset</a>(0);</div>
-<div class="line">};</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> GPU_SetDummyTexEnv(<span class="keywordtype">int</span> <span class="keywordtype">id</span>)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a42"></a><a class="code" href="gpu-old_8h.html#a7b61022c85fa068574fd6b61d55f9530">GPU_SetTexEnv</a>(<span class="keywordtype">id</span>,</div>
-<div class="line"> <a name="a43"></a><a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a name="a44"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a1b960db2c45d309c5e4d9c899d051936">GPU_PREVIOUS</a>, 0, 0),</div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a1b960db2c45d309c5e4d9c899d051936">GPU_PREVIOUS</a>, 0, 0),</div>
-<div class="line"> <a name="a45"></a><a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0),</div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0),</div>
-<div class="line"> <a name="a46"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>,</div>
-<div class="line"> <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>,</div>
-<div class="line"> 0xFFFFFFFF);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/simple_tri/source/3dmath.h </p><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * Bare-bones simplistic 3D math library</span></div>
-<div class="line"><span class="comment"> * This library is common to all libctru GPU examples</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#pragma once</span></div>
-<div class="line"><span class="preprocessor">#include <string.h></span></div>
-<div class="line"><span class="preprocessor">#include <stdbool.h></span></div>
-<div class="line"><span class="preprocessor">#include <math.h></span></div>
-<div class="line"></div>
-<div class="line"><span class="keyword">typedef</span> <span class="keyword">union </span>{ <span class="keyword">struct </span>{ <span class="keywordtype">float</span> w, z, y, x; }; <span class="keywordtype">float</span> c[4]; } vector_4f;</div>
-<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ vector_4f r[4]; } matrix_4x4;</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> v4f_dp4(<span class="keyword">const</span> vector_4f* a, <span class="keyword">const</span> vector_4f* b)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordflow">return</span> a->x*b->x + a->y*b->y + a->z*b->z + a->w*b->w;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> v4f_mod4(<span class="keyword">const</span> vector_4f* a)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordflow">return</span> sqrtf(v4f_dp4(a,a));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> v4f_norm4(vector_4f* vec)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">float</span> m = v4f_mod4(vec);</div>
-<div class="line"> <span class="keywordflow">if</span> (m == 0.0) <span class="keywordflow">return</span>;</div>
-<div class="line"> vec->x /= m;</div>
-<div class="line"> vec->y /= m;</div>
-<div class="line"> vec->z /= m;</div>
-<div class="line"> vec->w /= m;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> m4x4_zeros(matrix_4x4* out)</div>
-<div class="line">{</div>
-<div class="line"> memset(out, 0, <span class="keyword">sizeof</span>(*out));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> m4x4_copy(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* in)</div>
-<div class="line">{</div>
-<div class="line"> memcpy(out, in, <span class="keyword">sizeof</span>(*out));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_identity(matrix_4x4* out);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_multiply(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* a, <span class="keyword">const</span> matrix_4x4* b);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_translate(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_scale(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_x(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_y(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_z(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// Special versions of the projection matrices that take the 3DS' screen orientation into account</span></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_ortho_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_persp_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> fovy, <span class="keywordtype">float</span> aspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);</div>
-</div><!-- fragment --><p> graphics/gpu/simple_tri/source/3dmath.c </p><div class="fragment"><div class="line"><span class="preprocessor">#include "3dmath.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_identity(matrix_4x4* out)</div>
-<div class="line">{</div>
-<div class="line"> m4x4_zeros(out);</div>
-<div class="line"> out->r[0].x = out->r[1].y = out->r[2].z = out->r[3].w = 1.0f;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_multiply(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* a, <span class="keyword">const</span> matrix_4x4* b)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">int</span> i, j;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 4; i ++)</div>
-<div class="line"> <span class="keywordflow">for</span> (j = 0; j < 4; j ++)</div>
-<div class="line"> out->r[j].c[i] = a->r[j].x*b->r[0].c[i] + a->r[j].y*b->r[1].c[i] + a->r[j].z*b->r[2].c[i] + a->r[j].w*b->r[3].c[i];</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_translate(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 tm, om;</div>
-<div class="line"></div>
-<div class="line"> m4x4_identity(&tm);</div>
-<div class="line"> tm.r[0].w = x;</div>
-<div class="line"> tm.r[1].w = y;</div>
-<div class="line"> tm.r[2].w = z;</div>
-<div class="line"></div>
-<div class="line"> m4x4_multiply(&om, mtx, &tm);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_scale(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">int</span> i;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 4; i ++)</div>
-<div class="line"> {</div>
-<div class="line"> mtx->r[i].x *= x;</div>
-<div class="line"> mtx->r[i].y *= y;</div>
-<div class="line"> mtx->r[i].z *= z;</div>
-<div class="line"> }</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_x(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = 1.0f;</div>
-<div class="line"> rm.r[1].y = cosAngle;</div>
-<div class="line"> rm.r[1].z = sinAngle;</div>
-<div class="line"> rm.r[2].y = -sinAngle;</div>
-<div class="line"> rm.r[2].z = cosAngle;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_y(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = cosAngle;</div>
-<div class="line"> rm.r[0].z = sinAngle;</div>
-<div class="line"> rm.r[1].y = 1.0f;</div>
-<div class="line"> rm.r[2].x = -sinAngle;</div>
-<div class="line"> rm.r[2].z = cosAngle;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_z(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = cosAngle;</div>
-<div class="line"> rm.r[0].y = sinAngle;</div>
-<div class="line"> rm.r[1].x = -sinAngle;</div>
-<div class="line"> rm.r[1].y = cosAngle;</div>
-<div class="line"> rm.r[2].z = 1.0f;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_ortho_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 mp;</div>
-<div class="line"> m4x4_zeros(&mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Build standard orthogonal projection matrix</span></div>
-<div class="line"> mp.r[0].x = 2.0f / (right - left);</div>
-<div class="line"> mp.r[0].w = (left + right) / (left - right);</div>
-<div class="line"> mp.r[1].y = 2.0f / (top - bottom);</div>
-<div class="line"> mp.r[1].w = (bottom + top) / (bottom - top);</div>
-<div class="line"> mp.r[2].z = 2.0f / (near - far);</div>
-<div class="line"> mp.r[2].w = (far + near) / (far - near);</div>
-<div class="line"> mp.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix depth range to [-1, 0]</span></div>
-<div class="line"> matrix_4x4 mp2, mp3;</div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[2].z = 0.5;</div>
-<div class="line"> mp2.r[2].w = -0.5;</div>
-<div class="line"> m4x4_multiply(&mp3, &mp2, &mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix the 3DS screens' orientation by swapping the X and Y axis</span></div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[0].x = 0.0;</div>
-<div class="line"> mp2.r[0].y = 1.0;</div>
-<div class="line"> mp2.r[1].x = -1.0; <span class="comment">// flipped</span></div>
-<div class="line"> mp2.r[1].y = 0.0;</div>
-<div class="line"> m4x4_multiply(mtx, &mp2, &mp3);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_persp_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> fovx, <span class="keywordtype">float</span> invaspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Notes:</span></div>
-<div class="line"> <span class="comment">// We are passed "fovy" and the "aspect ratio". However, the 3DS screens are sideways,</span></div>
-<div class="line"> <span class="comment">// and so are these parameters -- in fact, they are actually the fovx and the inverse</span></div>
-<div class="line"> <span class="comment">// of the aspect ratio. Therefore the formula for the perspective projection matrix</span></div>
-<div class="line"> <span class="comment">// had to be modified to be expressed in these terms instead.</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Notes:</span></div>
-<div class="line"> <span class="comment">// fovx = 2 atan(tan(fovy/2)*w/h)</span></div>
-<div class="line"> <span class="comment">// fovy = 2 atan(tan(fovx/2)*h/w)</span></div>
-<div class="line"> <span class="comment">// invaspect = h/w</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// a0,0 = h / (w*tan(fovy/2)) =</span></div>
-<div class="line"> <span class="comment">// = h / (w*tan(2 atan(tan(fovx/2)*h/w) / 2)) =</span></div>
-<div class="line"> <span class="comment">// = h / (w*tan( atan(tan(fovx/2)*h/w) )) =</span></div>
-<div class="line"> <span class="comment">// = h / (w * tan(fovx/2)*h/w) =</span></div>
-<div class="line"> <span class="comment">// = 1 / tan(fovx/2)</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// a1,1 = 1 / tan(fovy/2) = (...) = w / (h*tan(fovx/2))</span></div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> fovx_tan = tanf(fovx / 2);</div>
-<div class="line"> matrix_4x4 mp;</div>
-<div class="line"> m4x4_zeros(&mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Build standard perspective projection matrix</span></div>
-<div class="line"> mp.r[0].x = 1.0f / fovx_tan;</div>
-<div class="line"> mp.r[1].y = 1.0f / (fovx_tan*invaspect);</div>
-<div class="line"> mp.r[2].z = (near + far) / (near - far);</div>
-<div class="line"> mp.r[2].w = (2 * near * far) / (near - far);</div>
-<div class="line"> mp.r[3].z = -1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix depth range to [-1, 0]</span></div>
-<div class="line"> matrix_4x4 mp2;</div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[2].z = 0.5;</div>
-<div class="line"> mp2.r[2].w = -0.5;</div>
-<div class="line"> m4x4_multiply(mtx, &mp2, &mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Rotate the matrix one quarter of a turn CCW in order to fix the 3DS screens' orientation</span></div>
-<div class="line"> m4x4_rotate_z(mtx, M_PI / 2, <span class="keyword">true</span>);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/simple_tri/source/vshader.pica </p><div class="fragment"><div class="line">; Example PICA200 vertex shader</div>
-<div class="line"></div>
-<div class="line">; Uniforms</div>
-<div class="line">.fvec projection[4]</div>
-<div class="line"></div>
-<div class="line">; Constants</div>
-<div class="line">.constf myconst(0.0, 1.0, -1.0, -0.5)</div>
-<div class="line">.alias zeros myconst.xxxx ; Vector full of zeros</div>
-<div class="line">.alias ones myconst.yyyy ; Vector full of ones</div>
-<div class="line"></div>
-<div class="line">; Outputs</div>
-<div class="line">.out outpos position</div>
-<div class="line">.out outclr color</div>
-<div class="line"></div>
-<div class="line">; Inputs (defined as aliases for convenience)</div>
-<div class="line">.alias inpos v0</div>
-<div class="line"></div>
-<div class="line">.proc main</div>
-<div class="line"> ; Force the w component of inpos to be 1.0</div>
-<div class="line"> mov r0.xyz, inpos</div>
-<div class="line"> mov r0.w, ones</div>
-<div class="line"></div>
-<div class="line"> ; outpos = projectionMatrix * inpos</div>
-<div class="line"> dp4 outpos.x, projection[0], r0</div>
-<div class="line"> dp4 outpos.y, projection[1], r0</div>
-<div class="line"> dp4 outpos.z, projection[2], r0</div>
-<div class="line"> dp4 outpos.w, projection[3], r0</div>
-<div class="line"></div>
-<div class="line"> ; outclr = solid white color</div>
-<div class="line"> mov outclr, ones</div>
-<div class="line"></div>
-<div class="line"> ; We're finished</div>
-<div class="line"> end</div>
-<div class="line">.end</div>
-</div><!-- fragment --><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * ~~ Simple libctru GPU triangle example ~~</span></div>
-<div class="line"><span class="comment"> * This example demonstrates the basics of using the PICA200 in a 3DS homebrew</span></div>
-<div class="line"><span class="comment"> * application in order to render a basic scene consisting of a white solid triangle.</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#include "<a class="code" href="gpu_8h.html">gpu.h</a>"</span></div>
-<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
-<div class="line"></div>
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ <span class="keywordtype">float</span> x, y, z; } vertex;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keyword">const</span> vertex vertex_list[] =</div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))</span></div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <a name="_a47"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
-<div class="line"><span class="keyword">static</span> <a name="_a48"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a0"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_projection;</div>
-<div class="line"><span class="keyword">static</span> matrix_4x4 projection;</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx projection;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span>* vbo_data;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneInit(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
-<div class="line"> <span class="comment">// Load the vertex shader and create a shader program</span></div>
-<div class="line"> vshader_dvlb = <a name="a49"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
-<div class="line"> <a name="a50"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
-<div class="line"> <a name="a51"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a52"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> <span class="comment">// Load the vertex shader, create a shader program and bind it</span></div>
+<div class="line"> vshader_dvlb = <a name="a2"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
+<div class="line"> <a name="a3"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
+<div class="line"> <a name="a4"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a5"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> C3D_BindProgram(&program);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Get the location of the uniforms</span></div>
+<div class="line"> uLoc_projection = <a name="a6"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a7"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
<div class="line"></div>
-<div class="line"> <span class="comment">// Get the location of the projection matrix uniform</span></div>
-<div class="line"> uLoc_projection = <a name="a53"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a54"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"> <span class="comment">// Configure attributes for use with the vertex shader</span></div>
+<div class="line"> C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();</div>
+<div class="line"> AttrInfo_Init(attrInfo);</div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 0, <a name="a8"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v0=position</span></div>
+<div class="line"> AttrInfo_AddFixed(attrInfo, 1); <span class="comment">// v1=color</span></div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Set the fixed attribute (color) to solid white</span></div>
+<div class="line"> C3D_FixedAttribSet(1, 1.0, 1.0, 1.0, 1.0);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Compute the projection matrix</span></div>
-<div class="line"> m4x4_ortho_tilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);</div>
+<div class="line"> Mtx_OrthoTilt(&projection, 0.0, 400.0, 0.0, 240.0, 0.0, 1.0);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Create the VBO (vertex buffer object)</span></div>
-<div class="line"> vbo_data = <a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
+<div class="line"> vbo_data = <a name="a9"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
<div class="line"> memcpy(vbo_data, vertex_list, <span class="keyword">sizeof</span>(vertex_list));</div>
-<div class="line">}</div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Bind the shader program</span></div>
-<div class="line"> <a name="a55"></a><a class="code" href="shaderProgram_8h.html#a29749780857245eb8860fe1bda3bcc97">shaderProgramUse</a>(&program);</div>
+<div class="line"> <span class="comment">// Configure buffers</span></div>
+<div class="line"> C3D_BufInfo* bufInfo = C3D_GetBufInfo();</div>
+<div class="line"> BufInfo_Init(bufInfo);</div>
+<div class="line"> BufInfo_Add(bufInfo, vbo_data, <span class="keyword">sizeof</span>(vertex), 1, 0x0);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Configure the first fragment shading substage to just pass through the vertex color</span></div>
<div class="line"> <span class="comment">// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight</span></div>
-<div class="line"> <a class="code" href="gpu-old_8h.html#a7b61022c85fa068574fd6b61d55f9530">GPU_SetTexEnv</a>(0,</div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a name="a56"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>), <span class="comment">// RGB channels</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>), <span class="comment">// Alpha</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0), <span class="comment">// RGB</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0), <span class="comment">// Alpha</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>, <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>, <span class="comment">// RGB, Alpha</span></div>
-<div class="line"> 0xFFFFFFFF);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure the "attribute buffers" (that is, the vertex input buffers)</span></div>
-<div class="line"> <a name="a57"></a><a class="code" href="gpu-old_8h.html#ac81475073183a797d1e723770f5cf6b4">GPU_SetAttributeBuffers</a>(</div>
-<div class="line"> 1, <span class="comment">// Number of inputs per vertex</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>)vbo_data), <span class="comment">// Location of the VBO</span></div>
-<div class="line"> <a name="a58"></a><a class="code" href="enums_8h.html#aaa7337c142b909e470bbf1ce3c8e9e03">GPU_ATTRIBFMT</a>(0, 3, <a name="a59"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>), <span class="comment">// Format of the inputs (in this case the only input is a 3-element float vector)</span></div>
-<div class="line"> 0xFFE, <span class="comment">// Unused attribute mask, in our case bit 0 is cleared since it is used</span></div>
-<div class="line"> 0x0, <span class="comment">// Attribute permutations (here it is the identity)</span></div>
-<div class="line"> 1, <span class="comment">// Number of buffers</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>[]) { 0x0 }, <span class="comment">// Buffer offsets (placeholders)</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a>[]) { 0x0 }, <span class="comment">// Attribute permutations for each buffer (identity again)</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>[]) { 1 }); <span class="comment">// Number of attributes for each buffer</span></div>
+<div class="line"> C3D_TexEnv* env = C3D_GetTexEnv(0);</div>
+<div class="line"> C3D_TexEnvSrc(env, C3D_Both, <a name="a10"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, 0, 0);</div>
+<div class="line"> C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);</div>
+<div class="line"> C3D_TexEnvFunc(env, C3D_Both, <a name="a11"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>);</div>
+<div class="line">}</div>
<div class="line"></div>
-<div class="line"> <span class="comment">// Upload the projection matrix</span></div>
-<div class="line"> GPU_SetFloatUniformMatrix(<a name="a60"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
+<div class="line"> <span class="comment">// Update the uniforms</span></div>
+<div class="line"> C3D_FVUnifMtx4x4(<a name="a12"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Draw the VBO</span></div>
-<div class="line"> <a name="a61"></a><a class="code" href="gpu-old_8h.html#a4aecce954e20dee2e37e2e774361e9dd">GPU_DrawArray</a>(<a name="a62"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>, 0, vertex_list_count);</div>
+<div class="line"> C3D_DrawArrays(<a name="a13"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>, 0, vertex_list_count);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneExit(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Free the VBO</span></div>
-<div class="line"> <a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
+<div class="line"> <a name="a14"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Free the shader program</span></div>
-<div class="line"> <a name="a63"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
-<div class="line"> <a name="a64"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
+<div class="line"> <a name="a15"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
+<div class="line"> <a name="a16"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main()</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Initialize graphics</span></div>
-<div class="line"> <a name="a65"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
-<div class="line"> gpuInit();</div>
+<div class="line"> <a name="a17"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
+<div class="line"> C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the render target</span></div>
+<div class="line"> C3D_RenderTarget* target = C3D_RenderTargetCreate(240, 400, <a name="a18"></a><a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a name="a19"></a><a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTargetSetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetOutput(target, <a name="a20"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a21"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, DISPLAY_TRANSFER_FLAGS);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Initialize the scene</span></div>
<div class="line"> sceneInit();</div>
-<div class="line"> gpuClearBuffers(CLEAR_COLOR);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Main loop</span></div>
-<div class="line"> <span class="keywordflow">while</span> (<a name="a66"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
+<div class="line"> <span class="keywordflow">while</span> (<a name="a22"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
<div class="line"> {</div>
-<div class="line"> <a name="a67"></a><a class="code" href="gspgpu_8h.html#abf0a992835649b5fe90e95d8a58b8c45">gspWaitForVBlank</a>(); <span class="comment">// Synchronize with the start of VBlank</span></div>
-<div class="line"> <a name="a68"></a><a class="code" href="gfx_8h.html#a3306df28835a647734cf8e299f041527">gfxSwapBuffersGpu</a>(); <span class="comment">// Swap the framebuffers so that the frame that we rendered last frame is now visible</span></div>
-<div class="line"> <a name="a69"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>(); <span class="comment">// Read the user input</span></div>
+<div class="line"> <a name="a23"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Respond to user input</span></div>
-<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a70"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
-<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a71"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
+<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a24"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
+<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a25"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
<div class="line"> <span class="keywordflow">break</span>; <span class="comment">// break in order to return to hbmenu</span></div>
<div class="line"></div>
<div class="line"> <span class="comment">// Render the scene</span></div>
-<div class="line"> gpuFrameBegin();</div>
-<div class="line"> sceneRender();</div>
-<div class="line"> gpuFrameEnd();</div>
-<div class="line"> gpuClearBuffers(CLEAR_COLOR);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Flush the framebuffers out of the data cache (not necessary with pure GPU rendering)</span></div>
-<div class="line"> <span class="comment">//gfxFlushBuffers();</span></div>
+<div class="line"> C3D_FrameBegin(C3D_FRAME_SYNCDRAW);</div>
+<div class="line"> C3D_FrameDrawOn(target);</div>
+<div class="line"> sceneRender();</div>
+<div class="line"> C3D_FrameEnd(0);</div>
<div class="line"> }</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Deinitialize the scene</span></div>
<div class="line"> sceneExit();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Deinitialize graphics</span></div>
-<div class="line"> gpuExit();</div>
-<div class="line"> <a name="a72"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
+<div class="line"> C3D_Fini();</div>
+<div class="line"> <a name="a26"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
</div><!-- fragment --> </div><!-- contents -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="title">graphics/gpu/textured_cube/source/main.c</div> </div>
</div><!--header-->
<div class="contents">
-<p>graphics/gpu/textured_cube/source/gpu.h </p><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * Bare-bones simplistic GPU wrapper</span></div>
-<div class="line"><span class="comment"> * This library is common to all libctru GPU examples</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#pragma once</span></div>
+<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
+<div class="line"><span class="preprocessor">#include <citro3d.h></span></div>
<div class="line"><span class="preprocessor">#include <string.h></span></div>
-<div class="line"><span class="preprocessor">#include <<a class="code" href="3ds_8h.html">3ds.h</a>></span></div>
-<div class="line"><span class="preprocessor">#include "3dmath.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuInit(<span class="keywordtype">void</span>);</div>
-<div class="line"><span class="keywordtype">void</span> gpuExit(<span class="keywordtype">void</span>);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuClearBuffers(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> clearColor);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameBegin(<span class="keywordtype">void</span>);</div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameEnd(<span class="keywordtype">void</span>);</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// Configures the specified fixed-function fragment shading substage to be a no-operation</span></div>
-<div class="line"><span class="keywordtype">void</span> GPU_SetDummyTexEnv(<span class="keywordtype">int</span> <span class="keywordtype">id</span>);</div>
+<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
+<div class="line"><span class="preprocessor">#include "kitten_bin.h"</span></div>
<div class="line"></div>
-<div class="line"><span class="comment">// Uploads an uniform matrix</span></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> GPU_SetFloatUniformMatrix(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5">GPU_SHADER_TYPE</a> type, <span class="keywordtype">int</span> location, matrix_4x4* matrix)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a0"></a><a class="code" href="gpu-old_8h.html#af18a38db985563a54813c2ebf86d6509">GPU_SetFloatUniform</a>(type, location, (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)matrix, 4);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/textured_cube/source/gpu.c </p><div class="fragment"><div class="line"><span class="preprocessor">#include "<a class="code" href="gpu_8h.html">gpu.h</a>"</span></div>
+<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define DISPLAY_TRANSFER_FLAGS \</span></div>
<div class="line"><span class="preprocessor"> (GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \</span></div>
<div class="line"><span class="preprocessor"> GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_OUT_FORMAT(GX_TRANSFER_FMT_RGB8) | \</span></div>
<div class="line"><span class="preprocessor"> GX_TRANSFER_SCALING(GX_TRANSFER_SCALE_NO))</span></div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *colorBuf, *depthBuf;</div>
-<div class="line"><span class="keyword">static</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *cmdBuf;</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuInit(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> colorBuf = <a name="a1"></a><a class="code" href="vram_8h.html#a00b84b8d38c127d8af9a89b9b7e2a5a4">vramAlloc</a>(400*240*4);</div>
-<div class="line"> depthBuf = <a class="code" href="vram_8h.html#a00b84b8d38c127d8af9a89b9b7e2a5a4">vramAlloc</a>(400*240*4);</div>
-<div class="line"> cmdBuf = <a name="a2"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(0x40000*4);</div>
-<div class="line"></div>
-<div class="line"> <a name="a3"></a><a class="code" href="gpu-old_8h.html#a921bb00def7171c1936fa50c6e464fba">GPU_Init</a>(NULL);</div>
-<div class="line"> <a name="a4"></a><a class="code" href="gpu-old_8h.html#a896e2be6136bb62909be966cc74eeb4d">GPU_Reset</a>(NULL, cmdBuf, 0x40000);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuExit(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a5"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(cmdBuf);</div>
-<div class="line"> <a name="a6"></a><a class="code" href="vram_8h.html#a867318cde93cdd997588d6dcbfc584e1">vramFree</a>(depthBuf);</div>
-<div class="line"> <a class="code" href="vram_8h.html#a867318cde93cdd997588d6dcbfc584e1">vramFree</a>(colorBuf);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuClearBuffers(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> clearColor)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a7"></a><a class="code" href="gx_8h.html#aa6e39b328383930b64eaa230bc9bc6a0">GX_MemoryFill</a>(</div>
-<div class="line"> colorBuf, clearColor, &colorBuf[240*400], <a name="a8"></a><a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> | <a name="a9"></a><a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a>,</div>
-<div class="line"> depthBuf, 0, &depthBuf[240*400], <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> | <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a>);</div>
-<div class="line"> <a name="a10"></a><a class="code" href="gspgpu_8h.html#a704e891a5d988f4964c24dc2b8bac787">gspWaitForPSC0</a>(); <span class="comment">// Wait for the fill to complete</span></div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameBegin(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Configure the viewport and the depth linear conversion function</span></div>
-<div class="line"> <a name="a11"></a><a class="code" href="gpu-old_8h.html#aba80c2d6e88cb75263de89a2d059e230">GPU_SetViewport</a>(</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a name="a12"></a><a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(depthBuf),</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(colorBuf),</div>
-<div class="line"> 0, 0, 240, 400); <span class="comment">// The top screen is physically 240x400 pixels</span></div>
-<div class="line"> <a name="a13"></a><a class="code" href="gpu-old_8h.html#a8b8de4eb721e55913ad0641c64fbaa75">GPU_DepthMap</a>(-1.0f, 0.0f); <span class="comment">// calculate the depth value from the Z coordinate in the following way: -1.0*z + 0.0</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure some boilerplate</span></div>
-<div class="line"> <a name="a14"></a><a class="code" href="gpu-old_8h.html#a717ac338a87549c36a9d70f5c1d7a077">GPU_SetFaceCulling</a>(<a name="a15"></a><a class="code" href="enums_8h.html#aded31eec5d2f72ea5c6141f24d8a0174a5f4f59f8f711f0bcfa9ca8b87f169ee0">GPU_CULL_BACK_CCW</a>);</div>
-<div class="line"> <a name="a16"></a><a class="code" href="gpu-old_8h.html#abc687b8c34463fd1ceacd64dab6c078e">GPU_SetStencilTest</a>(<span class="keyword">false</span>, <a name="a17"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a2021d04562bc3b47a305c57dff840c2e">GPU_ALWAYS</a>, 0x00, 0xFF, 0x00);</div>
-<div class="line"> <a name="a18"></a><a class="code" href="gpu-old_8h.html#aa2512e6c918e4ce998899d589a20dc2b">GPU_SetStencilOp</a>(<a name="a19"></a><a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>, <a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>, <a class="code" href="enums_8h.html#ab7737bd79ec87b48dd2815e54a0f78c1a2ef8af6e032c0cd8613259aef01f0477">GPU_STENCIL_KEEP</a>);</div>
-<div class="line"> <a name="a20"></a><a class="code" href="gpu-old_8h.html#a2ead0a88519b4197e13c6ce8e138d6c7">GPU_SetBlendingColor</a>(0,0,0,0);</div>
-<div class="line"> <a name="a21"></a><a class="code" href="gpu-old_8h.html#a8c32fb10ed5457b2e3a9273db61187d3">GPU_SetDepthTestAndWriteMask</a>(<span class="keyword">true</span>, <a name="a22"></a><a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a939d397eee5556dccc012bddfd0dd46a">GPU_GREATER</a>, <a name="a23"></a><a class="code" href="enums_8h.html#a7fffcfca8e93491a90d7b54cce719cd3ae6311b606a2db6df1e7358ad79e297a0">GPU_WRITE_ALL</a>);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// This is unknown</span></div>
-<div class="line"> <a name="a24"></a><a class="code" href="gpu_8h.html#a9042ca3f0e361abe2a2ede7206376cb5">GPUCMD_AddMaskedWrite</a>(GPUREG_0062, 0x1, 0);</div>
-<div class="line"> <a name="a25"></a><a class="code" href="gpu_8h.html#a1251c8456a0f92b49eecbe2c21f0a9a0">GPUCMD_AddWrite</a>(GPUREG_0118, 0);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure alpha blending and test</span></div>
-<div class="line"> <a name="a26"></a><a class="code" href="gpu-old_8h.html#ac9bf249df1e7a27a56a4e57c81d19e1c">GPU_SetAlphaBlending</a>(<a name="a27"></a><a class="code" href="enums_8h.html#ade416bc8de7b235e270c76f371d3cfb5a39318f81ae768d8a6119e7965a11bd50">GPU_BLEND_ADD</a>, <a class="code" href="enums_8h.html#ade416bc8de7b235e270c76f371d3cfb5a39318f81ae768d8a6119e7965a11bd50">GPU_BLEND_ADD</a>, <a name="a28"></a><a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1af2ec416dc4e7e8562e61d5f7963e8a36">GPU_SRC_ALPHA</a>, <a name="a29"></a><a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1a7bf978d71679e5507689e4570d3d85b2">GPU_ONE_MINUS_SRC_ALPHA</a>, <a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1af2ec416dc4e7e8562e61d5f7963e8a36">GPU_SRC_ALPHA</a>, <a class="code" href="enums_8h.html#a2a140d854f0e7c97cec2b38f4a226fe1a7bf978d71679e5507689e4570d3d85b2">GPU_ONE_MINUS_SRC_ALPHA</a>);</div>
-<div class="line"> <a name="a30"></a><a class="code" href="gpu-old_8h.html#aec1714fa8c2684020ab10a4da8e784e0">GPU_SetAlphaTest</a>(<span class="keyword">false</span>, <a class="code" href="enums_8h.html#ad964a2dd9f856d413d01dc81d5712618a2021d04562bc3b47a305c57dff840c2e">GPU_ALWAYS</a>, 0x00);</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">int</span> i;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 6; i ++)</div>
-<div class="line"> GPU_SetDummyTexEnv(i);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> gpuFrameEnd(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Finish rendering</span></div>
-<div class="line"> <a name="a31"></a><a class="code" href="gpu-old_8h.html#a0c6bf377d3b218402cca69bb16778fd5">GPU_FinishDrawing</a>();</div>
-<div class="line"> <a name="a32"></a><a class="code" href="gpu_8h.html#a418b5471dc141d47267cbc9b8facc4a3">GPUCMD_Finalize</a>();</div>
-<div class="line"> <a name="a33"></a><a class="code" href="gpu_8h.html#a7a806155f4e52af7775737d45d9342d5">GPUCMD_FlushAndRun</a>();</div>
-<div class="line"> <a name="a34"></a><a class="code" href="gspgpu_8h.html#aba84a82e0137f5dc7a5c9d0ece41d9b7">gspWaitForP3D</a>(); <span class="comment">// Wait for the rendering to complete</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Transfer the GPU output to the framebuffer</span></div>
-<div class="line"> <a name="a35"></a><a class="code" href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a>(</div>
-<div class="line"> colorBuf, <a name="a36"></a><a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(240, 400),</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a name="a37"></a><a class="code" href="gfx_8h.html#a332447352568e250a75397a1b2e452db">gfxGetFramebuffer</a>(<a name="a38"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a39"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, NULL, NULL), <a class="code" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(240, 400),</div>
-<div class="line"> DISPLAY_TRANSFER_FLAGS);</div>
-<div class="line"> <a name="a40"></a><a class="code" href="gspgpu_8h.html#a2f2aca81b76a88b6ebb121ec54f76b7e">gspWaitForPPF</a>(); <span class="comment">// Wait for the transfer to complete</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Reset the command buffer</span></div>
-<div class="line"> <a name="a41"></a><a class="code" href="gpu_8h.html#a42142a7ec0fd6ac9941d454f7e18415a">GPUCMD_SetBufferOffset</a>(0);</div>
-<div class="line">};</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> GPU_SetDummyTexEnv(<span class="keywordtype">int</span> <span class="keywordtype">id</span>)</div>
-<div class="line">{</div>
-<div class="line"> <a name="a42"></a><a class="code" href="gpu-old_8h.html#a7b61022c85fa068574fd6b61d55f9530">GPU_SetTexEnv</a>(<span class="keywordtype">id</span>,</div>
-<div class="line"> <a name="a43"></a><a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a name="a44"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a1b960db2c45d309c5e4d9c899d051936">GPU_PREVIOUS</a>, 0, 0),</div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a1b960db2c45d309c5e4d9c899d051936">GPU_PREVIOUS</a>, 0, 0),</div>
-<div class="line"> <a name="a45"></a><a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0),</div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0),</div>
-<div class="line"> <a name="a46"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>,</div>
-<div class="line"> <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0a1c5123d469abc61be2501b97b512cc11">GPU_REPLACE</a>,</div>
-<div class="line"> 0xFFFFFFFF);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/textured_cube/source/3dmath.h </p><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * Bare-bones simplistic 3D math library</span></div>
-<div class="line"><span class="comment"> * This library is common to all libctru GPU examples</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#pragma once</span></div>
-<div class="line"><span class="preprocessor">#include <string.h></span></div>
-<div class="line"><span class="preprocessor">#include <stdbool.h></span></div>
-<div class="line"><span class="preprocessor">#include <math.h></span></div>
-<div class="line"></div>
-<div class="line"><span class="keyword">typedef</span> <span class="keyword">union </span>{ <span class="keyword">struct </span>{ <span class="keywordtype">float</span> w, z, y, x; }; <span class="keywordtype">float</span> c[4]; } vector_4f;</div>
-<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ vector_4f r[4]; } matrix_4x4;</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> v4f_dp4(<span class="keyword">const</span> vector_4f* a, <span class="keyword">const</span> vector_4f* b)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordflow">return</span> a->x*b->x + a->y*b->y + a->z*b->z + a->w*b->w;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">float</span> v4f_mod4(<span class="keyword">const</span> vector_4f* a)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordflow">return</span> sqrtf(v4f_dp4(a,a));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> v4f_norm4(vector_4f* vec)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">float</span> m = v4f_mod4(vec);</div>
-<div class="line"> <span class="keywordflow">if</span> (m == 0.0) <span class="keywordflow">return</span>;</div>
-<div class="line"> vec->x /= m;</div>
-<div class="line"> vec->y /= m;</div>
-<div class="line"> vec->z /= m;</div>
-<div class="line"> vec->w /= m;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> m4x4_zeros(matrix_4x4* out)</div>
-<div class="line">{</div>
-<div class="line"> memset(out, 0, <span class="keyword">sizeof</span>(*out));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> m4x4_copy(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* in)</div>
-<div class="line">{</div>
-<div class="line"> memcpy(out, in, <span class="keyword">sizeof</span>(*out));</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_identity(matrix_4x4* out);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_multiply(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* a, <span class="keyword">const</span> matrix_4x4* b);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_translate(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_scale(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_x(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_y(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_z(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide);</div>
-<div class="line"></div>
-<div class="line"><span class="comment">// Special versions of the projection matrices that take the 3DS' screen orientation into account</span></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_ortho_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);</div>
-<div class="line"><span class="keywordtype">void</span> m4x4_persp_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> fovy, <span class="keywordtype">float</span> aspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);</div>
-</div><!-- fragment --><p> graphics/gpu/textured_cube/source/3dmath.c </p><div class="fragment"><div class="line"><span class="preprocessor">#include "3dmath.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_identity(matrix_4x4* out)</div>
-<div class="line">{</div>
-<div class="line"> m4x4_zeros(out);</div>
-<div class="line"> out->r[0].x = out->r[1].y = out->r[2].z = out->r[3].w = 1.0f;</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_multiply(matrix_4x4* out, <span class="keyword">const</span> matrix_4x4* a, <span class="keyword">const</span> matrix_4x4* b)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">int</span> i, j;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 4; i ++)</div>
-<div class="line"> <span class="keywordflow">for</span> (j = 0; j < 4; j ++)</div>
-<div class="line"> out->r[j].c[i] = a->r[j].x*b->r[0].c[i] + a->r[j].y*b->r[1].c[i] + a->r[j].z*b->r[2].c[i] + a->r[j].w*b->r[3].c[i];</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_translate(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 tm, om;</div>
-<div class="line"></div>
-<div class="line"> m4x4_identity(&tm);</div>
-<div class="line"> tm.r[0].w = x;</div>
-<div class="line"> tm.r[1].w = y;</div>
-<div class="line"> tm.r[2].w = z;</div>
-<div class="line"></div>
-<div class="line"> m4x4_multiply(&om, mtx, &tm);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_scale(matrix_4x4* mtx, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z)</div>
-<div class="line">{</div>
-<div class="line"> <span class="keywordtype">int</span> i;</div>
-<div class="line"> <span class="keywordflow">for</span> (i = 0; i < 4; i ++)</div>
-<div class="line"> {</div>
-<div class="line"> mtx->r[i].x *= x;</div>
-<div class="line"> mtx->r[i].y *= y;</div>
-<div class="line"> mtx->r[i].z *= z;</div>
-<div class="line"> }</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_x(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = 1.0f;</div>
-<div class="line"> rm.r[1].y = cosAngle;</div>
-<div class="line"> rm.r[1].z = sinAngle;</div>
-<div class="line"> rm.r[2].y = -sinAngle;</div>
-<div class="line"> rm.r[2].z = cosAngle;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_y(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = cosAngle;</div>
-<div class="line"> rm.r[0].z = sinAngle;</div>
-<div class="line"> rm.r[1].y = 1.0f;</div>
-<div class="line"> rm.r[2].x = -sinAngle;</div>
-<div class="line"> rm.r[2].z = cosAngle;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_rotate_z(matrix_4x4* mtx, <span class="keywordtype">float</span> angle, <span class="keywordtype">bool</span> bRightSide)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 rm, om;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> cosAngle = cosf(angle);</div>
-<div class="line"> <span class="keywordtype">float</span> sinAngle = sinf(angle);</div>
-<div class="line"></div>
-<div class="line"> m4x4_zeros(&rm);</div>
-<div class="line"> rm.r[0].x = cosAngle;</div>
-<div class="line"> rm.r[0].y = sinAngle;</div>
-<div class="line"> rm.r[1].x = -sinAngle;</div>
-<div class="line"> rm.r[1].y = cosAngle;</div>
-<div class="line"> rm.r[2].z = 1.0f;</div>
-<div class="line"> rm.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="keywordflow">if</span> (bRightSide) m4x4_multiply(&om, mtx, &rm);</div>
-<div class="line"> <span class="keywordflow">else</span> m4x4_multiply(&om, &rm, mtx);</div>
-<div class="line"> m4x4_copy(mtx, &om);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_ortho_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far)</div>
-<div class="line">{</div>
-<div class="line"> matrix_4x4 mp;</div>
-<div class="line"> m4x4_zeros(&mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Build standard orthogonal projection matrix</span></div>
-<div class="line"> mp.r[0].x = 2.0f / (right - left);</div>
-<div class="line"> mp.r[0].w = (left + right) / (left - right);</div>
-<div class="line"> mp.r[1].y = 2.0f / (top - bottom);</div>
-<div class="line"> mp.r[1].w = (bottom + top) / (bottom - top);</div>
-<div class="line"> mp.r[2].z = 2.0f / (near - far);</div>
-<div class="line"> mp.r[2].w = (far + near) / (far - near);</div>
-<div class="line"> mp.r[3].w = 1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix depth range to [-1, 0]</span></div>
-<div class="line"> matrix_4x4 mp2, mp3;</div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[2].z = 0.5;</div>
-<div class="line"> mp2.r[2].w = -0.5;</div>
-<div class="line"> m4x4_multiply(&mp3, &mp2, &mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix the 3DS screens' orientation by swapping the X and Y axis</span></div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[0].x = 0.0;</div>
-<div class="line"> mp2.r[0].y = 1.0;</div>
-<div class="line"> mp2.r[1].x = -1.0; <span class="comment">// flipped</span></div>
-<div class="line"> mp2.r[1].y = 0.0;</div>
-<div class="line"> m4x4_multiply(mtx, &mp2, &mp3);</div>
-<div class="line">}</div>
-<div class="line"></div>
-<div class="line"><span class="keywordtype">void</span> m4x4_persp_tilt(matrix_4x4* mtx, <span class="keywordtype">float</span> fovx, <span class="keywordtype">float</span> invaspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Notes:</span></div>
-<div class="line"> <span class="comment">// We are passed "fovy" and the "aspect ratio". However, the 3DS screens are sideways,</span></div>
-<div class="line"> <span class="comment">// and so are these parameters -- in fact, they are actually the fovx and the inverse</span></div>
-<div class="line"> <span class="comment">// of the aspect ratio. Therefore the formula for the perspective projection matrix</span></div>
-<div class="line"> <span class="comment">// had to be modified to be expressed in these terms instead.</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Notes:</span></div>
-<div class="line"> <span class="comment">// fovx = 2 atan(tan(fovy/2)*w/h)</span></div>
-<div class="line"> <span class="comment">// fovy = 2 atan(tan(fovx/2)*h/w)</span></div>
-<div class="line"> <span class="comment">// invaspect = h/w</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// a0,0 = h / (w*tan(fovy/2)) =</span></div>
-<div class="line"> <span class="comment">// = h / (w*tan(2 atan(tan(fovx/2)*h/w) / 2)) =</span></div>
-<div class="line"> <span class="comment">// = h / (w*tan( atan(tan(fovx/2)*h/w) )) =</span></div>
-<div class="line"> <span class="comment">// = h / (w * tan(fovx/2)*h/w) =</span></div>
-<div class="line"> <span class="comment">// = 1 / tan(fovx/2)</span></div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// a1,1 = 1 / tan(fovy/2) = (...) = w / (h*tan(fovx/2))</span></div>
-<div class="line"></div>
-<div class="line"> <span class="keywordtype">float</span> fovx_tan = tanf(fovx / 2);</div>
-<div class="line"> matrix_4x4 mp;</div>
-<div class="line"> m4x4_zeros(&mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Build standard perspective projection matrix</span></div>
-<div class="line"> mp.r[0].x = 1.0f / fovx_tan;</div>
-<div class="line"> mp.r[1].y = 1.0f / (fovx_tan*invaspect);</div>
-<div class="line"> mp.r[2].z = (near + far) / (near - far);</div>
-<div class="line"> mp.r[2].w = (2 * near * far) / (near - far);</div>
-<div class="line"> mp.r[3].z = -1.0f;</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Fix depth range to [-1, 0]</span></div>
-<div class="line"> matrix_4x4 mp2;</div>
-<div class="line"> m4x4_identity(&mp2);</div>
-<div class="line"> mp2.r[2].z = 0.5;</div>
-<div class="line"> mp2.r[2].w = -0.5;</div>
-<div class="line"> m4x4_multiply(mtx, &mp2, &mp);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Rotate the matrix one quarter of a turn CCW in order to fix the 3DS screens' orientation</span></div>
-<div class="line"> m4x4_rotate_z(mtx, M_PI / 2, <span class="keyword">true</span>);</div>
-<div class="line">}</div>
-</div><!-- fragment --><p> graphics/gpu/textured_cube/source/vshader.pica </p><div class="fragment"><div class="line">; Example PICA200 vertex shader</div>
-<div class="line"></div>
-<div class="line">; Uniforms</div>
-<div class="line">.fvec projection[4], modelView[4]</div>
-<div class="line">.fvec lightVec, lightHalfVec, lightClr, material[4]</div>
-<div class="line">.alias mat_amb material[0]</div>
-<div class="line">.alias mat_dif material[1]</div>
-<div class="line">.alias mat_spe material[2]</div>
-<div class="line">.alias mat_emi material[3]</div>
-<div class="line"></div>
-<div class="line">; Constants</div>
-<div class="line">.constf myconst(0.0, 1.0, -1.0, -0.5)</div>
-<div class="line">.alias zeros myconst.xxxx ; Vector full of zeros</div>
-<div class="line">.alias ones myconst.yyyy ; Vector full of ones</div>
-<div class="line"></div>
-<div class="line">; Outputs</div>
-<div class="line">.out outpos position</div>
-<div class="line">.out outtc0 texcoord0</div>
-<div class="line">.out outclr color</div>
-<div class="line"></div>
-<div class="line">; Inputs (defined as aliases for convenience)</div>
-<div class="line">.alias inpos v0</div>
-<div class="line">.alias intex v1</div>
-<div class="line">.alias innrm v2</div>
-<div class="line"></div>
-<div class="line">.proc main</div>
-<div class="line"> ; Force the w component of inpos to be 1.0</div>
-<div class="line"> mov r0.xyz, inpos</div>
-<div class="line"> mov r0.w, ones</div>
-<div class="line"></div>
-<div class="line"> ; r1 = modelView * inpos</div>
-<div class="line"> dp4 r1.x, modelView[0], r0</div>
-<div class="line"> dp4 r1.y, modelView[1], r0</div>
-<div class="line"> dp4 r1.z, modelView[2], r0</div>
-<div class="line"> dp4 r1.w, modelView[3], r0</div>
-<div class="line"></div>
-<div class="line"> ; outpos = projection * r1</div>
-<div class="line"> dp4 outpos.x, projection[0], r1</div>
-<div class="line"> dp4 outpos.y, projection[1], r1</div>
-<div class="line"> dp4 outpos.z, projection[2], r1</div>
-<div class="line"> dp4 outpos.w, projection[3], r1</div>
-<div class="line"></div>
-<div class="line"> ; outtex = intex</div>
-<div class="line"> mov outtc0, intex</div>
-<div class="line"></div>
-<div class="line"> ; Transform the normal vector with the modelView matrix</div>
-<div class="line"> ; r1 = normalize(modelView * innrm)</div>
-<div class="line"> mov r0.xyz, innrm</div>
-<div class="line"> mov r0.w, zeros</div>
-<div class="line"> dp4 r1.x, modelView[0], r0</div>
-<div class="line"> dp4 r1.y, modelView[1], r0</div>
-<div class="line"> dp4 r1.z, modelView[2], r0</div>
-<div class="line"> mov r1.w, zeros</div>
-<div class="line"> dp3 r2, r1, r1 ; r2 = x^2+y^2+z^2 for each component</div>
-<div class="line"> rsq r2, r2 ; r2 = 1/sqrt(r2) ''</div>
-<div class="line"> mul r1, r2, r1 ; r1 = r1*r2</div>
-<div class="line"></div>
-<div class="line"> ; Calculate the diffuse level (r0.x) and the shininess level (r0.y)</div>
-<div class="line"> ; r0.x = max(0, -(lightVec * r1))</div>
-<div class="line"> ; r0.y = max(0, (-lightHalfVec[i]) * r1) ^ 2</div>
-<div class="line"> dp3 r0.x, lightVec, r1</div>
-<div class="line"> add r0.x, zeros, -r0</div>
-<div class="line"> dp3 r0.y, -lightHalfVec, r1</div>
-<div class="line"> max r0, zeros, r0</div>
-<div class="line"> mul r0.y, r0, r0</div>
-<div class="line"></div>
-<div class="line"> ; Accumulate the vertex color in r1, initializing it to the emission color</div>
-<div class="line"> mov r1, mat_emi</div>
-<div class="line"></div>
-<div class="line"> ; r1 += specularColor * lightClr * shininessLevel</div>
-<div class="line"> mul r2, lightClr, r0.yyyy</div>
-<div class="line"> mul r2, mat_spe, r2</div>
-<div class="line"> add r1, r2, r1</div>
-<div class="line"></div>
-<div class="line"> ; r1 += diffuseColor * lightClr * diffuseLevel</div>
-<div class="line"> mul r2, lightClr, r0.xxxx</div>
-<div class="line"> mul r2, mat_dif, r2</div>
-<div class="line"> add r1, r2, r1</div>
-<div class="line"></div>
-<div class="line"> ; r1 += ambientColor * lightClr</div>
-<div class="line"> mov r2, lightClr</div>
-<div class="line"> mul r2, mat_amb, r2</div>
-<div class="line"> add r1, r2, r1</div>
-<div class="line"> </div>
-<div class="line"> ; outclr = clamp r1 to [0,1]</div>
-<div class="line"> min outclr, ones, r1</div>
-<div class="line"></div>
-<div class="line"> ; We're finished</div>
-<div class="line"> end</div>
-<div class="line">.end</div>
-</div><!-- fragment --><div class="fragment"><div class="line"><span class="comment">/*</span></div>
-<div class="line"><span class="comment"> * ~~ Simple libctru GPU textured cube example ~~</span></div>
-<div class="line"><span class="comment"> * This example demonstrates the basics of using the PICA200 in a 3DS homebrew</span></div>
-<div class="line"><span class="comment"> * application in order to render a basic scene consisting of a rotating</span></div>
-<div class="line"><span class="comment"> * textured cube which is also shaded using a simple shading algorithm.</span></div>
-<div class="line"><span class="comment"> * The shading algorithm is explained in the vertex shader source code.</span></div>
-<div class="line"><span class="comment"> */</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#include "<a class="code" href="gpu_8h.html">gpu.h</a>"</span></div>
-<div class="line"><span class="preprocessor">#include "vshader_shbin.h"</span></div>
-<div class="line"><span class="preprocessor">#include "kitten_bin.h"</span></div>
-<div class="line"></div>
-<div class="line"><span class="preprocessor">#define CLEAR_COLOR 0x68B0D8FF</span></div>
-<div class="line"></div>
<div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{ <span class="keywordtype">float</span> position[3]; <span class="keywordtype">float</span> texcoord[2]; <span class="keywordtype">float</span> normal[3]; } vertex;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keyword">const</span> vertex vertex_list[] =</div>
<div class="line"></div>
<div class="line"><span class="preprocessor">#define vertex_list_count (sizeof(vertex_list)/sizeof(vertex_list[0]))</span></div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <a name="_a47"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
-<div class="line"><span class="keyword">static</span> <a name="_a48"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a0"></a><a class="code" href="structDVLB__s.html">DVLB_s</a>* vshader_dvlb;</div>
+<div class="line"><span class="keyword">static</span> <a name="_a1"></a><a class="code" href="structshaderProgram__s.html">shaderProgram_s</a> program;</div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_projection, uLoc_modelView;</div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">int</span> uLoc_lightVec, uLoc_lightHalfVec, uLoc_lightClr, uLoc_material;</div>
-<div class="line"><span class="keyword">static</span> matrix_4x4 projection;</div>
-<div class="line"><span class="keyword">static</span> matrix_4x4 material =</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx projection;</div>
+<div class="line"><span class="keyword">static</span> C3D_Mtx material =</div>
<div class="line">{</div>
<div class="line"> {</div>
<div class="line"> { { 0.0f, 0.2f, 0.2f, 0.2f } }, <span class="comment">// Ambient</span></div>
<div class="line">};</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span>* vbo_data;</div>
-<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span>* tex_data;</div>
+<div class="line"><span class="keyword">static</span> C3D_Tex kitten_tex;</div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">float</span> angleX = 0.0, angleY = 0.0;</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneInit(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
-<div class="line"> <span class="comment">// Load the vertex shader and create a shader program</span></div>
-<div class="line"> vshader_dvlb = <a name="a49"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
-<div class="line"> <a name="a50"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
-<div class="line"> <a name="a51"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a52"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> <span class="comment">// Load the vertex shader, create a shader program and bind it</span></div>
+<div class="line"> vshader_dvlb = <a name="a2"></a><a class="code" href="shbin_8h.html#afd50bf30516e9e3acffd3b62cd061cb0">DVLB_ParseFile</a>((<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)vshader_shbin, vshader_shbin_size);</div>
+<div class="line"> <a name="a3"></a><a class="code" href="shaderProgram_8h.html#a4907e3572c644efe27c130a8c37bddf0">shaderProgramInit</a>(&program);</div>
+<div class="line"> <a name="a4"></a><a class="code" href="shaderProgram_8h.html#a3ca416a2e6bc3c2aaae1895435e8452c">shaderProgramSetVsh</a>(&program, &vshader_dvlb-><a name="a5"></a><a class="code" href="structDVLB__s.html#a1934abe9c4109579746d57c5b20b5834">DVLE</a>[0]);</div>
+<div class="line"> C3D_BindProgram(&program);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Get the location of the uniforms</span></div>
-<div class="line"> uLoc_projection = <a name="a53"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a54"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
+<div class="line"> uLoc_projection = <a name="a6"></a><a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a name="a7"></a><a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"projection"</span>);</div>
<div class="line"> uLoc_modelView = <a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"modelView"</span>);</div>
<div class="line"> uLoc_lightVec = <a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"lightVec"</span>);</div>
<div class="line"> uLoc_lightHalfVec = <a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"lightHalfVec"</span>);</div>
<div class="line"> uLoc_lightClr = <a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"lightClr"</span>);</div>
<div class="line"> uLoc_material = <a class="code" href="shaderProgram_8h.html#afc98c295e7c2634daad923f159ddf604">shaderInstanceGetUniformLocation</a>(program.<a class="code" href="structshaderProgram__s.html#a607da7b7218dbc29d5bd811ecfe7f8f0">vertexShader</a>, <span class="stringliteral">"material"</span>);</div>
<div class="line"></div>
+<div class="line"> <span class="comment">// Configure attributes for use with the vertex shader</span></div>
+<div class="line"> C3D_AttrInfo* attrInfo = C3D_GetAttrInfo();</div>
+<div class="line"> AttrInfo_Init(attrInfo);</div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 0, <a name="a8"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v0=position</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 1, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 2); <span class="comment">// v1=texcoord</span></div>
+<div class="line"> AttrInfo_AddLoader(attrInfo, 2, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>, 3); <span class="comment">// v2=normal</span></div>
+<div class="line"></div>
<div class="line"> <span class="comment">// Compute the projection matrix</span></div>
-<div class="line"> m4x4_persp_tilt(&projection, 80.0f*M_PI/180.0f, 400.0f/240.0f, 0.01f, 1000.0f);</div>
+<div class="line"> Mtx_PerspTilt(&projection, 80.0f*M_PI/180.0f, 400.0f/240.0f, 0.01f, 1000.0f);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Create the VBO (vertex buffer object)</span></div>
-<div class="line"> vbo_data = <a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
+<div class="line"> vbo_data = <a name="a9"></a><a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(<span class="keyword">sizeof</span>(vertex_list));</div>
<div class="line"> memcpy(vbo_data, vertex_list, <span class="keyword">sizeof</span>(vertex_list));</div>
<div class="line"></div>
-<div class="line"> <span class="comment">// Load the texture</span></div>
-<div class="line"> tex_data = <a class="code" href="linear_8h.html#a73a6bd0b398a08f695e16e07267a7424">linearAlloc</a>(kitten_bin_size);</div>
-<div class="line"> memcpy(tex_data, kitten_bin, kitten_bin_size);</div>
-<div class="line">}</div>
+<div class="line"> <span class="comment">// Configure buffers</span></div>
+<div class="line"> C3D_BufInfo* bufInfo = C3D_GetBufInfo();</div>
+<div class="line"> BufInfo_Init(bufInfo);</div>
+<div class="line"> BufInfo_Add(bufInfo, vbo_data, <span class="keyword">sizeof</span>(vertex), 3, 0x210);</div>
<div class="line"></div>
-<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
-<div class="line">{</div>
-<div class="line"> <span class="comment">// Bind the shader program</span></div>
-<div class="line"> <a name="a55"></a><a class="code" href="shaderProgram_8h.html#a29749780857245eb8860fe1bda3bcc97">shaderProgramUse</a>(&program);</div>
+<div class="line"> <span class="comment">// Load the texture and bind it to the first texture unit</span></div>
+<div class="line"> C3D_TexInit(&kitten_tex, 64, 64, <a name="a10"></a><a class="code" href="enums_8h.html#a63bb2f7fceb0f356549f0be235a0f99faff51f393b902dd545e863c24679bccd2">GPU_RGBA8</a>);</div>
+<div class="line"> C3D_TexUpload(&kitten_tex, kitten_bin);</div>
+<div class="line"> C3D_TexSetFilter(&kitten_tex, <a name="a11"></a><a class="code" href="enums_8h.html#a2c76780b7ff5d323daf30ea310fbc8c4a18f85af3bd3785e9463dae917436cb6f">GPU_LINEAR</a>, <a name="a12"></a><a class="code" href="enums_8h.html#a2c76780b7ff5d323daf30ea310fbc8c4a916807475bc96900be35e0b8035845d0">GPU_NEAREST</a>);</div>
+<div class="line"> C3D_TexBind(0, &kitten_tex);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Configure the first fragment shading substage to blend the texture color with</span></div>
<div class="line"> <span class="comment">// the vertex color (calculated by the vertex shader using a lighting algorithm)</span></div>
<div class="line"> <span class="comment">// See https://www.opengl.org/sdk/docs/man2/xhtml/glTexEnv.xml for more insight</span></div>
-<div class="line"> <a class="code" href="gpu-old_8h.html#a7b61022c85fa068574fd6b61d55f9530">GPU_SetTexEnv</a>(0,</div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a name="a56"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0ab6436a8677bfb947fd2c085d95eb2cd0">GPU_TEXTURE0</a>, <a name="a57"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>), <span class="comment">// RGB channels</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#abb62754733c37a8490767fd8e004b903">GPU_TEVSOURCES</a>(<a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0ab6436a8677bfb947fd2c085d95eb2cd0">GPU_TEXTURE0</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, <a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>), <span class="comment">// Alpha</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0), <span class="comment">// RGB</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#a4f2c9311619707a1276457d94b06a983">GPU_TEVOPERANDS</a>(0, 0, 0), <span class="comment">// Alpha</span></div>
-<div class="line"> <a name="a58"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0af18e74afecfedc6e3feca318e1d7dd21">GPU_MODULATE</a>, <a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0af18e74afecfedc6e3feca318e1d7dd21">GPU_MODULATE</a>, <span class="comment">// RGB, Alpha</span></div>
-<div class="line"> 0xFFFFFFFF);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure the first texture unit</span></div>
-<div class="line"> <a name="a59"></a><a class="code" href="gpu-old_8h.html#a8b0ca32b6fca3bb66b7c8f5c4c658d91">GPU_SetTextureEnable</a>(<a name="a60"></a><a class="code" href="enums_8h.html#a541188a9d9f32ee0f5c74b2742908cf5a0227367076a47599a3ebf7656ebfb95a">GPU_TEXUNIT0</a>);</div>
-<div class="line"> <a name="a61"></a><a class="code" href="gpu-old_8h.html#a4145b7accf26fb3295c6e950a6ec52c5">GPU_SetTexture</a>(</div>
-<div class="line"> <a class="code" href="enums_8h.html#a541188a9d9f32ee0f5c74b2742908cf5a0227367076a47599a3ebf7656ebfb95a">GPU_TEXUNIT0</a>,</div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(tex_data),</div>
-<div class="line"> 64, <span class="comment">// Width</span></div>
-<div class="line"> 64, <span class="comment">// Height</span></div>
-<div class="line"> <a name="a62"></a><a class="code" href="enums_8h.html#a136a68611d2edcd5e875cbe6b2ffc14a">GPU_TEXTURE_MAG_FILTER</a>(<a name="a63"></a><a class="code" href="enums_8h.html#a2c76780b7ff5d323daf30ea310fbc8c4a18f85af3bd3785e9463dae917436cb6f">GPU_LINEAR</a>) | <a name="a64"></a><a class="code" href="enums_8h.html#a2df8e344fd803deccbe004a547fbb941">GPU_TEXTURE_WRAP_S</a>(<a name="a65"></a><a class="code" href="enums_8h.html#aca018b509809231470e5e3c3e907261da408167b5e23912ad858dc058be1f18b3">GPU_REPEAT</a>) | <a name="a66"></a><a class="code" href="enums_8h.html#aba218d9758b440166624d22b2c735fa2">GPU_TEXTURE_WRAP_T</a>(<a class="code" href="enums_8h.html#aca018b509809231470e5e3c3e907261da408167b5e23912ad858dc058be1f18b3">GPU_REPEAT</a>), <span class="comment">// Flags</span></div>
-<div class="line"> <a name="a67"></a><a class="code" href="enums_8h.html#a63bb2f7fceb0f356549f0be235a0f99faff51f393b902dd545e863c24679bccd2">GPU_RGBA8</a> <span class="comment">// Pixel format</span></div>
-<div class="line"> );</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Configure the "attribute buffers" (that is, the vertex input buffers)</span></div>
-<div class="line"> <a name="a68"></a><a class="code" href="gpu-old_8h.html#ac81475073183a797d1e723770f5cf6b4">GPU_SetAttributeBuffers</a>(</div>
-<div class="line"> 3, <span class="comment">// Number of inputs per vertex</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)<a class="code" href="os_8h.html#ad5be83050dcdaf4ba7824a2afd420866">osConvertVirtToPhys</a>(vbo_data), <span class="comment">// Location of the VBO</span></div>
-<div class="line"> <a name="a69"></a><a class="code" href="enums_8h.html#aaa7337c142b909e470bbf1ce3c8e9e03">GPU_ATTRIBFMT</a>(0, 3, <a name="a70"></a><a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>) | <span class="comment">// Format of the inputs</span></div>
-<div class="line"> <a class="code" href="enums_8h.html#aaa7337c142b909e470bbf1ce3c8e9e03">GPU_ATTRIBFMT</a>(1, 2, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>) |</div>
-<div class="line"> <a class="code" href="enums_8h.html#aaa7337c142b909e470bbf1ce3c8e9e03">GPU_ATTRIBFMT</a>(2, 3, <a class="code" href="enums_8h.html#a3a62c2be4e88ff3de7c69f1b660d1634af3631e2c847a62946c82604c2faec246">GPU_FLOAT</a>),</div>
-<div class="line"> 0xFFC, <span class="comment">// Unused attribute mask, in our case bits 0~2 are cleared since they are used</span></div>
-<div class="line"> 0x210, <span class="comment">// Attribute permutations (here it is the identity, passing each attribute in order)</span></div>
-<div class="line"> 1, <span class="comment">// Number of buffers</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>[]) { 0x0 }, <span class="comment">// Buffer offsets (placeholders)</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a>[]) { 0x210 }, <span class="comment">// Attribute permutations for each buffer (identity again)</span></div>
-<div class="line"> (<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>[]) { 3 }); <span class="comment">// Number of attributes for each buffer</span></div>
+<div class="line"> C3D_TexEnv* env = C3D_GetTexEnv(0);</div>
+<div class="line"> C3D_TexEnvSrc(env, C3D_Both, <a name="a13"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0ab6436a8677bfb947fd2c085d95eb2cd0">GPU_TEXTURE0</a>, <a name="a14"></a><a class="code" href="enums_8h.html#a43f47361b7edcab3c6b7d064c09ae7d0a73b71da440440b42a6c282c39e566a0d">GPU_PRIMARY_COLOR</a>, 0);</div>
+<div class="line"> C3D_TexEnvOp(env, C3D_Both, 0, 0, 0);</div>
+<div class="line"> C3D_TexEnvFunc(env, C3D_Both, <a name="a15"></a><a class="code" href="enums_8h.html#a07c36c673c5ca75d946367821c8afdd0af18e74afecfedc6e3feca318e1d7dd21">GPU_MODULATE</a>);</div>
+<div class="line">}</div>
<div class="line"></div>
+<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneRender(<span class="keywordtype">void</span>)</div>
+<div class="line">{</div>
<div class="line"> <span class="comment">// Calculate the modelView matrix</span></div>
-<div class="line"> matrix_4x4 modelView;</div>
-<div class="line"> m4x4_identity(&modelView);</div>
-<div class="line"> m4x4_translate(&modelView, 0.0, 0.0, -2.0 + 0.5*sinf(angleX));</div>
-<div class="line"> m4x4_rotate_x(&modelView, angleX, <span class="keyword">true</span>);</div>
-<div class="line"> m4x4_rotate_y(&modelView, angleY, <span class="keyword">true</span>);</div>
+<div class="line"> C3D_Mtx modelView;</div>
+<div class="line"> Mtx_Identity(&modelView);</div>
+<div class="line"> Mtx_Translate(&modelView, 0.0, 0.0, -2.0 + 0.5*sinf(angleX));</div>
+<div class="line"> Mtx_RotateX(&modelView, angleX, <span class="keyword">true</span>);</div>
+<div class="line"> Mtx_RotateY(&modelView, angleY, <span class="keyword">true</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Rotate the cube each frame</span></div>
<div class="line"> angleX += M_PI / 180;</div>
<div class="line"> angleY += M_PI / 360;</div>
<div class="line"></div>
-<div class="line"> <span class="comment">// Upload the uniforms</span></div>
-<div class="line"> GPU_SetFloatUniformMatrix(<a name="a71"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
-<div class="line"> GPU_SetFloatUniformMatrix(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_modelView, &modelView);</div>
-<div class="line"> GPU_SetFloatUniformMatrix(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_material, &material);</div>
-<div class="line"> <a class="code" href="gpu-old_8h.html#af18a38db985563a54813c2ebf86d6509">GPU_SetFloatUniform</a>(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_lightVec, (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)(<span class="keywordtype">float</span>[]){0.0f, -1.0f, 0.0f, 0.0f}, 1);</div>
-<div class="line"> <a class="code" href="gpu-old_8h.html#af18a38db985563a54813c2ebf86d6509">GPU_SetFloatUniform</a>(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_lightHalfVec, (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)(<span class="keywordtype">float</span>[]){0.0f, -1.0f, 0.0f, 0.0f}, 1);</div>
-<div class="line"> <a class="code" href="gpu-old_8h.html#af18a38db985563a54813c2ebf86d6509">GPU_SetFloatUniform</a>(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_lightClr, (<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>*)(<span class="keywordtype">float</span>[]){1.0f, 1.0f, 1.0f, 1.0f}, 1);</div>
+<div class="line"> <span class="comment">// Update the uniforms</span></div>
+<div class="line"> C3D_FVUnifMtx4x4(<a name="a16"></a><a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_projection, &projection);</div>
+<div class="line"> C3D_FVUnifMtx4x4(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_modelView, &modelView);</div>
+<div class="line"> C3D_FVUnifMtx4x4(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_material, &material);</div>
+<div class="line"> C3D_FVUnifSet(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_lightVec, 0.0f, 0.0f, -1.0f, 0.0f);</div>
+<div class="line"> C3D_FVUnifSet(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_lightHalfVec, 0.0f, 0.0f, -1.0f, 0.0f);</div>
+<div class="line"> C3D_FVUnifSet(<a class="code" href="enums_8h.html#a178882ce0f114a22e19ff7f0ee842de5a6545b908fe67bb2d298e7468135ef71f">GPU_VERTEX_SHADER</a>, uLoc_lightClr, 1.0f, 1.0f, 1.0f, 1.0f);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Draw the VBO</span></div>
-<div class="line"> <a name="a72"></a><a class="code" href="gpu-old_8h.html#a4aecce954e20dee2e37e2e774361e9dd">GPU_DrawArray</a>(<a name="a73"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>, 0, vertex_list_count);</div>
+<div class="line"> C3D_DrawArrays(<a name="a17"></a><a class="code" href="enums_8h.html#a94bdee50fa003d70dd3888f347397806abee71ba286bcf6b5222049ac7beb2d8b">GPU_TRIANGLES</a>, 0, vertex_list_count);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> sceneExit(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Free the texture</span></div>
-<div class="line"> <a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(tex_data);</div>
+<div class="line"> C3D_TexDelete(&kitten_tex);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Free the VBO</span></div>
-<div class="line"> <a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
+<div class="line"> <a name="a18"></a><a class="code" href="linear_8h.html#aeb28d4069fd209e0067ac185fb9b83e2">linearFree</a>(vbo_data);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Free the shader program</span></div>
-<div class="line"> <a name="a74"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
-<div class="line"> <a name="a75"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
+<div class="line"> <a name="a19"></a><a class="code" href="shaderProgram_8h.html#a57cbd903975f5ccce6169159f89714d8">shaderProgramFree</a>(&program);</div>
+<div class="line"> <a name="a20"></a><a class="code" href="shbin_8h.html#a60c02d561312081aefb2096f2b005643">DVLB_Free</a>(vshader_dvlb);</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main()</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Initialize graphics</span></div>
-<div class="line"> <a name="a76"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
-<div class="line"> gpuInit();</div>
+<div class="line"> <a name="a21"></a><a class="code" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a>();</div>
+<div class="line"> C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);</div>
+<div class="line"></div>
+<div class="line"> <span class="comment">// Initialize the render target</span></div>
+<div class="line"> C3D_RenderTarget* target = C3D_RenderTargetCreate(240, 400, <a name="a22"></a><a class="code" href="enums_8h.html#a1bed7c7c90b43c261c07664aef35bf7aa17f2a0c3889f7e34d720d818a61030b4">GPU_RB_RGBA8</a>, <a name="a23"></a><a class="code" href="enums_8h.html#a9b40a4b2feaec1dc4a843a908f613a3eaaa31fb7049df6c69198111e309210720">GPU_RB_DEPTH24_STENCIL8</a>);</div>
+<div class="line"> C3D_RenderTargetSetClear(target, C3D_CLEAR_ALL, CLEAR_COLOR, 0);</div>
+<div class="line"> C3D_RenderTargetSetOutput(target, <a name="a24"></a><a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>, <a name="a25"></a><a class="code" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>, DISPLAY_TRANSFER_FLAGS);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Initialize the scene</span></div>
<div class="line"> sceneInit();</div>
-<div class="line"> gpuClearBuffers(CLEAR_COLOR);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Main loop</span></div>
-<div class="line"> <span class="keywordflow">while</span> (<a name="a77"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
+<div class="line"> <span class="keywordflow">while</span> (<a name="a26"></a><a class="code" href="apt_8h.html#a84808c36d9a8c389896ecf241c7f89cb">aptMainLoop</a>())</div>
<div class="line"> {</div>
-<div class="line"> <a name="a78"></a><a class="code" href="gspgpu_8h.html#abf0a992835649b5fe90e95d8a58b8c45">gspWaitForVBlank</a>(); <span class="comment">// Synchronize with the start of VBlank</span></div>
-<div class="line"> <a name="a79"></a><a class="code" href="gfx_8h.html#a3306df28835a647734cf8e299f041527">gfxSwapBuffersGpu</a>(); <span class="comment">// Swap the framebuffers so that the frame that we rendered last frame is now visible</span></div>
-<div class="line"> <a name="a80"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>(); <span class="comment">// Read the user input</span></div>
+<div class="line"> <a name="a27"></a><a class="code" href="hid_8h.html#abbbf0e1f3a79a75e459e19f85a66bee6">hidScanInput</a>();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Respond to user input</span></div>
-<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a81"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
-<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a82"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
+<div class="line"> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> kDown = <a name="a28"></a><a class="code" href="hid_8h.html#aa2cababf764bf0b4297dc2e2fffe2a76">hidKeysDown</a>();</div>
+<div class="line"> <span class="keywordflow">if</span> (kDown & <a name="a29"></a><a class="code" href="hid_8h.html#aaf8fd5f0e57d456151c951e0f3715fc4a616a1f5c4ed36080ca954453084aea3b">KEY_START</a>)</div>
<div class="line"> <span class="keywordflow">break</span>; <span class="comment">// break in order to return to hbmenu</span></div>
<div class="line"></div>
<div class="line"> <span class="comment">// Render the scene</span></div>
-<div class="line"> gpuFrameBegin();</div>
-<div class="line"> sceneRender();</div>
-<div class="line"> gpuFrameEnd();</div>
-<div class="line"> gpuClearBuffers(CLEAR_COLOR);</div>
-<div class="line"></div>
-<div class="line"> <span class="comment">// Flush the framebuffers out of the data cache (not necessary with pure GPU rendering)</span></div>
-<div class="line"> <span class="comment">//gfxFlushBuffers();</span></div>
+<div class="line"> C3D_FrameBegin(C3D_FRAME_SYNCDRAW);</div>
+<div class="line"> C3D_FrameDrawOn(target);</div>
+<div class="line"> sceneRender();</div>
+<div class="line"> C3D_FrameEnd(0);</div>
<div class="line"> }</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Deinitialize the scene</span></div>
<div class="line"> sceneExit();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Deinitialize graphics</span></div>
-<div class="line"> gpuExit();</div>
-<div class="line"> <a name="a83"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
+<div class="line"> C3D_Fini();</div>
+<div class="line"> <a name="a30"></a><a class="code" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a>();</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
</div><!-- fragment --> </div><!-- contents -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="gspgpu_8h.html#a1de71253d8f3e3ea0f504ab6cc621f98">gspExit</a> (void)</td></tr>
<tr class="memdesc:a1de71253d8f3e3ea0f504ab6cc621f98"><td class="mdescLeft"> </td><td class="mdescRight">Exits GSPGPU. <br /></td></tr>
<tr class="separator:a1de71253d8f3e3ea0f504ab6cc621f98"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a38080f47e69bd240156ca043c7946b29"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gspgpu_8h.html#a38080f47e69bd240156ca043c7946b29">gspSetEventCallback</a> (<a class="el" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> id, <a class="el" href="types_8h.html#a857e4e893f41191500e83c00058df64e">ThreadFunc</a> cb, void *data, bool oneShot)</td></tr>
+<tr class="memdesc:a38080f47e69bd240156ca043c7946b29"><td class="mdescLeft"> </td><td class="mdescRight">Configures a callback to run when a GSPGPU event occurs. <a href="#a38080f47e69bd240156ca043c7946b29">More...</a><br /></td></tr>
+<tr class="separator:a38080f47e69bd240156ca043c7946b29"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa8b40b9b5550a1ed61528c05b586fb6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="gspgpu_8h.html#aa8b40b9b5550a1ed61528c05b586fb6c">gspInitEventHandler</a> (<a class="el" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> gspEvent, <a class="el" href="types_8h.html#a1a2a3100a902c32a55d8b08915bce044">vu8</a> *gspSharedMem, <a class="el" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> gspThreadId)</td></tr>
<tr class="memdesc:aa8b40b9b5550a1ed61528c05b586fb6c"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the GSPGPU event handler. <a href="#aa8b40b9b5550a1ed61528c05b586fb6c">More...</a><br /></td></tr>
<tr class="separator:aa8b40b9b5550a1ed61528c05b586fb6c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a91a03ad378747bc554ff611742727958"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="gspgpu_8h.html#a91a03ad378747bc554ff611742727958">gspWaitForEvent</a> (<a class="el" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> id, bool nextEvent)</td></tr>
<tr class="memdesc:a91a03ad378747bc554ff611742727958"><td class="mdescLeft"> </td><td class="mdescRight">Waits for a GSPGPU event to occur. <a href="#a91a03ad378747bc554ff611742727958">More...</a><br /></td></tr>
<tr class="separator:a91a03ad378747bc554ff611742727958"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a7280943da0262bb75eacc779bf54be87"><td class="memItemLeft" align="right" valign="top"><a class="el" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="gspgpu_8h.html#a7280943da0262bb75eacc779bf54be87">gspWaitForAnyEvent</a> (void)</td></tr>
+<tr class="memdesc:a7280943da0262bb75eacc779bf54be87"><td class="mdescLeft"> </td><td class="mdescRight">Waits for any GSPGPU event to occur. <a href="#a7280943da0262bb75eacc779bf54be87">More...</a><br /></td></tr>
+<tr class="separator:a7280943da0262bb75eacc779bf54be87"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa4e931a0de3b33497503fc063127af0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="gspgpu_8h.html#aa4e931a0de3b33497503fc063127af0c">gspSubmitGxCommand</a> (<a class="el" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> *sharedGspCmdBuf, <a class="el" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> gxCommand[0x8])</td></tr>
<tr class="memdesc:aa4e931a0de3b33497503fc063127af0c"><td class="mdescLeft"> </td><td class="mdescRight">Submits a GX command. <a href="#aa4e931a0de3b33497503fc063127af0c">More...</a><br /></td></tr>
<tr class="separator:aa4e931a0de3b33497503fc063127af0c"><td class="memSeparator" colspan="2"> </td></tr>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="audio_2mic_2source_2main_8c-example.html#a24">audio/mic/source/main.c</a>, and <a class="el" href="mvd_2source_2main_8c-example.html#a5">mvd/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="audio_2mic_2source_2main_8c-example.html#a24">audio/mic/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a11">graphics/gpu/gpusprites/source/main.c</a>, and <a class="el" href="mvd_2source_2main_8c-example.html#a5">mvd/source/main.c</a>.</dd>
</dl>
</div>
</div>
</dd>
</dl>
+</div>
+</div>
+<a class="anchor" id="a38080f47e69bd240156ca043c7946b29"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void gspSetEventCallback </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> </td>
+ <td class="paramname"><em>id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="types_8h.html#a857e4e893f41191500e83c00058df64e">ThreadFunc</a> </td>
+ <td class="paramname"><em>cb</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">void * </td>
+ <td class="paramname"><em>data</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">bool </td>
+ <td class="paramname"><em>oneShot</em> </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Configures a callback to run when a GSPGPU event occurs. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">id</td><td>ID of the event. </td></tr>
+ <tr><td class="paramname">cb</td><td>Callback to run. </td></tr>
+ <tr><td class="paramname">data</td><td>Data to be passed to the callback. </td></tr>
+ <tr><td class="paramname">oneShot</td><td>When true, the callback is only executed once. When false, the callback is executed every time the event occurs. </td></tr>
+ </table>
+ </dd>
+</dl>
+
</div>
</div>
<a class="anchor" id="aa4e931a0de3b33497503fc063127af0c"></a>
</dd>
</dl>
+</div>
+</div>
+<a class="anchor" id="a7280943da0262bb75eacc779bf54be87"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> gspWaitForAnyEvent </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Waits for any GSPGPU event to occur. </p>
+<dl class="section return"><dt>Returns</dt><dd>The ID of the event that occurred.</dd></dl>
+<p>The function returns immediately if there are unprocessed events at the time of call. </p>
+
</div>
</div>
<a class="anchor" id="a91a03ad378747bc554ff611742727958"></a>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">id</td><td>ID of the event. </td></tr>
- <tr><td class="paramname">Whether</td><td>to discard the current event and wait for the next event. </td></tr>
+ <tr><td class="paramname">nextEvent</td><td>Whether to discard the current event and wait for the next event. </td></tr>
</table>
</dd>
</dl>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="gspgpu_8h.html#a1de71253d8f3e3ea0f504ab6cc621f98">gspExit</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"></span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"> * @brief Initializes the GSPGPU event handler.</span></div>
-<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"> * @param gspEvent Event handle to use.</span></div>
-<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * @param gspSharedMem GSP shared memory.</span></div>
-<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> * @param gspThreadId ID of the GSP thread.</span></div>
-<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa8b40b9b5550a1ed61528c05b586fb6c">gspInitEventHandler</a>(<a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> gspEvent, <a class="code" href="types_8h.html#a1a2a3100a902c32a55d8b08915bce044">vu8</a>* gspSharedMem, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> gspThreadId);</div>
-<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"></span></div>
-<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment">/// Exits the GSPGPU event handler.</span></div>
-<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="gspgpu_8h.html#a842bbd15e91a9d4e1aa8481106c67e07">gspExitEventHandler</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"></span></div>
-<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> * @brief Waits for a GSPGPU event to occur.</span></div>
-<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * @param id ID of the event.</span></div>
-<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> * @param Whether to discard the current event and wait for the next event.</span></div>
-<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">void</span> <a class="code" href="gspgpu_8h.html#a91a03ad378747bc554ff611742727958">gspWaitForEvent</a>(<a class="code" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> <span class="keywordtype">id</span>, <span class="keywordtype">bool</span> nextEvent);</div>
-<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"></span></div>
-<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment">/// Waits for PSC0</span></div>
-<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a704e891a5d988f4964c24dc2b8bac787"> 85</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForPSC0() gspWaitForEvent(GSPGPU_EVENT_PSC0, false)</span></div>
-<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"></span></div>
-<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment">/// Waits for PSC1</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a8a6e23746817c80d092cefd439d490f6"> 88</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForPSC1() gspWaitForEvent(GSPGPU_EVENT_PSC1, false)</span></div>
-<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"></span></div>
-<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment">/// Waits for VBlank.</span></div>
-<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#abf0a992835649b5fe90e95d8a58b8c45"> 91</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForVBlank() gspWaitForVBlank0()</span></div>
+<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"> * @brief Configures a callback to run when a GSPGPU event occurs.</span></div>
+<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"> * @param id ID of the event.</span></div>
+<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * @param cb Callback to run.</span></div>
+<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> * @param data Data to be passed to the callback.</span></div>
+<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> * @param oneShot When true, the callback is only executed once. When false, the callback is executed every time the event occurs.</span></div>
+<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">void</span> <a class="code" href="gspgpu_8h.html#a38080f47e69bd240156ca043c7946b29">gspSetEventCallback</a>(<a class="code" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> <span class="keywordtype">id</span>, <a class="code" href="types_8h.html#a857e4e893f41191500e83c00058df64e">ThreadFunc</a> cb, <span class="keywordtype">void</span>* data, <span class="keywordtype">bool</span> oneShot);</div>
+<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"></span></div>
+<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> * @brief Initializes the GSPGPU event handler.</span></div>
+<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> * @param gspEvent Event handle to use.</span></div>
+<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> * @param gspSharedMem GSP shared memory.</span></div>
+<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * @param gspThreadId ID of the GSP thread.</span></div>
+<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa8b40b9b5550a1ed61528c05b586fb6c">gspInitEventHandler</a>(<a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> gspEvent, <a class="code" href="types_8h.html#a1a2a3100a902c32a55d8b08915bce044">vu8</a>* gspSharedMem, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> gspThreadId);</div>
+<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"></span></div>
+<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment">/// Exits the GSPGPU event handler.</span></div>
+<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="gspgpu_8h.html#a842bbd15e91a9d4e1aa8481106c67e07">gspExitEventHandler</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"></span></div>
+<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * @brief Waits for a GSPGPU event to occur.</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * @param id ID of the event.</span></div>
+<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * @param nextEvent Whether to discard the current event and wait for the next event.</span></div>
+<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> <a class="code" href="gspgpu_8h.html#a91a03ad378747bc554ff611742727958">gspWaitForEvent</a>(<a class="code" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> <span class="keywordtype">id</span>, <span class="keywordtype">bool</span> nextEvent);</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"></span></div>
-<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment">/// Waits for VBlank0.</span></div>
-<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#ac999e7889bfe880d47ef787aa4ad36ff"> 94</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForVBlank0() gspWaitForEvent(GSPGPU_EVENT_VBlank0, true)</span></div>
-<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"></span></div>
-<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment">/// Waits for VBlank1.</span></div>
-<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a109b22fd311cb108387d59c298d5acef"> 97</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForVBlank1() gspWaitForEvent(GSPGPU_EVENT_VBlank1, true)</span></div>
-<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"></span></div>
-<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment">/// Waits for PPF.</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a2f2aca81b76a88b6ebb121ec54f76b7e"> 100</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForPPF() gspWaitForEvent(GSPGPU_EVENT_PPF, false)</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"></span></div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment">/// Waits for P3D.</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#aba84a82e0137f5dc7a5c9d0ece41d9b7"> 103</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForP3D() gspWaitForEvent(GSPGPU_EVENT_P3D, false)</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"></span></div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment">/// Waits for DMA.</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a95267f3508badebdcd0788cf262c99d8"> 106</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForDMA() gspWaitForEvent(GSPGPU_EVENT_DMA, false)</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"></span></div>
-<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> * @brief Submits a GX command.</span></div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> * @param sharedGspCmdBuf Command buffer to use.</span></div>
-<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * @param gxCommand GX command to execute.</span></div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa4e931a0de3b33497503fc063127af0c">gspSubmitGxCommand</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* sharedGspCmdBuf, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> gxCommand[0x8]);</div>
-<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"></span></div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> * @brief Acquires GPU rights.</span></div>
-<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> * @param flags Flags to acquire with.</span></div>
-<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a317950e5ea5dabed8569ae5683075fc6">GSPGPU_AcquireRight</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> flags);</div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"></span></div>
-<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment">/// Releases GPU rights.</span></div>
-<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa163710b32591debd191e2cbf04e5374">GSPGPU_ReleaseRight</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"></span></div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> * @brief Retrieves display capture info.</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> * @param captureinfo Pointer to output capture info to.</span></div>
-<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a6677e4b4467934a07320c556f4d103f2">GSPGPU_ImportDisplayCaptureInfo</a>(<a class="code" href="structGSPGPU__CaptureInfo.html">GSPGPU_CaptureInfo</a>*captureinfo);</div>
-<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment"></span></div>
-<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment">/// Sames the VRAM sys area.</span></div>
-<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a6217cefdce79c05f2ae4fdadfac817b0">GSPGPU_SaveVramSysArea</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment"></span></div>
-<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment">/// Restores the VRAM sys area.</span></div>
-<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a663f1bd4b15c96bf426ccbda06810fba">GSPGPU_RestoreVramSysArea</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"></span></div>
-<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment"> * @brief Sets whether to force the LCD to black.</span></div>
-<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment"> * @param flags Whether to force the LCD to black. (0 = no, non-zero = yes)</span></div>
-<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a0be2d830a9eccca7b59bf927b7c5e002">GSPGPU_SetLcdForceBlack</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> flags);</div>
-<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="comment"></span></div>
-<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment"> * @brief Updates a screen's framebuffer state.</span></div>
-<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment"> * @param screenid ID of the screen to update.</span></div>
-<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="comment"> * @param framebufinfo Framebuffer information to update with.</span></div>
-<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#ae010c996a4eb9bbd21d9e76d1ef14cbc">GSPGPU_SetBufferSwap</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> screenid, <a class="code" href="structGSPGPU__FramebufferInfo.html">GSPGPU_FramebufferInfo</a>*framebufinfo);</div>
-<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"></span></div>
-<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment"> * @brief Flushes memory from the data cache.</span></div>
-<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"> * @param adr Address to flush.</span></div>
-<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment"> * @param size Size of the memory to flush.</span></div>
-<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a24f1c78fad4e1108ddc56fb3674cdba2">GSPGPU_FlushDataCache</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* adr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> size);</div>
-<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"></span></div>
-<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="comment"> * @brief Invalidates memory in the data cache.</span></div>
-<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="comment"> * @param adr Address to invalidate.</span></div>
-<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment"> * @param size Size of the memory to invalidate.</span></div>
-<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#abfd8bb5bde8d3072a9041884d599665e">GSPGPU_InvalidateDataCache</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* adr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> size);</div>
-<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="comment"></span></div>
-<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <span class="comment"> * @brief Writes to GPU hardware registers.</span></div>
-<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="comment"> * @param regAddr Register address to write to.</span></div>
-<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="comment"> * @param data Data to write.</span></div>
-<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="comment"> * @param size Size of the data to write.</span></div>
-<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00169"></a><span class="lineno"> 169</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a682c120ccc45f5f6a8d65ef74886206a">GSPGPU_WriteHWRegs</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> regAddr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* data, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> size);</div>
-<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> <span class="comment"></span></div>
-<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="comment"> * @brief Writes to GPU hardware registers with a mask.</span></div>
-<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="comment"> * @param regAddr Register address to write to.</span></div>
-<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="comment"> * @param data Data to write.</span></div>
-<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="comment"> * @param datasize Size of the data to write.</span></div>
-<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="comment"> * @param maskdata Data of the mask.</span></div>
-<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="comment"> * @param masksize Size of the mask.</span></div>
-<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a250b3be40bc03360272d18830de6721e">GSPGPU_WriteHWRegsWithMask</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> regAddr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* data, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> datasize, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* maskdata, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> masksize);</div>
-<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="comment"></span></div>
-<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="comment"> * @brief Reads from GPU hardware registers.</span></div>
-<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment"> * @param regAddr Register address to read from.</span></div>
-<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="comment"> * @param data Buffer to read data to.</span></div>
-<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="comment"> * @param size Size of the buffer.</span></div>
-<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#ae554cb598da7d9be11dd4345902c43a5">GSPGPU_ReadHWRegs</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> regAddr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* data, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> size);</div>
-<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <span class="comment"></span></div>
-<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="comment"> * @brief Registers the interrupt relay queue.</span></div>
-<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="comment"> * @param eventHandle Handle of the GX command event.</span></div>
-<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="comment"> * @param flags Flags to register with.</span></div>
-<div class="line"><a name="l00193"></a><span class="lineno"> 193</span> <span class="comment"> * @param outMemHandle Pointer to output the shared memory handle to.</span></div>
-<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="comment"> * @param threadID Pointer to output the GSP thread ID to.</span></div>
+<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * @brief Waits for any GSPGPU event to occur.</span></div>
+<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * @return The ID of the event that occurred.</span></div>
+<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * The function returns immediately if there are unprocessed events at the time of call.</span></div>
+<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <a class="code" href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a> <a class="code" href="gspgpu_8h.html#a7280943da0262bb75eacc779bf54be87">gspWaitForAnyEvent</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"></span></div>
+<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment">/// Waits for PSC0</span></div>
+<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a704e891a5d988f4964c24dc2b8bac787"> 102</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForPSC0() gspWaitForEvent(GSPGPU_EVENT_PSC0, false)</span></div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"></span></div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment">/// Waits for PSC1</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a8a6e23746817c80d092cefd439d490f6"> 105</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForPSC1() gspWaitForEvent(GSPGPU_EVENT_PSC1, false)</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"></span></div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment">/// Waits for VBlank.</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#abf0a992835649b5fe90e95d8a58b8c45"> 108</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForVBlank() gspWaitForVBlank0()</span></div>
+<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"></span></div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment">/// Waits for VBlank0.</span></div>
+<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#ac999e7889bfe880d47ef787aa4ad36ff"> 111</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForVBlank0() gspWaitForEvent(GSPGPU_EVENT_VBlank0, true)</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"></span></div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment">/// Waits for VBlank1.</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a109b22fd311cb108387d59c298d5acef"> 114</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForVBlank1() gspWaitForEvent(GSPGPU_EVENT_VBlank1, true)</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"></span></div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment">/// Waits for PPF.</span></div>
+<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a2f2aca81b76a88b6ebb121ec54f76b7e"> 117</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForPPF() gspWaitForEvent(GSPGPU_EVENT_PPF, false)</span></div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"></span></div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment">/// Waits for P3D.</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#aba84a82e0137f5dc7a5c9d0ece41d9b7"> 120</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForP3D() gspWaitForEvent(GSPGPU_EVENT_P3D, false)</span></div>
+<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"></span></div>
+<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment">/// Waits for DMA.</span></div>
+<div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="gspgpu_8h.html#a95267f3508badebdcd0788cf262c99d8"> 123</a></span> <span class="comment"></span><span class="preprocessor">#define gspWaitForDMA() gspWaitForEvent(GSPGPU_EVENT_DMA, false)</span></div>
+<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"></span></div>
+<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> * @brief Submits a GX command.</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> * @param sharedGspCmdBuf Command buffer to use.</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"> * @param gxCommand GX command to execute.</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa4e931a0de3b33497503fc063127af0c">gspSubmitGxCommand</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* sharedGspCmdBuf, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> gxCommand[0x8]);</div>
+<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="comment"></span></div>
+<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment"> * @brief Acquires GPU rights.</span></div>
+<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="comment"> * @param flags Flags to acquire with.</span></div>
+<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00136"></a><span class="lineno"> 136</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a317950e5ea5dabed8569ae5683075fc6">GSPGPU_AcquireRight</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> flags);</div>
+<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> <span class="comment"></span></div>
+<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment">/// Releases GPU rights.</span></div>
+<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa163710b32591debd191e2cbf04e5374">GSPGPU_ReleaseRight</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> <span class="comment"></span></div>
+<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment"> * @brief Retrieves display capture info.</span></div>
+<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment"> * @param captureinfo Pointer to output capture info to.</span></div>
+<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a6677e4b4467934a07320c556f4d103f2">GSPGPU_ImportDisplayCaptureInfo</a>(<a class="code" href="structGSPGPU__CaptureInfo.html">GSPGPU_CaptureInfo</a>*captureinfo);</div>
+<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="comment"></span></div>
+<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> <span class="comment">/// Sames the VRAM sys area.</span></div>
+<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a6217cefdce79c05f2ae4fdadfac817b0">GSPGPU_SaveVramSysArea</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment"></span></div>
+<div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="comment">/// Restores the VRAM sys area.</span></div>
+<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a663f1bd4b15c96bf426ccbda06810fba">GSPGPU_RestoreVramSysArea</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> <span class="comment"></span></div>
+<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment"> * @brief Sets whether to force the LCD to black.</span></div>
+<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="comment"> * @param flags Whether to force the LCD to black. (0 = no, non-zero = yes)</span></div>
+<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a0be2d830a9eccca7b59bf927b7c5e002">GSPGPU_SetLcdForceBlack</a>(<a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> flags);</div>
+<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="comment"></span></div>
+<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="comment"> * @brief Updates a screen's framebuffer state.</span></div>
+<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="comment"> * @param screenid ID of the screen to update.</span></div>
+<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="comment"> * @param framebufinfo Framebuffer information to update with.</span></div>
+<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00164"></a><span class="lineno"> 164</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#ae010c996a4eb9bbd21d9e76d1ef14cbc">GSPGPU_SetBufferSwap</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> screenid, <a class="code" href="structGSPGPU__FramebufferInfo.html">GSPGPU_FramebufferInfo</a>*framebufinfo);</div>
+<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="comment"></span></div>
+<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="comment"> * @brief Flushes memory from the data cache.</span></div>
+<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> <span class="comment"> * @param adr Address to flush.</span></div>
+<div class="line"><a name="l00169"></a><span class="lineno"> 169</span> <span class="comment"> * @param size Size of the memory to flush.</span></div>
+<div class="line"><a name="l00170"></a><span class="lineno"> 170</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a24f1c78fad4e1108ddc56fb3674cdba2">GSPGPU_FlushDataCache</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* adr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> size);</div>
+<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="comment"></span></div>
+<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="comment"> * @brief Invalidates memory in the data cache.</span></div>
+<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> <span class="comment"> * @param adr Address to invalidate.</span></div>
+<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="comment"> * @param size Size of the memory to invalidate.</span></div>
+<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#abfd8bb5bde8d3072a9041884d599665e">GSPGPU_InvalidateDataCache</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* adr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> size);</div>
+<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="comment"></span></div>
+<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="comment"> * @brief Writes to GPU hardware registers.</span></div>
+<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="comment"> * @param regAddr Register address to write to.</span></div>
+<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> <span class="comment"> * @param data Data to write.</span></div>
+<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="comment"> * @param size Size of the data to write.</span></div>
+<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a682c120ccc45f5f6a8d65ef74886206a">GSPGPU_WriteHWRegs</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> regAddr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* data, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> size);</div>
+<div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <span class="comment"></span></div>
+<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="comment"> * @brief Writes to GPU hardware registers with a mask.</span></div>
+<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="comment"> * @param regAddr Register address to write to.</span></div>
+<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="comment"> * @param data Data to write.</span></div>
+<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="comment"> * @param datasize Size of the data to write.</span></div>
+<div class="line"><a name="l00193"></a><span class="lineno"> 193</span> <span class="comment"> * @param maskdata Data of the mask.</span></div>
+<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="comment"> * @param masksize Size of the mask.</span></div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00196"></a><span class="lineno"> 196</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a5ebccf501024a721b2f1ff96abe397ff">GSPGPU_RegisterInterruptRelayQueue</a>(<a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> eventHandle, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> flags, <a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a>* outMemHandle, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* threadID);</div>
+<div class="line"><a name="l00196"></a><span class="lineno"> 196</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a250b3be40bc03360272d18830de6721e">GSPGPU_WriteHWRegsWithMask</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> regAddr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* data, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> datasize, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* maskdata, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> masksize);</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span> <span class="comment"></span></div>
-<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <span class="comment">/// Unregisters the interrupt relay queue.</span></div>
-<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a70ca61cd22140cadbf54c55da13eb48c">GSPGPU_UnregisterInterruptRelayQueue</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="comment"></span></div>
-<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <span class="comment">/// Triggers a handling of commands written to shared memory.</span></div>
-<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa5d37db7ffdd14031b5f19c6de49f933">GSPGPU_TriggerCmdReqQueue</a>(<span class="keywordtype">void</span>);</div>
-<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div>
+<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="comment"> * @brief Reads from GPU hardware registers.</span></div>
+<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="comment"> * @param regAddr Register address to read from.</span></div>
+<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> <span class="comment"> * @param data Buffer to read data to.</span></div>
+<div class="line"><a name="l00202"></a><span class="lineno"> 202</span> <span class="comment"> * @param size Size of the buffer.</span></div>
+<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#ae554cb598da7d9be11dd4345902c43a5">GSPGPU_ReadHWRegs</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> regAddr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* data, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> size);</div>
+<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="comment"></span></div>
+<div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="comment"> * @brief Registers the interrupt relay queue.</span></div>
+<div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="comment"> * @param eventHandle Handle of the GX command event.</span></div>
+<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> <span class="comment"> * @param flags Flags to register with.</span></div>
+<div class="line"><a name="l00210"></a><span class="lineno"> 210</span> <span class="comment"> * @param outMemHandle Pointer to output the shared memory handle to.</span></div>
+<div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="comment"> * @param threadID Pointer to output the GSP thread ID to.</span></div>
+<div class="line"><a name="l00212"></a><span class="lineno"> 212</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a5ebccf501024a721b2f1ff96abe397ff">GSPGPU_RegisterInterruptRelayQueue</a>(<a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> eventHandle, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> flags, <a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a>* outMemHandle, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* threadID);</div>
+<div class="line"><a name="l00214"></a><span class="lineno"> 214</span> <span class="comment"></span></div>
+<div class="line"><a name="l00215"></a><span class="lineno"> 215</span> <span class="comment">/// Unregisters the interrupt relay queue.</span></div>
+<div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#a70ca61cd22140cadbf54c55da13eb48c">GSPGPU_UnregisterInterruptRelayQueue</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> <span class="comment"></span></div>
+<div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="comment">/// Triggers a handling of commands written to shared memory.</span></div>
+<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <span class="comment"></span><a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gspgpu_8h.html#aa5d37db7ffdd14031b5f19c6de49f933">GSPGPU_TriggerCmdReqQueue</a>(<span class="keywordtype">void</span>);</div>
+<div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div>
<div class="ttc" id="structGSPGPU__CaptureInfoEntry_html_a09e23bcfb56d75309bf7a547b85c56b0"><div class="ttname"><a href="structGSPGPU__CaptureInfoEntry.html#a09e23bcfb56d75309bf7a547b85c56b0">GSPGPU_CaptureInfoEntry::framebuf1_vaddr</a></div><div class="ttdeci">u32 * framebuf1_vaddr</div><div class="ttdoc">Right framebuffer. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:35</div></div>
<div class="ttc" id="gspgpu_8h_html_a02ba699764336c8df7f8910921d478cb"><div class="ttname"><a href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cb">GSPGPU_Event</a></div><div class="ttdeci">GSPGPU_Event</div><div class="ttdoc">GSPGPU events. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:47</div></div>
<div class="ttc" id="gspgpu_8h_html_a02ba699764336c8df7f8910921d478cba1bf23df97456715e279a4254b39c49b2"><div class="ttname"><a href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cba1bf23df97456715e279a4254b39c49b2">GSPGPU_EVENT_MAX</a></div><div class="ttdoc">Used to know how many events there are. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:57</div></div>
<div class="ttc" id="structGSPGPU__CaptureInfoEntry_html_a067ad2df1b3b46e4e06b26f8f905bdd0"><div class="ttname"><a href="structGSPGPU__CaptureInfoEntry.html#a067ad2df1b3b46e4e06b26f8f905bdd0">GSPGPU_CaptureInfoEntry::format</a></div><div class="ttdeci">u32 format</div><div class="ttdoc">Framebuffer format. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:36</div></div>
<div class="ttc" id="gspgpu_8h_html_a4c8d43241faec4b99bf24791375c3708a7d05a3900d34338a30c681f67c35093b"><div class="ttname"><a href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708a7d05a3900d34338a30c681f67c35093b">GSP_RGBA4_OES</a></div><div class="ttdoc">RGBA4. (2 bytes) </div><div class="ttdef"><b>Definition:</b> gspgpu.h:28</div></div>
<div class="ttc" id="structGSPGPU__FramebufferInfo_html_a4e0899ea0a76864a9268a8a938b122ec"><div class="ttname"><a href="structGSPGPU__FramebufferInfo.html#a4e0899ea0a76864a9268a8a938b122ec">GSPGPU_FramebufferInfo::format</a></div><div class="ttdeci">u32 format</div><div class="ttdoc">Framebuffer format, this u16 is written to the low u16 for LCD register 0x1EF00X70. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:16</div></div>
+<div class="ttc" id="types_8h_html_a857e4e893f41191500e83c00058df64e"><div class="ttname"><a href="types_8h.html#a857e4e893f41191500e83c00058df64e">ThreadFunc</a></div><div class="ttdeci">void(* ThreadFunc)(void *)</div><div class="ttdoc">Thread entrypoint function. </div><div class="ttdef"><b>Definition:</b> types.h:43</div></div>
+<div class="ttc" id="gspgpu_8h_html_a38080f47e69bd240156ca043c7946b29"><div class="ttname"><a href="gspgpu_8h.html#a38080f47e69bd240156ca043c7946b29">gspSetEventCallback</a></div><div class="ttdeci">void gspSetEventCallback(GSPGPU_Event id, ThreadFunc cb, void *data, bool oneShot)</div><div class="ttdoc">Configures a callback to run when a GSPGPU event occurs. </div></div>
<div class="ttc" id="gspgpu_8h_html_a02ba699764336c8df7f8910921d478cba5f7bd78a3019e3d57bac1cfee8cef768"><div class="ttname"><a href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cba5f7bd78a3019e3d57bac1cfee8cef768">GSPGPU_EVENT_PPF</a></div><div class="ttdoc">Display transfer finished. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:53</div></div>
<div class="ttc" id="gspgpu_8h_html_a70ca61cd22140cadbf54c55da13eb48c"><div class="ttname"><a href="gspgpu_8h.html#a70ca61cd22140cadbf54c55da13eb48c">GSPGPU_UnregisterInterruptRelayQueue</a></div><div class="ttdeci">Result GSPGPU_UnregisterInterruptRelayQueue(void)</div><div class="ttdoc">Unregisters the interrupt relay queue. </div></div>
<div class="ttc" id="gspgpu_8h_html_a0be2d830a9eccca7b59bf927b7c5e002"><div class="ttname"><a href="gspgpu_8h.html#a0be2d830a9eccca7b59bf927b7c5e002">GSPGPU_SetLcdForceBlack</a></div><div class="ttdeci">Result GSPGPU_SetLcdForceBlack(u8 flags)</div><div class="ttdoc">Sets whether to force the LCD to black. </div></div>
<div class="ttc" id="structGSPGPU__FramebufferInfo_html_ad33ec3ca41e404b967416c78c7aa7db8"><div class="ttname"><a href="structGSPGPU__FramebufferInfo.html#ad33ec3ca41e404b967416c78c7aa7db8">GSPGPU_FramebufferInfo::framebuf_dispselect</a></div><div class="ttdeci">u32 framebuf_dispselect</div><div class="ttdoc">Value for 0x1EF00X78, controls which framebuffer is displayed. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:17</div></div>
<div class="ttc" id="gspgpu_8h_html_a02ba699764336c8df7f8910921d478cba767fab5a8e58912ea84f192dff6926af"><div class="ttname"><a href="gspgpu_8h.html#a02ba699764336c8df7f8910921d478cba767fab5a8e58912ea84f192dff6926af">GSPGPU_EVENT_DMA</a></div><div class="ttdoc">TODO. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:55</div></div>
<div class="ttc" id="gspgpu_8h_html_a4c8d43241faec4b99bf24791375c3708af2acd7de248add1481404d4cd1fdf816"><div class="ttname"><a href="gspgpu_8h.html#a4c8d43241faec4b99bf24791375c3708af2acd7de248add1481404d4cd1fdf816">GSP_RGB565_OES</a></div><div class="ttdoc">RGB565. (2 bytes) </div><div class="ttdef"><b>Definition:</b> gspgpu.h:26</div></div>
+<div class="ttc" id="gspgpu_8h_html_a7280943da0262bb75eacc779bf54be87"><div class="ttname"><a href="gspgpu_8h.html#a7280943da0262bb75eacc779bf54be87">gspWaitForAnyEvent</a></div><div class="ttdeci">GSPGPU_Event gspWaitForAnyEvent(void)</div><div class="ttdoc">Waits for any GSPGPU event to occur. </div></div>
<div class="ttc" id="types_8h_html_afaa62991928fb9fb18ff0db62a040aba"><div class="ttname"><a href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdoc">32-bit unsigned integer </div><div class="ttdef"><b>Definition:</b> types.h:23</div></div>
<div class="ttc" id="structGSPGPU__CaptureInfoEntry_html"><div class="ttname"><a href="structGSPGPU__CaptureInfoEntry.html">GSPGPU_CaptureInfoEntry</a></div><div class="ttdoc">Capture info entry. </div><div class="ttdef"><b>Definition:</b> gspgpu.h:32</div></div>
<div class="ttc" id="gspgpu_8h_html_aa8b40b9b5550a1ed61528c05b586fb6c"><div class="ttname"><a href="gspgpu_8h.html#aa8b40b9b5550a1ed61528c05b586fb6c">gspInitEventHandler</a></div><div class="ttdeci">Result gspInitEventHandler(Handle gspEvent, vu8 *gspSharedMem, u8 gspThreadId)</div><div class="ttdoc">Initializes the GSPGPU event handler. </div></div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
-<tr class="memitem:ad34237bd30a2a96a6074e8967840d4fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad34237bd30a2a96a6074e8967840d4fc"></a>
-#define </td><td class="memItemRight" valign="bottom"><a class="el" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(w, h)   (((h)<<16)|((w)&0xFFFF))</td></tr>
-<tr class="memdesc:ad34237bd30a2a96a6074e8967840d4fc"><td class="mdescLeft"> </td><td class="mdescRight">Creates a buffer dimension parameter from width and height values. <br /></td></tr>
+<tr class="memitem:ad34237bd30a2a96a6074e8967840d4fc"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc">GX_BUFFER_DIM</a>(w, h)   (((h)<<16)|((w)&0xFFFF))</td></tr>
+<tr class="memdesc:ad34237bd30a2a96a6074e8967840d4fc"><td class="mdescLeft"> </td><td class="mdescRight">Creates a buffer dimension parameter from width and height values. <a href="#ad34237bd30a2a96a6074e8967840d4fc">More...</a><br /></td></tr>
<tr class="separator:ad34237bd30a2a96a6074e8967840d4fc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a19b4c4ad91299256a7c285e9ba7673b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a19b4c4ad91299256a7c285e9ba7673b9"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="gx_8h.html#a19b4c4ad91299256a7c285e9ba7673b9">GX_TRANSFER_FLIP_VERT</a>(x)   ((x)<<0)</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>GX commands. </p>
-</div><h2 class="groupheader">Enumeration Type Documentation</h2>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a class="anchor" id="ad34237bd30a2a96a6074e8967840d4fc"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define GX_BUFFER_DIM</td>
+ <td>(</td>
+ <td class="paramtype"> </td>
+ <td class="paramname">w, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"> </td>
+ <td class="paramname">h </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td>   (((h)<<16)|((w)&0xFFFF))</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Creates a buffer dimension parameter from width and height values. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">w</td><td>buffer width for GX_DisplayTransfer, linesize for GX_TextureCopy </td></tr>
+ <tr><td class="paramname">h</td><td>buffer height for GX_DisplayTransfer, gap for GX_TextureCopy </td></tr>
+ </table>
+ </dd>
+</dl>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a14">graphics/gpu/gpusprites/source/main.c</a>.</dd>
+</dl>
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="af2a0de60baddb7fc1528a62e4e555273"></a>
<div class="memitem">
<div class="memproto">
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a35">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a35">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a35">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a13">graphics/gpu/gpusprites/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a7">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a7">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a7">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a2346e838070d5029faf7e57a9fdf69bf"></a>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"></span></div>
-<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">/// Creates a buffer dimension parameter from width and height values.</span></div>
-<div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc"> 8</a></span> <span class="comment"></span><span class="preprocessor">#define GX_BUFFER_DIM(w, h) (((h)<<16)|((w)&0xFFFF))</span></div>
-<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span></div>
-<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * @brief Supported transfer pixel formats.</span></div>
-<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * @sa GSPGPU_FramebufferFormats</span></div>
-<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3"> 14</a></span> <span class="keyword">typedef</span> <span class="keyword">enum</span></div>
-<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> {</div>
-<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd"> 16</a></span>  <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd">GX_TRANSFER_FMT_RGBA8</a> = 0, <span class="comment">///< 8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha</span></div>
-<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec"> 17</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec">GX_TRANSFER_FMT_RGB8</a> = 1, <span class="comment">///< 8-bit Red + 8-bit Green + 8-bit Blue</span></div>
-<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969"> 18</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969">GX_TRANSFER_FMT_RGB565</a> = 2, <span class="comment">///< 5-bit Red + 6-bit Green + 5-bit Blue</span></div>
-<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae"> 19</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae">GX_TRANSFER_FMT_RGB5A1</a> = 3, <span class="comment">///< 5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha</span></div>
-<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85"> 20</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85">GX_TRANSFER_FMT_RGBA4</a> = 4 <span class="comment">///< 4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha</span></div>
-<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"></span>} <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3">GX_TRANSFER_FORMAT</a>;</div>
-<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"></span></div>
-<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * @brief Anti-aliasing modes</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> *</span></div>
-<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * Please remember that the framebuffer is sideways.</span></div>
-<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> * Hence if you activate 2x1 anti-aliasing the destination dimensions are w = 240*2 and h = 400</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880aba"> 29</a></span> <span class="keyword">typedef</span> <span class="keyword">enum</span></div>
-<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> {</div>
-<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff"> 31</a></span>  <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff">GX_TRANSFER_SCALE_NO</a> = 0, <span class="comment">///< No anti-aliasing</span></div>
-<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30"> 32</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30">GX_TRANSFER_SCALE_X</a> = 1, <span class="comment">///< 2x1 anti-aliasing</span></div>
-<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f"> 33</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f">GX_TRANSFER_SCALE_XY</a> = 2, <span class="comment">///< 2x2 anti-aliasing</span></div>
-<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"></span>} <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880aba">GX_TRANSFER_SCALE</a>;</div>
-<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"></span></div>
-<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">/// GX transfer control flags</span></div>
-<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273"> 37</a></span> <span class="comment"></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
-<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div>
-<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd"> 39</a></span>  <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> = 0x001, <span class="comment">///< Trigger the PPF event</span></div>
-<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf"> 40</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf">GX_FILL_FINISHED</a> = 0x002, <span class="comment">///< Indicates if the memory fill is complete. You should not use it when requesting a transfer.</span></div>
-<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c"> 41</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c">GX_FILL_16BIT_DEPTH</a> = 0x000, <span class="comment">///< The buffer has a 16 bit per pixel depth</span></div>
-<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e"> 42</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e">GX_FILL_24BIT_DEPTH</a> = 0x100, <span class="comment">///< The buffer has a 24 bit per pixel depth</span></div>
-<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d"> 43</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a> = 0x200, <span class="comment">///< The buffer has a 32 bit per pixel depth</span></div>
-<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"></span>} <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273">GX_FILL_CONTROL</a>;</div>
-<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"></span></div>
-<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment">/// Creates a transfer vertical flip flag.</span></div>
-<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="gx_8h.html#a19b4c4ad91299256a7c285e9ba7673b9"> 47</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_FLIP_VERT(x) ((x)<<0)</span></div>
-<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment">/// Creates a transfer tiled output flag.</span></div>
-<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="gx_8h.html#af921823b2f2e0cfcd521bea00a2b07b5"> 49</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_OUT_TILED(x) ((x)<<1)</span></div>
-<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">/// Creates a transfer raw copy flag.</span></div>
-<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="gx_8h.html#a8a13b70de5fd2429358b11e384f94964"> 51</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_RAW_COPY(x) ((x)<<3)</span></div>
-<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment">/// Creates a transfer input format flag.</span></div>
-<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="gx_8h.html#ae325a34e9b8fb5288de35ee469dfe214"> 53</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_IN_FORMAT(x) ((x)<<8)</span></div>
-<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">/// Creates a transfer output format flag.</span></div>
-<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="gx_8h.html#ab80b0d3eac6026af376128823e1ef8b6"> 55</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_OUT_FORMAT(x) ((x)<<12)</span></div>
-<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment">/// Creates a transfer scaling flag.</span></div>
-<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="gx_8h.html#aaa2327272dfcbc724f4c1d09aa60cd45"> 57</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_SCALING(x) ((x)<<24)</span></div>
-<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"></span></div>
-<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="comment">/// Command list flag bit 0.</span></div>
-<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="gx_8h.html#a1a1527924fe361645067b2ce35c2237f"> 60</a></span> <span class="comment"></span><span class="preprocessor">#define GX_CMDLIST_BIT0 BIT(0)</span></div>
-<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment">/// Flushes the command list.</span></div>
-<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="gx_8h.html#addcc38194ba3a4bf1322b698d19936bc"> 62</a></span> <span class="comment"></span><span class="preprocessor">#define GX_CMDLIST_FLUSH BIT(1)</span></div>
-<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div>
-<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* <a class="code" href="gx_8h.html#aee8fbf3aebb34fb5251c245732cccc2e">gxCmdBuf</a>; <span class="comment">///< GX command buffer.</span></div>
-<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"></span><span class="comment"></span></div>
-<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"> * @brief Requests a DMA.</span></div>
-<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment"> * @param src Source to DMA from.</span></div>
-<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * @param dst Destination to DMA to.</span></div>
-<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> * @param length Length of data to transfer.</span></div>
-<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a7020531dad937eb0d9dc0e22a557285e">GX_RequestDma</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* src, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* dst, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> length);</div>
-<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"></span></div>
-<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> * @brief Processes a GPU command list.</span></div>
-<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> * @param buf0a Command list address.</span></div>
-<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> * @param buf0s Command list size.</span></div>
-<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> * @param flags Flags to process with.</span></div>
-<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a2346e838070d5029faf7e57a9fdf69bf">GX_ProcessCommandList</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf0s, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> flags);</div>
-<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"></span></div>
-<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"> * @brief Fills the memory of two buffers with the given values.</span></div>
-<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"> * @param buf0a Start address of the first buffer.</span></div>
-<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"> * @param buf0v Dimensions of the first buffer.</span></div>
-<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"> * @param buf0e End address of the first buffer.</span></div>
-<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * @param control0 Value to fill the first buffer with.</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * @param buf1a Start address of the second buffer.</span></div>
-<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * @param buf1v Dimensions of the second buffer.</span></div>
-<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * @param buf1e End address of the second buffer.</span></div>
-<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * @param control1 Value to fill the second buffer with.</span></div>
-<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#aa6e39b328383930b64eaa230bc9bc6a0">GX_MemoryFill</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf0v, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0e, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> control0, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf1a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf1v, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf1e, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> control1);</div>
-<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"></span></div>
-<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> * @brief Initiates a display transfer.</span></div>
-<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * @note The PPF event will be signaled on completion.</span></div>
-<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> * @param inadr Address of the input.</span></div>
-<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> * @param indim Dimensions of the input.</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @param outadr Address of the output.</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> * @param outdim Dimensions of the output.</span></div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> * @param flags Flags to transfer with.</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* inadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> indim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* outadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> outdim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> flags);</div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"></span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * @brief Initiates a texture copy.</span></div>
-<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> * @note The PPF event will be signaled on completion.</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> * @param inadr Address of the input.</span></div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment"> * @param indim Dimensions of the input.</span></div>
-<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * @param outadr Address of the output.</span></div>
-<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> * @param outdim Dimensions of the output.</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * @param size Size of the data to transfer.</span></div>
-<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> * @param flags Flags to transfer with.</span></div>
-<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a2c1286f84675137eeeadc589654976a2">GX_TextureCopy</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* inadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> indim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* outadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> outdim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> size, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> flags);</div>
-<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"></span></div>
-<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> * @brief Flushes the cache regions of three buffers.</span></div>
-<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment"> * @param buf0a Address of the first buffer.</span></div>
-<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"> * @param buf0s Size of the first buffer.</span></div>
-<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment"> * @param buf1a Address of the second buffer.</span></div>
-<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> * @param buf1s Size of the second buffer.</span></div>
-<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"> * @param buf2a Address of the third buffer.</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> * @param buf2s Size of the third buffer.</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#ae5b03c7f32e45b00293e7150a1bc9810">GX_FlushCacheRegions</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf0s, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf1a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf1s, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf2a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf2s);</div>
+<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * @brief Creates a buffer dimension parameter from width and height values.</span></div>
+<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * @param w buffer width for GX_DisplayTransfer, linesize for GX_TextureCopy</span></div>
+<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * @param h buffer height for GX_DisplayTransfer, gap for GX_TextureCopy</span></div>
+<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="gx_8h.html#ad34237bd30a2a96a6074e8967840d4fc"> 12</a></span> <span class="preprocessor">#define GX_BUFFER_DIM(w, h) (((h)<<16)|((w)&0xFFFF))</span></div>
+<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"></span></div>
+<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * @brief Supported transfer pixel formats.</span></div>
+<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * @sa GSPGPU_FramebufferFormats</span></div>
+<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3"> 18</a></span> <span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div>
+<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd"> 20</a></span>  <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd">GX_TRANSFER_FMT_RGBA8</a> = 0, <span class="comment">///< 8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha</span></div>
+<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec"> 21</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec">GX_TRANSFER_FMT_RGB8</a> = 1, <span class="comment">///< 8-bit Red + 8-bit Green + 8-bit Blue</span></div>
+<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969"> 22</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969">GX_TRANSFER_FMT_RGB565</a> = 2, <span class="comment">///< 5-bit Red + 6-bit Green + 5-bit Blue</span></div>
+<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae"> 23</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae">GX_TRANSFER_FMT_RGB5A1</a> = 3, <span class="comment">///< 5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha</span></div>
+<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85"> 24</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85">GX_TRANSFER_FMT_RGBA4</a> = 4 <span class="comment">///< 4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"></span>} <a class="code" href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3">GX_TRANSFER_FORMAT</a>;</div>
+<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"></span></div>
+<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * @brief Anti-aliasing modes</span></div>
+<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> *</span></div>
+<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * Please remember that the framebuffer is sideways.</span></div>
+<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> * Hence if you activate 2x1 anti-aliasing the destination dimensions are w = 240*2 and h = 400</span></div>
+<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880aba"> 33</a></span> <span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div>
+<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff"> 35</a></span>  <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff">GX_TRANSFER_SCALE_NO</a> = 0, <span class="comment">///< No anti-aliasing</span></div>
+<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30"> 36</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30">GX_TRANSFER_SCALE_X</a> = 1, <span class="comment">///< 2x1 anti-aliasing</span></div>
+<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f"> 37</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f">GX_TRANSFER_SCALE_XY</a> = 2, <span class="comment">///< 2x2 anti-aliasing</span></div>
+<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"></span>} <a class="code" href="gx_8h.html#a248b09e90905d8c0622fdfee77880aba">GX_TRANSFER_SCALE</a>;</div>
+<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"></span></div>
+<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment">/// GX transfer control flags</span></div>
+<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273"> 41</a></span> <span class="comment"></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
+<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div>
+<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd"> 43</a></span>  <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a> = 0x001, <span class="comment">///< Trigger the PPF event</span></div>
+<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf"> 44</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf">GX_FILL_FINISHED</a> = 0x002, <span class="comment">///< Indicates if the memory fill is complete. You should not use it when requesting a transfer.</span></div>
+<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c"> 45</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c">GX_FILL_16BIT_DEPTH</a> = 0x000, <span class="comment">///< The buffer has a 16 bit per pixel depth</span></div>
+<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e"> 46</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e">GX_FILL_24BIT_DEPTH</a> = 0x100, <span class="comment">///< The buffer has a 24 bit per pixel depth</span></div>
+<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d"> 47</a></span> <span class="comment"></span> <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a> = 0x200, <span class="comment">///< The buffer has a 32 bit per pixel depth</span></div>
+<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"></span>} <a class="code" href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273">GX_FILL_CONTROL</a>;</div>
+<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"></span></div>
+<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">/// Creates a transfer vertical flip flag.</span></div>
+<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="gx_8h.html#a19b4c4ad91299256a7c285e9ba7673b9"> 51</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_FLIP_VERT(x) ((x)<<0)</span></div>
+<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment">/// Creates a transfer tiled output flag.</span></div>
+<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="gx_8h.html#af921823b2f2e0cfcd521bea00a2b07b5"> 53</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_OUT_TILED(x) ((x)<<1)</span></div>
+<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">/// Creates a transfer raw copy flag.</span></div>
+<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="gx_8h.html#a8a13b70de5fd2429358b11e384f94964"> 55</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_RAW_COPY(x) ((x)<<3)</span></div>
+<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment">/// Creates a transfer input format flag.</span></div>
+<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="gx_8h.html#ae325a34e9b8fb5288de35ee469dfe214"> 57</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_IN_FORMAT(x) ((x)<<8)</span></div>
+<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment">/// Creates a transfer output format flag.</span></div>
+<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="gx_8h.html#ab80b0d3eac6026af376128823e1ef8b6"> 59</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_OUT_FORMAT(x) ((x)<<12)</span></div>
+<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="comment">/// Creates a transfer scaling flag.</span></div>
+<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="gx_8h.html#aaa2327272dfcbc724f4c1d09aa60cd45"> 61</a></span> <span class="comment"></span><span class="preprocessor">#define GX_TRANSFER_SCALING(x) ((x)<<24)</span></div>
+<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment"></span></div>
+<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment">/// Command list flag bit 0.</span></div>
+<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="gx_8h.html#a1a1527924fe361645067b2ce35c2237f"> 64</a></span> <span class="comment"></span><span class="preprocessor">#define GX_CMDLIST_BIT0 BIT(0)</span></div>
+<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">/// Flushes the command list.</span></div>
+<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="gx_8h.html#addcc38194ba3a4bf1322b698d19936bc"> 66</a></span> <span class="comment"></span><span class="preprocessor">#define GX_CMDLIST_FLUSH BIT(1)</span></div>
+<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div>
+<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">extern</span> <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* <a class="code" href="gx_8h.html#aee8fbf3aebb34fb5251c245732cccc2e">gxCmdBuf</a>; <span class="comment">///< GX command buffer.</span></div>
+<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"></span><span class="comment"></span></div>
+<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> * @brief Requests a DMA.</span></div>
+<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> * @param src Source to DMA from.</span></div>
+<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> * @param dst Destination to DMA to.</span></div>
+<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"> * @param length Length of data to transfer.</span></div>
+<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a7020531dad937eb0d9dc0e22a557285e">GX_RequestDma</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* src, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* dst, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> length);</div>
+<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"></span></div>
+<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * @brief Processes a GPU command list.</span></div>
+<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> * @param buf0a Command list address.</span></div>
+<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> * @param buf0s Command list size.</span></div>
+<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> * @param flags Flags to process with.</span></div>
+<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a2346e838070d5029faf7e57a9fdf69bf">GX_ProcessCommandList</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf0s, <a class="code" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> flags);</div>
+<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment"></span></div>
+<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"> * @brief Fills the memory of two buffers with the given values.</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * @param buf0a Start address of the first buffer.</span></div>
+<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * @param buf0v Dimensions of the first buffer.</span></div>
+<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> * @param buf0e End address of the first buffer.</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment"> * @param control0 Value to fill the first buffer with.</span></div>
+<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"> * @param buf1a Start address of the second buffer.</span></div>
+<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment"> * @param buf1v Dimensions of the second buffer.</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * @param buf1e End address of the second buffer.</span></div>
+<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * @param control1 Value to fill the second buffer with.</span></div>
+<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#aa6e39b328383930b64eaa230bc9bc6a0">GX_MemoryFill</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf0v, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0e, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> control0, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf1a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf1v, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf1e, <a class="code" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> control1);</div>
+<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"></span></div>
+<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @brief Initiates a display transfer.</span></div>
+<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> * @note The PPF event will be signaled on completion.</span></div>
+<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> * @param inadr Address of the input.</span></div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> * @param indim Dimensions of the input.</span></div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"> * @param outadr Address of the output.</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"> * @param outdim Dimensions of the output.</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> * @param flags Flags to transfer with.</span></div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* inadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> indim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* outadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> outdim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> flags);</div>
+<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"></span></div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"> * @brief Initiates a texture copy.</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment"> * @note The PPF event will be signaled on completion.</span></div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * @param inadr Address of the input.</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> * @param indim Dimensions of the input.</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> * @param outadr Address of the output.</span></div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment"> * @param outdim Dimensions of the output.</span></div>
+<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="comment"> * @param size Size of the data to transfer.</span></div>
+<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment"> * @param flags Flags to transfer with.</span></div>
+<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#a2c1286f84675137eeeadc589654976a2">GX_TextureCopy</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* inadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> indim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* outadr, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> outdim, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> size, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> flags);</div>
+<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment"></span></div>
+<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment"> * @brief Flushes the cache regions of three buffers.</span></div>
+<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="comment"> * @param buf0a Address of the first buffer.</span></div>
+<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment"> * @param buf0s Size of the first buffer.</span></div>
+<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="comment"> * @param buf1a Address of the second buffer.</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="comment"> * @param buf1s Size of the second buffer.</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment"> * @param buf2a Address of the third buffer.</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment"> * @param buf2s Size of the third buffer.</span></div>
+<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <a class="code" href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a> <a class="code" href="gx_8h.html#ae5b03c7f32e45b00293e7150a1bc9810">GX_FlushCacheRegions</a>(<a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf0a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf0s, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf1a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf1s, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a>* buf2a, <a class="code" href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a> buf2s);</div>
<div class="ttc" id="gx_8h_html_ae5b03c7f32e45b00293e7150a1bc9810"><div class="ttname"><a href="gx_8h.html#ae5b03c7f32e45b00293e7150a1bc9810">GX_FlushCacheRegions</a></div><div class="ttdeci">Result GX_FlushCacheRegions(u32 *buf0a, u32 buf0s, u32 *buf1a, u32 buf1s, u32 *buf2a, u32 buf2s)</div><div class="ttdoc">Flushes the cache regions of three buffers. </div></div>
<div class="ttc" id="types_8h_html_ac830bf5a4f2cf8273f61ab99a46cf163"><div class="ttname"><a href="types_8h.html#ac830bf5a4f2cf8273f61ab99a46cf163">Result</a></div><div class="ttdeci">s32 Result</div><div class="ttdoc">Function result. </div><div class="ttdef"><b>Definition:</b> types.h:42</div></div>
<div class="ttc" id="types_8h_html_ace9d960e74685e2cd84b36132dbbf8aa"><div class="ttname"><a href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a></div><div class="ttdeci">uint16_t u16</div><div class="ttdoc">16-bit unsigned integer </div><div class="ttdef"><b>Definition:</b> types.h:22</div></div>
-<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3">GX_TRANSFER_FORMAT</a></div><div class="ttdeci">GX_TRANSFER_FORMAT</div><div class="ttdoc">Supported transfer pixel formats. </div><div class="ttdef"><b>Definition:</b> gx.h:14</div></div>
-<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf">GX_FILL_FINISHED</a></div><div class="ttdoc">Indicates if the memory fill is complete. You should not use it when requesting a transfer...</div><div class="ttdef"><b>Definition:</b> gx.h:40</div></div>
-<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd">GX_TRANSFER_FMT_RGBA8</a></div><div class="ttdoc">8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha </div><div class="ttdef"><b>Definition:</b> gx.h:16</div></div>
+<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3">GX_TRANSFER_FORMAT</a></div><div class="ttdeci">GX_TRANSFER_FORMAT</div><div class="ttdoc">Supported transfer pixel formats. </div><div class="ttdef"><b>Definition:</b> gx.h:18</div></div>
+<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273ae4dea50c92ea821ef9d147b53b5815bf">GX_FILL_FINISHED</a></div><div class="ttdoc">Indicates if the memory fill is complete. You should not use it when requesting a transfer...</div><div class="ttdef"><b>Definition:</b> gx.h:44</div></div>
+<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3af7d586734e0807a190bf75602fea93fd">GX_TRANSFER_FMT_RGBA8</a></div><div class="ttdoc">8-bit Red + 8-bit Green + 8-bit Blue + 8-bit Alpha </div><div class="ttdef"><b>Definition:</b> gx.h:20</div></div>
<div class="ttc" id="gx_8h_html_a4de1f2c27d7984b8cf5b93c8913a499b"><div class="ttname"><a href="gx_8h.html#a4de1f2c27d7984b8cf5b93c8913a499b">GX_DisplayTransfer</a></div><div class="ttdeci">Result GX_DisplayTransfer(u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 flags)</div><div class="ttdoc">Initiates a display transfer. </div></div>
<div class="ttc" id="gx_8h_html_aa6e39b328383930b64eaa230bc9bc6a0"><div class="ttname"><a href="gx_8h.html#aa6e39b328383930b64eaa230bc9bc6a0">GX_MemoryFill</a></div><div class="ttdeci">Result GX_MemoryFill(u32 *buf0a, u32 buf0v, u32 *buf0e, u16 control0, u32 *buf1a, u32 buf1v, u32 *buf1e, u16 control1)</div><div class="ttdoc">Fills the memory of two buffers with the given values. </div></div>
-<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273">GX_FILL_CONTROL</a></div><div class="ttdeci">GX_FILL_CONTROL</div><div class="ttdoc">GX transfer control flags. </div><div class="ttdef"><b>Definition:</b> gx.h:37</div></div>
-<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85">GX_TRANSFER_FMT_RGBA4</a></div><div class="ttdoc">4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha </div><div class="ttdef"><b>Definition:</b> gx.h:20</div></div>
+<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273">GX_FILL_CONTROL</a></div><div class="ttdeci">GX_FILL_CONTROL</div><div class="ttdoc">GX transfer control flags. </div><div class="ttdef"><b>Definition:</b> gx.h:41</div></div>
+<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3aeb91dd279d4b69a708cd1cb335981d85">GX_TRANSFER_FMT_RGBA4</a></div><div class="ttdoc">4-bit Red + 4-bit Green + 4-bit Blue + 4-bit Alpha </div><div class="ttdef"><b>Definition:</b> gx.h:24</div></div>
<div class="ttc" id="types_8h_html_a92c50087ca0e64fa93fc59402c55f8ca"><div class="ttname"><a href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdoc">would be nice if newlib had this already </div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
-<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff">GX_TRANSFER_SCALE_NO</a></div><div class="ttdoc">No anti-aliasing. </div><div class="ttdef"><b>Definition:</b> gx.h:31</div></div>
+<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa2fe64f5849a1d5806575a9379f81dfff">GX_TRANSFER_SCALE_NO</a></div><div class="ttdoc">No anti-aliasing. </div><div class="ttdef"><b>Definition:</b> gx.h:35</div></div>
<div class="ttc" id="gx_8h_html_a7020531dad937eb0d9dc0e22a557285e"><div class="ttname"><a href="gx_8h.html#a7020531dad937eb0d9dc0e22a557285e">GX_RequestDma</a></div><div class="ttdeci">Result GX_RequestDma(u32 *src, u32 *dst, u32 length)</div><div class="ttdoc">Requests a DMA. </div></div>
<div class="ttc" id="gx_8h_html_a2346e838070d5029faf7e57a9fdf69bf"><div class="ttname"><a href="gx_8h.html#a2346e838070d5029faf7e57a9fdf69bf">GX_ProcessCommandList</a></div><div class="ttdeci">Result GX_ProcessCommandList(u32 *buf0a, u32 buf0s, u8 flags)</div><div class="ttdoc">Processes a GPU command list. </div></div>
-<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969">GX_TRANSFER_FMT_RGB565</a></div><div class="ttdoc">5-bit Red + 6-bit Green + 5-bit Blue </div><div class="ttdef"><b>Definition:</b> gx.h:18</div></div>
+<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3a257646681fb4c1dd4b4f0efbc42a6969">GX_TRANSFER_FMT_RGB565</a></div><div class="ttdoc">5-bit Red + 6-bit Green + 5-bit Blue </div><div class="ttdef"><b>Definition:</b> gx.h:22</div></div>
<div class="ttc" id="types_8h_html_afaa62991928fb9fb18ff0db62a040aba"><div class="ttname"><a href="types_8h.html#afaa62991928fb9fb18ff0db62a040aba">u32</a></div><div class="ttdeci">uint32_t u32</div><div class="ttdoc">32-bit unsigned integer </div><div class="ttdef"><b>Definition:</b> types.h:23</div></div>
-<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e">GX_FILL_24BIT_DEPTH</a></div><div class="ttdoc">The buffer has a 24 bit per pixel depth. </div><div class="ttdef"><b>Definition:</b> gx.h:42</div></div>
+<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273aee8f4636ba155f050ccc5028f1c8a46e">GX_FILL_24BIT_DEPTH</a></div><div class="ttdoc">The buffer has a 24 bit per pixel depth. </div><div class="ttdef"><b>Definition:</b> gx.h:46</div></div>
<div class="ttc" id="gx_8h_html_aee8fbf3aebb34fb5251c245732cccc2e"><div class="ttname"><a href="gx_8h.html#aee8fbf3aebb34fb5251c245732cccc2e">gxCmdBuf</a></div><div class="ttdeci">u32 * gxCmdBuf</div><div class="ttdoc">GX command buffer. </div></div>
-<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec">GX_TRANSFER_FMT_RGB8</a></div><div class="ttdoc">8-bit Red + 8-bit Green + 8-bit Blue </div><div class="ttdef"><b>Definition:</b> gx.h:17</div></div>
-<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a></div><div class="ttdoc">The buffer has a 32 bit per pixel depth. </div><div class="ttdef"><b>Definition:</b> gx.h:43</div></div>
-<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a></div><div class="ttdoc">Trigger the PPF event. </div><div class="ttdef"><b>Definition:</b> gx.h:39</div></div>
-<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30">GX_TRANSFER_SCALE_X</a></div><div class="ttdoc">2x1 anti-aliasing </div><div class="ttdef"><b>Definition:</b> gx.h:32</div></div>
-<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f">GX_TRANSFER_SCALE_XY</a></div><div class="ttdoc">2x2 anti-aliasing </div><div class="ttdef"><b>Definition:</b> gx.h:33</div></div>
-<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae">GX_TRANSFER_FMT_RGB5A1</a></div><div class="ttdoc">5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha </div><div class="ttdef"><b>Definition:</b> gx.h:19</div></div>
-<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880aba"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880aba">GX_TRANSFER_SCALE</a></div><div class="ttdeci">GX_TRANSFER_SCALE</div><div class="ttdoc">Anti-aliasing modes. </div><div class="ttdef"><b>Definition:</b> gx.h:29</div></div>
+<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3accbc07083d7f644b5b162170bafe1dec">GX_TRANSFER_FMT_RGB8</a></div><div class="ttdoc">8-bit Red + 8-bit Green + 8-bit Blue </div><div class="ttdef"><b>Definition:</b> gx.h:21</div></div>
+<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2642ecb73c80fe5272c041350c08134d">GX_FILL_32BIT_DEPTH</a></div><div class="ttdoc">The buffer has a 32 bit per pixel depth. </div><div class="ttdef"><b>Definition:</b> gx.h:47</div></div>
+<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2b6413914fd7889d0ad0610ed4bb5efd">GX_FILL_TRIGGER</a></div><div class="ttdoc">Trigger the PPF event. </div><div class="ttdef"><b>Definition:</b> gx.h:43</div></div>
+<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa332fea39c9f9533f8ab5780a9543ba30">GX_TRANSFER_SCALE_X</a></div><div class="ttdoc">2x1 anti-aliasing </div><div class="ttdef"><b>Definition:</b> gx.h:36</div></div>
+<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880abaa23da8dd0a0ff54432347bf36e9bf4c5f">GX_TRANSFER_SCALE_XY</a></div><div class="ttdoc">2x2 anti-aliasing </div><div class="ttdef"><b>Definition:</b> gx.h:37</div></div>
+<div class="ttc" id="gx_8h_html_aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae"><div class="ttname"><a href="gx_8h.html#aca790f0cdfea04833518556b8a1682f3ac52c38b6270090935348440f97113aae">GX_TRANSFER_FMT_RGB5A1</a></div><div class="ttdoc">5-bit Red + 5-bit Green + 5-bit Blue + 1-bit Alpha </div><div class="ttdef"><b>Definition:</b> gx.h:23</div></div>
+<div class="ttc" id="gx_8h_html_a248b09e90905d8c0622fdfee77880aba"><div class="ttname"><a href="gx_8h.html#a248b09e90905d8c0622fdfee77880aba">GX_TRANSFER_SCALE</a></div><div class="ttdeci">GX_TRANSFER_SCALE</div><div class="ttdoc">Anti-aliasing modes. </div><div class="ttdef"><b>Definition:</b> gx.h:33</div></div>
<div class="ttc" id="gx_8h_html_a2c1286f84675137eeeadc589654976a2"><div class="ttname"><a href="gx_8h.html#a2c1286f84675137eeeadc589654976a2">GX_TextureCopy</a></div><div class="ttdeci">Result GX_TextureCopy(u32 *inadr, u32 indim, u32 *outadr, u32 outdim, u32 size, u32 flags)</div><div class="ttdoc">Initiates a texture copy. </div></div>
-<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c">GX_FILL_16BIT_DEPTH</a></div><div class="ttdoc">The buffer has a 16 bit per pixel depth. </div><div class="ttdef"><b>Definition:</b> gx.h:41</div></div>
+<div class="ttc" id="gx_8h_html_af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c"><div class="ttname"><a href="gx_8h.html#af2a0de60baddb7fc1528a62e4e555273a2bc635a0bd73fdcc6aea5c25c1e2430c">GX_FILL_16BIT_DEPTH</a></div><div class="ttdoc">The buffer has a 16 bit per pixel depth. </div><div class="ttdef"><b>Definition:</b> gx.h:45</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<p>Gets keys that were just pressed. </p>
<p>Individual keys can be checked by ORing them with this value. </p><dl class="section return"><dt>Returns</dt><dd>Keys down. </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a3">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a11">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a7">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a9">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a71">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a70">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a81">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a8">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a5">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a5">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a8">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a19">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a5">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a5">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a7">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a22">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a9">qtm/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a11">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a11">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a5">time/rtc/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a3">app_launch/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a11">audio/mic/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a7">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a9">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a29">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a25">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a33">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a22">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a24">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a28">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a8">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a5">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a5">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a8">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="http_2source_2main_8c-example.html#a19">http/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a5">input/read-controls/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a5">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a7">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a22">mvd/source/main.c</a>, <a class="el" href="qtm_2source_2main_8c-example.html#a9">qtm/source/main.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a11">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a11">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a5">time/rtc/source/main.c</a>.</dd>
</dl>
</div>
</div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<p>libctru is just a library and needs a toolchain to function. devkitARM (created by <a href="http://devkitpro.org">devkitPro</a>) is the officially supported ARM cross compiling toolchain, which provides the framework necessary to supply a usable POSIX-like environment, with working C and C++ standard libraries; as well as the tools required to compile homebrew in the 3DSX format, and assemble GPU shaders. The use of other ARM toolchains is severely discouraged.</p>
<p>The most recent version of devkitARM (r45 at the time of writing) is always recommended. The installers/setup scripts supplied by devkitPro install a prebuilt copy of the latest stable version of libctru, which is recommended for general use. Please note that devkitPro has a policy of keeping legacy code to a minimum, so a library upgrade may result in older code failing to compile or behave properly. Developers are encouraged to keep their code working with the latest versions of the tools and libraries.</p>
<p>You may find instructions on how to install devkitARM on <a href="http://devkitpro.org/wiki/Getting_Started">the devkitPro Wiki</a>.</p>
+<h1>Documentation</h1>
+<p>The documentation is automatically built upon release and can be found at the following url: <a href="http://smealum.github.io/ctrulib">http://smealum.github.io/ctrulib</a></p>
<h1>License</h1>
<p>This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</p>
<p>Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</p>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The allocated buffer. </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="audio_2mic_2source_2main_8c-example.html#a7">audio/mic/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a2">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a2">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a2">graphics/gpu/textured_cube/source/main.c</a>, and <a class="el" href="mvd_2source_2main_8c-example.html#a19">mvd/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="audio_2mic_2source_2main_8c-example.html#a7">audio/mic/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a9">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a10">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a10">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a9">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a9">graphics/gpu/textured_cube/source/main.c</a>, and <a class="el" href="mvd_2source_2main_8c-example.html#a19">mvd/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="audio_2mic_2source_2main_8c-example.html#a30">audio/mic/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a5">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a5">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a5">graphics/gpu/textured_cube/source/main.c</a>, and <a class="el" href="mvd_2source_2main_8c-example.html#a24">mvd/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="audio_2mic_2source_2main_8c-example.html#a30">audio/mic/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a17">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a15">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a18">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a14">graphics/gpu/simple_tri/source/main.c</a>, <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a18">graphics/gpu/textured_cube/source/main.c</a>, and <a class="el" href="mvd_2source_2main_8c-example.html#a24">mvd/source/main.c</a>.</dd>
</dl>
</div>
</div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="title">Changelog </div> </div>
</div><!--header-->
<div class="contents">
-<div class="textblock"><h2>Version 1.0.0</h2>
+<div class="textblock"><h2>Version 1.1.0</h2>
+<ul>
+<li>Additions:<ul>
+<li>GSPGPU/GX code was revised and enhanced:<ul>
+<li>Screens can be buffer-swapped independently using the new gfxConfigScreen function.</li>
+<li>Added gspSetEventCallback for running event code directly on the GSP thread.</li>
+<li>Added gspWaitForAnyEvent for waiting for any GSP event.</li>
+<li>Added gfxIs3D for retrieving 3D-enable status.</li>
+</ul>
+</li>
+<li>Added AM_InstallFirm.</li>
+<li>Added __sync_get_arbiter.</li>
+<li>Added support for usleep.</li>
+</ul>
+</li>
+<li>Changes:<ul>
+<li>NDSP thread priority has been increasing, therefore mitigating potential sound issues due to high CPU usage on the main thread.</li>
+<li>RomFS initialization no longer makes romfs:/ the default device.</li>
+</ul>
+</li>
+<li>Bug fixes:<ul>
+<li>Fixed the timeout parameter in svcArbitrateAddress.</li>
+<li>Fixed svcSetTimer.</li>
+</ul>
+</li>
+</ul>
+<h2>Version 1.0.0</h2>
<ul>
<li>New features:<ul>
<li>libctru documentation is now available at <a href="http://smealum.github.io/ctrulib/">http://smealum.github.io/ctrulib/</a></li>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The corresponding physical address. It is sometimes required by services or when using the GPU command buffer. </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a12">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a12">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a12">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a3b62a51a9c8f111843c1fd3ef0756026"></a>
<p>Gets the state of the 3D slider. </p>
<dl class="section return"><dt>Returns</dt><dd>The state of the 3D slider (0.0~1.0) </dd></dl>
-
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a31">graphics/gpu/fragment_light/source/main.c</a>.</dd>
+</dl>
</div>
</div>
<a class="anchor" id="a383e9cab6b8d56a0e419fc830fe4c4e2"></a>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a54">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a53">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a53">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a6">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a7">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a7">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a6">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a6">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a6">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a64">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a63">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a74">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a18">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a16">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a24">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a13">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a15">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a19">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a50">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a50">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a50">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a3">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a3">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a4">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a3">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a3">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a3">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a53">graphics/gpu/geoshader/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a6">graphics/gpu/geoshader/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a51">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a51">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a51">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a4">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a4">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a5">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a4">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a4">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a4">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl>
</div>
</div>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a56">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a55">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a55">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
</div><!-- contents -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a65">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a64">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a75">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a19">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a17">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a25">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a14">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a16">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a20">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl>
</div>
</div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The parsed shader binary. </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a49">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a49">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a49">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a2">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a2">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#a3">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#a2">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a2">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a2">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl>
</div>
</div>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>DVLB data. </p>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#_a47">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#_a47">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#_a47">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#_a0">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#_a0">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#_a1">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#_a0">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#_a0">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#_a0">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl></div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/3ds/gpu/<a class="el" href="shbin_8h_source.html">shbin.h</a></li>
</ul>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Describes an instance of a full shader program. </p>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#_a48">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#_a48">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#_a48">graphics/gpu/textured_cube/source/main.c</a>.</dd>
+<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#_a1">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#_a1">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2gpusprites_2source_2main_8c-example.html#_a2">graphics/gpu/gpusprites/source/main.c</a>, <a class="el" href="graphics_2gpu_2immediate_2source_2main_8c-example.html#_a1">graphics/gpu/immediate/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#_a1">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#_a1">graphics/gpu/textured_cube/source/main.c</a>.</dd>
</dl></div><hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/3ds/gpu/<a class="el" href="shaderProgram_8h_source.html">shaderProgram.h</a></li>
</ul>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr class="memitem:ae5b6bc8b7ae74b57efbb0707c1d6cea9"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="synchronization_8h.html#ae5b6bc8b7ae74b57efbb0707c1d6cea9">__strex</a> (<a class="el" href="types_8h.html#ae9b1af5c037e57a98884758875d3a7c4">s32</a> *addr, <a class="el" href="types_8h.html#ae9b1af5c037e57a98884758875d3a7c4">s32</a> val)</td></tr>
<tr class="memdesc:ae5b6bc8b7ae74b57efbb0707c1d6cea9"><td class="mdescLeft"> </td><td class="mdescRight">Performs a strex operation. <a href="#ae5b6bc8b7ae74b57efbb0707c1d6cea9">More...</a><br /></td></tr>
<tr class="separator:ae5b6bc8b7ae74b57efbb0707c1d6cea9"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:abfc0f49f74fdd98c039a670ecacd23de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="synchronization_8h.html#abfc0f49f74fdd98c039a670ecacd23de">__sync_get_arbiter</a> (void)</td></tr>
+<tr class="memdesc:abfc0f49f74fdd98c039a670ecacd23de"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the synchronization subsystem's address arbiter handle. <a href="#abfc0f49f74fdd98c039a670ecacd23de">More...</a><br /></td></tr>
+<tr class="separator:abfc0f49f74fdd98c039a670ecacd23de"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a81f625fde46405c1d539b1581d54fb05"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="synchronization_8h.html#a81f625fde46405c1d539b1581d54fb05">LightLock_Init</a> (<a class="el" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a> *lock)</td></tr>
<tr class="memdesc:a81f625fde46405c1d539b1581d54fb05"><td class="mdescLeft"> </td><td class="mdescRight">Initializes a light lock. <a href="#a81f625fde46405c1d539b1581d54fb05">More...</a><br /></td></tr>
<tr class="separator:a81f625fde46405c1d539b1581d54fb05"><td class="memSeparator" colspan="2"> </td></tr>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the operation was successful. </dd></dl>
+</div>
+</div>
+<a class="anchor" id="abfc0f49f74fdd98c039a670ecacd23de"></a>
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> __sync_get_arbiter </td>
+ <td>(</td>
+ <td class="paramtype">void </td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Retrieves the synchronization subsystem's address arbiter handle. </p>
+<dl class="section return"><dt>Returns</dt><dd>The synchronization subsystem's address arbiter handle. </dd></dl>
+
</div>
</div>
<a class="anchor" id="a81f625fde46405c1d539b1581d54fb05"></a>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="synchronization_8h.html#a5bc74ad985f95799e927cc50a4ebd9c3"> 60</a></span> <span class="comment"></span><span class="preprocessor">#define AtomicSwap(ptr, value) __atomic_exchange_n((u32*)(ptr), (value), __ATOMIC_SEQ_CST)</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment"></span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment"> * @brief Initializes a light lock.</span></div>
-<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
+<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="comment"> * @brief Retrieves the synchronization subsystem's address arbiter handle.</span></div>
+<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"> * @return The synchronization subsystem's address arbiter handle.</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a81f625fde46405c1d539b1581d54fb05">LightLock_Init</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
+<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <a class="code" href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a> <a class="code" href="synchronization_8h.html#abfc0f49f74fdd98c039a670ecacd23de">__sync_get_arbiter</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="comment"></span></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * @brief Locks a light lock.</span></div>
+<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * @brief Initializes a light lock.</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#ae75aac6e4bfe30037c8a9de916a6ddb8">LightLock_Lock</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
+<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a81f625fde46405c1d539b1581d54fb05">LightLock_Init</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"></span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> * @brief Attempts to lock a light lock.</span></div>
+<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> * @brief Locks a light lock.</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
-<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> * @return Zero on success, non-zero on failure.</span></div>
-<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">int</span> <a class="code" href="synchronization_8h.html#a1a1d677c021a8487d567f832dea9d9db">LightLock_TryLock</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
-<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"></span></div>
-<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> * @brief Unlocks a light lock.</span></div>
-<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
+<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#ae75aac6e4bfe30037c8a9de916a6ddb8">LightLock_Lock</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
+<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"></span></div>
+<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> * @brief Attempts to lock a light lock.</span></div>
+<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
+<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="comment"> * @return Zero on success, non-zero on failure.</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a82283ae772ec2eac3a193b1431a681af">LightLock_Unlock</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
+<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">int</span> <a class="code" href="synchronization_8h.html#a1a1d677c021a8487d567f832dea9d9db">LightLock_TryLock</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment"></span></div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * @brief Initializes a recursive lock.</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="comment"> * @brief Unlocks a light lock.</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a1bbbe87bf212a32850ac9f0b6aa73408">RecursiveLock_Init</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
+<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a82283ae772ec2eac3a193b1431a681af">LightLock_Unlock</a>(<a class="code" href="synchronization_8h.html#a0d966c33d353bedf60c66a1a75e68c5e">LightLock</a>* lock);</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment"></span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * @brief Locks a recursive lock.</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="comment"> * @brief Initializes a recursive lock.</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#afea61e6ff137d96934bb145d44095ccb">RecursiveLock_Lock</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
+<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a1bbbe87bf212a32850ac9f0b6aa73408">RecursiveLock_Init</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"></span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @brief Attempts to lock a recursive lock.</span></div>
+<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @brief Locks a recursive lock.</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
-<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> * @return Zero on success, non-zero on failure.</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="keywordtype">int</span> <a class="code" href="synchronization_8h.html#a8808924fdee80220f83b6992bc5e104d">RecursiveLock_TryLock</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
-<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment"></span></div>
-<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment">/**</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * @brief Unlocks a recursive lock.</span></div>
-<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
+<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#afea61e6ff137d96934bb145d44095ccb">RecursiveLock_Lock</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
+<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment"></span></div>
+<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="comment"> * @brief Attempts to lock a recursive lock.</span></div>
+<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> <span class="comment"> * @return Zero on success, non-zero on failure.</span></div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment"> */</span></div>
-<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a529b21c4a974abeea24b1dcceb75cf62">RecursiveLock_Unlock</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
+<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="keywordtype">int</span> <a class="code" href="synchronization_8h.html#a8808924fdee80220f83b6992bc5e104d">RecursiveLock_TryLock</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
+<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment"></span></div>
+<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="comment">/**</span></div>
+<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment"> * @brief Unlocks a recursive lock.</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="comment"> * @param lock Pointer to the lock.</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="comment"> */</span></div>
+<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keywordtype">void</span> <a class="code" href="synchronization_8h.html#a529b21c4a974abeea24b1dcceb75cf62">RecursiveLock_Unlock</a>(<a class="code" href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a>* lock);</div>
<div class="ttc" id="synchronization_8h_html_a81f625fde46405c1d539b1581d54fb05"><div class="ttname"><a href="synchronization_8h.html#a81f625fde46405c1d539b1581d54fb05">LightLock_Init</a></div><div class="ttdeci">void LightLock_Init(LightLock *lock)</div><div class="ttdoc">Initializes a light lock. </div></div>
+<div class="ttc" id="types_8h_html_ab6d744c6b5de129f12937e482dc674fb"><div class="ttname"><a href="types_8h.html#ab6d744c6b5de129f12937e482dc674fb">Handle</a></div><div class="ttdeci">u32 Handle</div><div class="ttdoc">Resource handle. </div><div class="ttdef"><b>Definition:</b> types.h:41</div></div>
<div class="ttc" id="synchronization_8h_html_ae161b0db2ef331125217c64729e18179"><div class="ttname"><a href="synchronization_8h.html#ae161b0db2ef331125217c64729e18179">RecursiveLock</a></div><div class="ttdeci">_LOCK_RECURSIVE_T RecursiveLock</div><div class="ttdoc">A recursive lock. </div><div class="ttdef"><b>Definition:</b> synchronization.h:12</div></div>
<div class="ttc" id="synchronization_8h_html_a1bbbe87bf212a32850ac9f0b6aa73408"><div class="ttname"><a href="synchronization_8h.html#a1bbbe87bf212a32850ac9f0b6aa73408">RecursiveLock_Init</a></div><div class="ttdeci">void RecursiveLock_Init(RecursiveLock *lock)</div><div class="ttdoc">Initializes a recursive lock. </div></div>
<div class="ttc" id="synchronization_8h_html_a4f5f4fd74aae52a2310fb2c6a5983e4d"><div class="ttname"><a href="synchronization_8h.html#a4f5f4fd74aae52a2310fb2c6a5983e4d">__dsb</a></div><div class="ttdeci">static void __dsb(void)</div><div class="ttdoc">Performs a Data Synchronization Barrier operation. </div><div class="ttdef"><b>Definition:</b> synchronization.h:15</div></div>
<div class="ttc" id="synchronization_8h_html_a1a1d677c021a8487d567f832dea9d9db"><div class="ttname"><a href="synchronization_8h.html#a1a1d677c021a8487d567f832dea9d9db">LightLock_TryLock</a></div><div class="ttdeci">int LightLock_TryLock(LightLock *lock)</div><div class="ttdoc">Attempts to lock a light lock. </div></div>
<div class="ttc" id="synchronization_8h_html_afea61e6ff137d96934bb145d44095ccb"><div class="ttname"><a href="synchronization_8h.html#afea61e6ff137d96934bb145d44095ccb">RecursiveLock_Lock</a></div><div class="ttdeci">void RecursiveLock_Lock(RecursiveLock *lock)</div><div class="ttdoc">Locks a recursive lock. </div></div>
<div class="ttc" id="synchronization_8h_html_a8808924fdee80220f83b6992bc5e104d"><div class="ttname"><a href="synchronization_8h.html#a8808924fdee80220f83b6992bc5e104d">RecursiveLock_TryLock</a></div><div class="ttdeci">int RecursiveLock_TryLock(RecursiveLock *lock)</div><div class="ttdoc">Attempts to lock a recursive lock. </div></div>
+<div class="ttc" id="synchronization_8h_html_abfc0f49f74fdd98c039a670ecacd23de"><div class="ttname"><a href="synchronization_8h.html#abfc0f49f74fdd98c039a670ecacd23de">__sync_get_arbiter</a></div><div class="ttdeci">Handle __sync_get_arbiter(void)</div><div class="ttdoc">Retrieves the synchronization subsystem's address arbiter handle. </div></div>
<div class="ttc" id="synchronization_8h_html_a82283ae772ec2eac3a193b1431a681af"><div class="ttname"><a href="synchronization_8h.html#a82283ae772ec2eac3a193b1431a681af">LightLock_Unlock</a></div><div class="ttdeci">void LightLock_Unlock(LightLock *lock)</div><div class="ttdoc">Unlocks a light lock. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The allocated buffer. </dd></dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a1">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a1">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a1">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a867318cde93cdd997588d6dcbfc584e1"></a>
</table>
</dd>
</dl>
-<dl><dt><b>Examples: </b></dt><dd><a class="el" href="graphics_2gpu_2geoshader_2source_2main_8c-example.html#a6">graphics/gpu/geoshader/source/main.c</a>, <a class="el" href="graphics_2gpu_2simple_tri_2source_2main_8c-example.html#a6">graphics/gpu/simple_tri/source/main.c</a>, and <a class="el" href="graphics_2gpu_2textured_cube_2source_2main_8c-example.html#a6">graphics/gpu/textured_cube/source/main.c</a>.</dd>
-</dl>
+
</div>
</div>
<a class="anchor" id="a0d6d17e0944fd2303b7bb6c8da5ecef6"></a>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libctru
-  <span id="projectnumber">v1.0.0</span>
+  <span id="projectnumber">v1.1.0</span>
</div>
</td>
</tr>