libctru/gfx_8h.html
2024-11-03 20:36:34 +00:00

715 lines
60 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libctru: include/3ds/gfx.h File Reference</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>
<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
&#160;<span id="projectnumber">v2.4.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- 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 id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d475325f6a9fe3bfc3a495c72a9e475e.html">3ds</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> </div>
<div class="headertitle">
<div class="title">gfx.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Simple framebuffer API.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="types_8h_source.html">3ds/types.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="gspgpu_8h_source.html">3ds/services/gspgpu.h</a>&gt;</code><br />
</div>
<p><a href="gfx_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ab2ed36b98652f54ec3e1fdc8a31c8b13"><td class="memItemLeft" align="right" valign="top"><a id="ab2ed36b98652f54ec3e1fdc8a31c8b13"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#ab2ed36b98652f54ec3e1fdc8a31c8b13">RGB565</a>(r, g, b)&#160;&#160;&#160;(((b)&amp;0x1f)|(((g)&amp;0x3f)&lt;&lt;5)|(((r)&amp;0x1f)&lt;&lt;11))</td></tr>
<tr class="memdesc:ab2ed36b98652f54ec3e1fdc8a31c8b13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts red, green, and blue components to packed RGB565. <br /></td></tr>
<tr class="separator:ab2ed36b98652f54ec3e1fdc8a31c8b13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3ef2df7649f8793a88e87e345749bfc"><td class="memItemLeft" align="right" valign="top"><a id="ab3ef2df7649f8793a88e87e345749bfc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#ab3ef2df7649f8793a88e87e345749bfc">RGB8_to_565</a>(r, g, b)&#160;&#160;&#160;(((b)&gt;&gt;3)&amp;0x1f)|((((g)&gt;&gt;2)&amp;0x3f)&lt;&lt;5)|((((r)&gt;&gt;3)&amp;0x1f)&lt;&lt;11)</td></tr>
<tr class="memdesc:ab3ef2df7649f8793a88e87e345749bfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts packed RGB8 to packed RGB565. <br /></td></tr>
<tr class="separator:ab3ef2df7649f8793a88e87e345749bfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a356112d87f5cf6bbba3ea3b6b010e09c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> { <br />
&#160;&#160;<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a> = GSP_SCREEN_TOP
, <br />
&#160;&#160;<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541">GFX_BOTTOM</a> = GSP_SCREEN_BOTTOM
<br />
}</td></tr>
<tr class="memdesc:a356112d87f5cf6bbba3ea3b6b010e09c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Screen IDs. <a href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">More...</a><br /></td></tr>
<tr class="separator:a356112d87f5cf6bbba3ea3b6b010e09c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9bacc1d598f0f6e4d5ef8bbeb466b03"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a> { <br />
&#160;&#160;<a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a> = 0
, <br />
&#160;&#160;<a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1e16d704e9b5a318e3f73aaaba2f38f9">GFX_RIGHT</a> = 1
<br />
}</td></tr>
<tr class="memdesc:ab9bacc1d598f0f6e4d5ef8bbeb466b03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Top screen framebuffer side. <a href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">More...</a><br /></td></tr>
<tr class="separator:ab9bacc1d598f0f6e4d5ef8bbeb466b03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Initialization and deinitialization</div></td></tr>
<tr class="memitem:a236a005ae029247c8bfe4a4a649206fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">gfxInitDefault</a> (void)</td></tr>
<tr class="memdesc:a236a005ae029247c8bfe4a4a649206fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the LCD framebuffers with default parameters This is equivalent to calling: <a href="gfx_8h.html#a236a005ae029247c8bfe4a4a649206fc">More...</a><br /></td></tr>
<tr class="separator:a236a005ae029247c8bfe4a4a649206fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1364b0796016b3b87ce005c7d3199519"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a1364b0796016b3b87ce005c7d3199519">gfxInit</a> (<a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a> topFormat, <a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a> bottomFormat, bool vrambuffers)</td></tr>
<tr class="memdesc:a1364b0796016b3b87ce005c7d3199519"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the LCD framebuffers. <a href="gfx_8h.html#a1364b0796016b3b87ce005c7d3199519">More...</a><br /></td></tr>
<tr class="separator:a1364b0796016b3b87ce005c7d3199519"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa446ccfdfdd4c575e648956ae96f2a3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">gfxExit</a> (void)</td></tr>
<tr class="memdesc:aa446ccfdfdd4c575e648956ae96f2a3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deinitializes and frees the LCD framebuffers. <a href="gfx_8h.html#aa446ccfdfdd4c575e648956ae96f2a3b">More...</a><br /></td></tr>
<tr class="separator:aa446ccfdfdd4c575e648956ae96f2a3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Control</div></td></tr>
<tr class="memitem:a7b5743ba9ce490263b12d1575af7ebc1"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td><td class="mdescRight">Enables or disables the 3D stereoscopic effect on the top screen. <a href="gfx_8h.html#a7b5743ba9ce490263b12d1575af7ebc1">More...</a><br /></td></tr>
<tr class="separator:a7b5743ba9ce490263b12d1575af7ebc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07c2e95d490e338a8b87030124f58a60"><td class="memItemLeft" align="right" valign="top">bool&#160;</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">&#160;</td><td class="mdescRight">Retrieves the status of the 3D stereoscopic effect on the top screen. <a href="gfx_8h.html#a07c2e95d490e338a8b87030124f58a60">More...</a><br /></td></tr>
<tr class="separator:a07c2e95d490e338a8b87030124f58a60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb8f7a90724f6f11a93c776fffea7891"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#adb8f7a90724f6f11a93c776fffea7891">gfxIsWide</a> (void)</td></tr>
<tr class="memdesc:adb8f7a90724f6f11a93c776fffea7891"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the status of the 800px (double-height) high resolution display mode of the top screen. <a href="gfx_8h.html#adb8f7a90724f6f11a93c776fffea7891">More...</a><br /></td></tr>
<tr class="separator:adb8f7a90724f6f11a93c776fffea7891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ffe33f6b3e9a61ee916997fc6cf6ace"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a1ffe33f6b3e9a61ee916997fc6cf6ace">gfxSetWide</a> (bool enable)</td></tr>
<tr class="memdesc:a1ffe33f6b3e9a61ee916997fc6cf6ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables the 800px (double-height) high resolution display mode of the top screen. <a href="gfx_8h.html#a1ffe33f6b3e9a61ee916997fc6cf6ace">More...</a><br /></td></tr>
<tr class="separator:a1ffe33f6b3e9a61ee916997fc6cf6ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8bc89eb1ea35a06bfb0c3e1ffbf2996"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#ab8bc89eb1ea35a06bfb0c3e1ffbf2996">gfxSetScreenFormat</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a> format)</td></tr>
<tr class="memdesc:ab8bc89eb1ea35a06bfb0c3e1ffbf2996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the pixel format of a screen. <a href="gfx_8h.html#ab8bc89eb1ea35a06bfb0c3e1ffbf2996">More...</a><br /></td></tr>
<tr class="separator:ab8bc89eb1ea35a06bfb0c3e1ffbf2996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a345889c5df83e483536afebd7edf04ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a345889c5df83e483536afebd7edf04ef">gfxGetScreenFormat</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen)</td></tr>
<tr class="memdesc:a345889c5df83e483536afebd7edf04ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the current pixel format of a screen. <a href="gfx_8h.html#a345889c5df83e483536afebd7edf04ef">More...</a><br /></td></tr>
<tr class="separator:a345889c5df83e483536afebd7edf04ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f57f3b6f2e6817c6457d005887fa128"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a9f57f3b6f2e6817c6457d005887fa128">gfxSetDoubleBuffering</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, bool enable)</td></tr>
<tr class="memdesc:a9f57f3b6f2e6817c6457d005887fa128"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables or disables double buffering on a screen. <a href="gfx_8h.html#a9f57f3b6f2e6817c6457d005887fa128">More...</a><br /></td></tr>
<tr class="separator:a9f57f3b6f2e6817c6457d005887fa128"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Rendering and presentation</div></td></tr>
<tr class="memitem:a332447352568e250a75397a1b2e452db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a332447352568e250a75397a1b2e452db">gfxGetFramebuffer</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> screen, <a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a> side, <a class="el" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> *width, <a class="el" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> *height)</td></tr>
<tr class="memdesc:a332447352568e250a75397a1b2e452db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the framebuffer of the specified screen to which graphics should be rendered. <a href="gfx_8h.html#a332447352568e250a75397a1b2e452db">More...</a><br /></td></tr>
<tr class="separator:a332447352568e250a75397a1b2e452db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea1808bd74fe0c00f9794e455fc8499b"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td><td class="mdescRight">Flushes the data cache for the current framebuffers. <a href="gfx_8h.html#aea1808bd74fe0c00f9794e455fc8499b">More...</a><br /></td></tr>
<tr class="separator:aea1808bd74fe0c00f9794e455fc8499b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d7f8afcf19ad7bb6f4c4f76dbd3fec6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> scr, bool hasStereo)</td></tr>
<tr class="memdesc:a9d7f8afcf19ad7bb6f4c4f76dbd3fec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the configuration of the specified screen, swapping the buffers if double buffering is enabled. <a href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">More...</a><br /></td></tr>
<tr class="separator:a9d7f8afcf19ad7bb6f4c4f76dbd3fec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac9ec0b0caf3a9f8c7c58905f81786d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="types_8h.html#a22a95c6b9c6cb449bd02bf919f01896f">CTR_DEPRECATED</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#aac9ec0b0caf3a9f8c7c58905f81786d3">gfxConfigScreen</a> (<a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a> scr, bool immediate)</td></tr>
<tr class="memdesc:aac9ec0b0caf3a9f8c7c58905f81786d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <a class="el" href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a>, but with hasStereo set to true. <a href="gfx_8h.html#aac9ec0b0caf3a9f8c7c58905f81786d3">More...</a><br /></td></tr>
<tr class="separator:aac9ec0b0caf3a9f8c7c58905f81786d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f338920111994110975dc0d1360bb1f"><td class="memItemLeft" align="right" valign="top">void&#160;</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">&#160;</td><td class="mdescRight">Updates the configuration of both screens. <a href="gfx_8h.html#a0f338920111994110975dc0d1360bb1f">More...</a><br /></td></tr>
<tr class="separator:a0f338920111994110975dc0d1360bb1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3306df28835a647734cf8e299f041527"><td class="memItemLeft" align="right" valign="top"><a id="a3306df28835a647734cf8e299f041527"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gfx_8h.html#a3306df28835a647734cf8e299f041527">gfxSwapBuffersGpu</a> (void)</td></tr>
<tr class="memdesc:a3306df28835a647734cf8e299f041527"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as <a class="el" href="gfx_8h.html#a0f338920111994110975dc0d1360bb1f">gfxSwapBuffers</a> (formerly different). <br /></td></tr>
<tr class="separator:a3306df28835a647734cf8e299f041527"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Simple framebuffer API. </p>
<p>This API provides basic functionality needed to bring up framebuffers for both screens, as well as managing display mode (stereoscopic 3D) and double buffering. It is mainly an abstraction over the gsp service.</p>
<p>Please note that the 3DS uses <em>portrait</em> screens rotated 90 degrees counterclockwise. Width/height refer to the physical dimensions of the screen; that is, the top screen is 240 pixels wide and 400 pixels tall; while the bottom screen is 240x320. </p>
</div><h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ab9bacc1d598f0f6e4d5ef8bbeb466b03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9bacc1d598f0f6e4d5ef8bbeb466b03">&#9670;&nbsp;</a></span>gfx3dSide_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Top screen framebuffer side. </p>
<p>This is only meaningful when stereoscopic 3D is enabled on the top screen. In any other case, use <a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1"></a>GFX_LEFT&#160;</td><td class="fielddoc"><p>Left eye framebuffer. </p>
</td></tr>
<tr><td class="fieldname"><a id="ab9bacc1d598f0f6e4d5ef8bbeb466b03a1e16d704e9b5a318e3f73aaaba2f38f9"></a>GFX_RIGHT&#160;</td><td class="fielddoc"><p>Right eye framebuffer. </p>
</td></tr>
</table>
</div>
</div>
<a id="a356112d87f5cf6bbba3ea3b6b010e09c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a356112d87f5cf6bbba3ea3b6b010e09c">&#9670;&nbsp;</a></span>gfxScreen_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Screen IDs. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09"></a>GFX_TOP&#160;</td><td class="fielddoc"><p>Top screen. </p>
</td></tr>
<tr><td class="fieldname"><a id="a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541"></a>GFX_BOTTOM&#160;</td><td class="fielddoc"><p>Bottom screen. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="aac9ec0b0caf3a9f8c7c58905f81786d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac9ec0b0caf3a9f8c7c58905f81786d3">&#9670;&nbsp;</a></span>gfxConfigScreen()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="types_8h.html#a22a95c6b9c6cb449bd02bf919f01896f">CTR_DEPRECATED</a> void gfxConfigScreen </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>&#160;</td>
<td class="paramname"><em>scr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>immediate</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Same as <a class="el" href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a>, but with hasStereo set to true. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">scr</td><td>Screen ID (see <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>) </td></tr>
<tr><td class="paramname">immediate</td><td>This parameter no longer has any effect and is thus ignored. </td></tr>
</table>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>This function has been superseded by <a class="el" href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a>, please use that instead. </dd></dl>
</div>
</div>
<a id="aa446ccfdfdd4c575e648956ae96f2a3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa446ccfdfdd4c575e648956ae96f2a3b">&#9670;&nbsp;</a></span>gfxExit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxExit </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deinitializes and frees the LCD framebuffers. </p>
<dl class="section note"><dt>Note</dt><dd>This function internally calls <a class="el" href="gspgpu_8h.html#a1de71253d8f3e3ea0f504ab6cc621f98">gspExit</a>. </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a11">app_launch/source/main.c</a>, <a class="el" href="audio_2filters_2source_2main_8c-example.html#a37">audio/filters/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="audio_2streaming_2source_2main_8c-example.html#a29">audio/streaming/source/main.c</a>, <a class="el" href="camera_2image_2source_2main_8c-example.html#a8">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a8">camera/video/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_2both_screens_2source_2main_8c-example.html#a27">graphics/gpu/both_screens/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#a15">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_2lenny_2source_2main_8c-example.html#a36">graphics/gpu/lenny/source/main.c</a>, <a class="el" href="graphics_2gpu_2loop_subdivision_2source_2main_8c-example.html#a36">graphics/gpu/loop_subdivision/source/main.c</a>, <a class="el" href="graphics_2gpu_2mipmap_fog_2source_2main_8c-example.html#a33">graphics/gpu/mipmap_fog/source/main.c</a>, <a class="el" href="graphics_2gpu_2particles_2source_2main_8c-example.html#a54">graphics/gpu/particles/source/main.c</a>, <a class="el" href="graphics_2gpu_2proctex_2source_2main_8c-example.html#a31">graphics/gpu/proctex/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#a31">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2gpu_2toon_shading_2source_2main_8c-example.html#a40">graphics/gpu/toon_shading/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="graphics_2printing_2system-font_2source_2main_8c-example.html#a12">graphics/printing/system-font/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_2software-keyboard_2source_2main_8c-example.html#a62">input/software-keyboard/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#a27">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a45">mvd/source/main.c</a>, <a class="el" href="network_2boss_2source_2main_8c-example.html#a28">network/boss/source/main.c</a>, <a class="el" href="network_2http_2source_2main_8c-example.html#a27">network/http/source/main.c</a>, <a class="el" href="network_2http_post_2source_2main_8c-example.html#a25">network/http_post/source/main.c</a>, <a class="el" href="network_2sockets_2source_2sockets_8c-example.html#a4">network/sockets/source/sockets.c</a>, <a class="el" href="network_2sslc_2source_2ssl_8c-example.html#a24">network/sslc/source/ssl.c</a>, <a class="el" href="network_2uds_2source_2uds_8c-example.html#a66">network/uds/source/uds.c</a>, <a class="el" href="nfc_2source_2main_8c-example.html#a44">nfc/source/main.c</a>, <a class="el" href="romfs_2source_2main_8c-example.html#a10">romfs/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>
<a id="aea1808bd74fe0c00f9794e455fc8499b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea1808bd74fe0c00f9794e455fc8499b">&#9670;&nbsp;</a></span>gfxFlushBuffers()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxFlushBuffers </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Flushes the data cache for the current framebuffers. </p>
<dl class="section warning"><dt>Warning</dt><dd>This is <b>only used during software rendering</b>. Since this function has significant overhead, it is preferred to call this only once per frame, after all software rendering is completed. </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="audio_2filters_2source_2main_8c-example.html#a19">audio/filters/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a28">audio/mic/source/main.c</a>, <a class="el" href="audio_2streaming_2source_2main_8c-example.html#a19">audio/streaming/source/main.c</a>, <a class="el" href="camera_2image_2source_2main_8c-example.html#a44">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a48">camera/video/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a9">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a11">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a10">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a7">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a7">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a10">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a15">input/read-controls/source/main.c</a>, <a class="el" href="input_2software-keyboard_2source_2main_8c-example.html#a59">input/software-keyboard/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a11">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a9">libapplet_launch/source/main.c</a>, <a class="el" href="mvd_2source_2main_8c-example.html#a13">mvd/source/main.c</a>, <a class="el" href="network_2boss_2source_2main_8c-example.html#a26">network/boss/source/main.c</a>, <a class="el" href="network_2http_2source_2main_8c-example.html#a15">network/http/source/main.c</a>, <a class="el" href="network_2http_post_2source_2main_8c-example.html#a13">network/http_post/source/main.c</a>, <a class="el" href="network_2sslc_2source_2ssl_8c-example.html#a22">network/sslc/source/ssl.c</a>, <a class="el" href="network_2uds_2source_2uds_8c-example.html#a64">network/uds/source/uds.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a15">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a13">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a7">time/rtc/source/main.c</a>.</dd>
</dl>
</div>
</div>
<a id="a332447352568e250a75397a1b2e452db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a332447352568e250a75397a1b2e452db">&#9670;&nbsp;</a></span>gfxGetFramebuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="types_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a>* gfxGetFramebuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>&#160;</td>
<td class="paramname"><em>screen</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a>&#160;</td>
<td class="paramname"><em>side</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> *&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="types_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> *&#160;</td>
<td class="paramname"><em>height</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the framebuffer of the specified screen to which graphics should be rendered. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">screen</td><td>Screen ID (see <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>) </td></tr>
<tr><td class="paramname">side</td><td>Framebuffer side (see <a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03">gfx3dSide_t</a>) (pass <a class="el" href="gfx_8h.html#ab9bacc1d598f0f6e4d5ef8bbeb466b03a1bfda6a35adc49eb4631246ea4e637e1">GFX_LEFT</a> if not using stereoscopic 3D) </td></tr>
<tr><td class="paramname">width</td><td>Pointer that will hold the width of the framebuffer in pixels. </td></tr>
<tr><td class="paramname">height</td><td>Pointer that will hold the height of the framebuffer in pixels. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the current framebuffer of the chosen screen.</dd></dl>
<p>Please remember that the returned pointer will change every frame if double buffering is enabled. </p>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="camera_2image_2source_2main_8c-example.html#a0">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a0">camera/video/source/main.c</a>, <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="mvd_2source_2main_8c-example.html#a0">mvd/source/main.c</a>, <a class="el" href="network_2http_2source_2main_8c-example.html#a12">network/http/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>
<a id="a345889c5df83e483536afebd7edf04ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a345889c5df83e483536afebd7edf04ef">&#9670;&nbsp;</a></span>gfxGetScreenFormat()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a> gfxGetScreenFormat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>&#160;</td>
<td class="paramname"><em>screen</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the current pixel format of a screen. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">screen</td><td>Screen ID (see <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pixel format (see <a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a>) </dd></dl>
</div>
</div>
<a id="a1364b0796016b3b87ce005c7d3199519"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1364b0796016b3b87ce005c7d3199519">&#9670;&nbsp;</a></span>gfxInit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxInit </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a>&#160;</td>
<td class="paramname"><em>topFormat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a>&#160;</td>
<td class="paramname"><em>bottomFormat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>vrambuffers</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the LCD framebuffers. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">topFormat</td><td>The format of the top screen framebuffers. </td></tr>
<tr><td class="paramname">bottomFormat</td><td>The format of the bottom screen framebuffers. </td></tr>
<tr><td class="paramname">vramBuffers</td><td>Whether to allocate the framebuffers in VRAM.</td></tr>
</table>
</dd>
</dl>
<p>This function allocates memory for the framebuffers in the specified memory region. Initially, stereoscopic 3D is disabled and double buffering is enabled.</p>
<dl class="section note"><dt>Note</dt><dd>This function internally calls <a class="el" href="gspgpu_8h.html#a0156b0b24d27e1e93f6c92e75c1addd3">gspInit</a>. </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="mvd_2source_2main_8c-example.html#a32">mvd/source/main.c</a>.</dd>
</dl>
</div>
</div>
<a id="a236a005ae029247c8bfe4a4a649206fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a236a005ae029247c8bfe4a4a649206fc">&#9670;&nbsp;</a></span>gfxInitDefault()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxInitDefault </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initializes the LCD framebuffers with default parameters This is equivalent to calling: </p>
<div class="fragment"><div class="line"><a class="code" href="gfx_8h.html#a1364b0796016b3b87ce005c7d3199519">gfxInit</a>(<a class="code" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36ba7e2e54f5d000504cd971d23bf2d2b58f">GSP_BGR8_OES</a>,<a class="code" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36ba7e2e54f5d000504cd971d23bf2d2b58f">GSP_BGR8_OES</a>,<span class="keyword">false</span>); </div>
<div class="ttc" id="agfx_8h_html_a1364b0796016b3b87ce005c7d3199519"><div class="ttname"><a href="gfx_8h.html#a1364b0796016b3b87ce005c7d3199519">gfxInit</a></div><div class="ttdeci">void gfxInit(GSPGPU_FramebufferFormat topFormat, GSPGPU_FramebufferFormat bottomFormat, bool vrambuffers)</div><div class="ttdoc">Initializes the LCD framebuffers.</div></div>
<div class="ttc" id="agspgpu_8h_html_ade9eea08a2ad835b9c5d0f7a9164f36ba7e2e54f5d000504cd971d23bf2d2b58f"><div class="ttname"><a href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36ba7e2e54f5d000504cd971d23bf2d2b58f">GSP_BGR8_OES</a></div><div class="ttdeci">@ GSP_BGR8_OES</div><div class="ttdoc">BGR8. (3 bytes)</div><div class="ttdef"><b>Definition:</b> gspgpu.h:30</div></div>
</div><!-- fragment --> <dl class="section examples"><dt>Examples</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_2filters_2source_2main_8c-example.html#a1">audio/filters/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="audio_2streaming_2source_2main_8c-example.html#a2">audio/streaming/source/main.c</a>, <a class="el" href="camera_2image_2source_2main_8c-example.html#a30">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a30">camera/video/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_2both_screens_2source_2main_8c-example.html#a17">graphics/gpu/both_screens/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#a1">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_2lenny_2source_2main_8c-example.html#a20">graphics/gpu/lenny/source/main.c</a>, <a class="el" href="graphics_2gpu_2loop_subdivision_2source_2main_8c-example.html#a25">graphics/gpu/loop_subdivision/source/main.c</a>, <a class="el" href="graphics_2gpu_2mipmap_fog_2source_2main_8c-example.html#a22">graphics/gpu/mipmap_fog/source/main.c</a>, <a class="el" href="graphics_2gpu_2particles_2source_2main_8c-example.html#a33">graphics/gpu/particles/source/main.c</a>, <a class="el" href="graphics_2gpu_2proctex_2source_2main_8c-example.html#a20">graphics/gpu/proctex/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#a22">graphics/gpu/textured_cube/source/main.c</a>, <a class="el" href="graphics_2gpu_2toon_shading_2source_2main_8c-example.html#a24">graphics/gpu/toon_shading/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="graphics_2printing_2system-font_2source_2main_8c-example.html#a0">graphics/printing/system-font/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_2software-keyboard_2source_2main_8c-example.html#a3">input/software-keyboard/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="network_2boss_2source_2main_8c-example.html#a18">network/boss/source/main.c</a>, <a class="el" href="network_2http_2source_2main_8c-example.html#a18">network/http/source/main.c</a>, <a class="el" href="network_2http_post_2source_2main_8c-example.html#a15">network/http_post/source/main.c</a>, <a class="el" href="network_2sockets_2source_2sockets_8c-example.html#a3">network/sockets/source/sockets.c</a>, <a class="el" href="network_2sslc_2source_2ssl_8c-example.html#a10">network/sslc/source/ssl.c</a>, <a class="el" href="network_2uds_2source_2uds_8c-example.html#a57">network/uds/source/uds.c</a>, <a class="el" href="nfc_2source_2main_8c-example.html#a36">nfc/source/main.c</a>, <a class="el" href="romfs_2source_2main_8c-example.html#a0">romfs/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 id="a07c2e95d490e338a8b87030124f58a60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07c2e95d490e338a8b87030124f58a60">&#9670;&nbsp;</a></span>gfxIs3D()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool gfxIs3D </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the status of the 3D stereoscopic effect on the top screen. </p>
<dl class="section return"><dt>Returns</dt><dd>true if 3D enabled, false otherwise. </dd></dl>
</div>
</div>
<a id="adb8f7a90724f6f11a93c776fffea7891"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb8f7a90724f6f11a93c776fffea7891">&#9670;&nbsp;</a></span>gfxIsWide()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool gfxIsWide </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieves the status of the 800px (double-height) high resolution display mode of the top screen. </p>
<dl class="section return"><dt>Returns</dt><dd>true if wide mode enabled, false otherwise. </dd></dl>
</div>
</div>
<a id="a9d7f8afcf19ad7bb6f4c4f76dbd3fec6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">&#9670;&nbsp;</a></span>gfxScreenSwapBuffers()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxScreenSwapBuffers </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>&#160;</td>
<td class="paramname"><em>scr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>hasStereo</em>&#160;</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 ID (see <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>) </td></tr>
<tr><td class="paramname">hasStereo</td><td>For the top screen in 3D mode: true if the framebuffer contains individual images for both eyes, or false if the left image should be duplicated to the right eye. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Previously rendered content will be displayed on the screen after the next VBlank. </dd>
<dd>
This function is still useful even if double buffering is disabled, as it must be used to commit configuration changes. </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Only call this once per screen per frame, otherwise graphical glitches will occur since this API does not implement triple buffering. </dd></dl>
</div>
</div>
<a id="a7b5743ba9ce490263b12d1575af7ebc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b5743ba9ce490263b12d1575af7ebc1">&#9670;&nbsp;</a></span>gfxSet3D()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxSet3D </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the 3D stereoscopic effect on the top screen. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">enable</td><td>Pass true to enable, false to disable. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Stereoscopic 3D is disabled by default. </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="camera_2image_2source_2main_8c-example.html#a49">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a53">camera/video/source/main.c</a>, <a class="el" href="graphics_2gpu_2fragment_light_2source_2main_8c-example.html#a21">graphics/gpu/fragment_light/source/main.c</a>, <a class="el" href="graphics_2gpu_2lenny_2source_2main_8c-example.html#a21">graphics/gpu/lenny/source/main.c</a>, <a class="el" href="graphics_2gpu_2particles_2source_2main_8c-example.html#a34">graphics/gpu/particles/source/main.c</a>, and <a class="el" href="graphics_2gpu_2toon_shading_2source_2main_8c-example.html#a25">graphics/gpu/toon_shading/source/main.c</a>.</dd>
</dl>
</div>
</div>
<a id="a9f57f3b6f2e6817c6457d005887fa128"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f57f3b6f2e6817c6457d005887fa128">&#9670;&nbsp;</a></span>gfxSetDoubleBuffering()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxSetDoubleBuffering </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>&#160;</td>
<td class="paramname"><em>screen</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables double buffering on a screen. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">screen</td><td>Screen ID (see <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>) </td></tr>
<tr><td class="paramname">enable</td><td>Pass true to enable, false to disable. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Double buffering is enabled by default. </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="camera_2image_2source_2main_8c-example.html#a32">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a32">camera/video/source/main.c</a>, and <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a3">graphics/bitmap/24bit-color/source/main.c</a>.</dd>
</dl>
</div>
</div>
<a id="ab8bc89eb1ea35a06bfb0c3e1ffbf2996"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8bc89eb1ea35a06bfb0c3e1ffbf2996">&#9670;&nbsp;</a></span>gfxSetScreenFormat()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxSetScreenFormat </td>
<td>(</td>
<td class="paramtype"><a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>&#160;</td>
<td class="paramname"><em>screen</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a>&#160;</td>
<td class="paramname"><em>format</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Changes the pixel format of a screen. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">screen</td><td>Screen ID (see <a class="el" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09c">gfxScreen_t</a>) </td></tr>
<tr><td class="paramname">format</td><td>Pixel format (see <a class="el" href="gspgpu_8h.html#ade9eea08a2ad835b9c5d0f7a9164f36b">GSPGPU_FramebufferFormat</a>) </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If the currently allocated framebuffers are too small for the specified format, they are freed and new ones are reallocated. </dd></dl>
</div>
</div>
<a id="a1ffe33f6b3e9a61ee916997fc6cf6ace"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ffe33f6b3e9a61ee916997fc6cf6ace">&#9670;&nbsp;</a></span>gfxSetWide()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxSetWide </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>enable</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enables or disables the 800px (double-height) high resolution display mode of the top screen. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">enable</td><td>Pass true to enable, false to disable. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Wide mode is disabled by default. </dd>
<dd>
Wide and stereoscopic 3D modes are mutually exclusive. </dd>
<dd>
In wide mode pixels are not square, since scanlines are half as tall as they normally are. </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Wide mode does not work on Old 2DS consoles (however it does work on New 2DS XL consoles). </dd></dl>
</div>
</div>
<a id="a0f338920111994110975dc0d1360bb1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f338920111994110975dc0d1360bb1f">&#9670;&nbsp;</a></span>gfxSwapBuffers()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void gfxSwapBuffers </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Updates the configuration of both screens. </p>
<dl class="section note"><dt>Note</dt><dd>This function is equivalent to:<div class="fragment"><div class="line"><a class="code" href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a>,<span class="keyword">true</span>); <a class="code" href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a>(<a class="code" href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541">GFX_BOTTOM</a>,<span class="keyword">true</span>); </div>
<div class="ttc" id="agfx_8h_html_a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541"><div class="ttname"><a href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09cac1be8c2dee1ab5520b30ba069afa7541">GFX_BOTTOM</a></div><div class="ttdeci">@ GFX_BOTTOM</div><div class="ttdoc">Bottom screen.</div><div class="ttdef"><b>Definition:</b> gfx.h:27</div></div>
<div class="ttc" id="agfx_8h_html_a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09"><div class="ttname"><a href="gfx_8h.html#a356112d87f5cf6bbba3ea3b6b010e09caf9d44178134d07cf9c5923200e14af09">GFX_TOP</a></div><div class="ttdeci">@ GFX_TOP</div><div class="ttdoc">Top screen.</div><div class="ttdef"><b>Definition:</b> gfx.h:26</div></div>
<div class="ttc" id="agfx_8h_html_a9d7f8afcf19ad7bb6f4c4f76dbd3fec6"><div class="ttname"><a href="gfx_8h.html#a9d7f8afcf19ad7bb6f4c4f76dbd3fec6">gfxScreenSwapBuffers</a></div><div class="ttdeci">void gfxScreenSwapBuffers(gfxScreen_t scr, bool hasStereo)</div><div class="ttdoc">Updates the configuration of the specified screen, swapping the buffers if double buffering is enable...</div></div>
</div><!-- fragment --> </dd></dl>
<dl class="section examples"><dt>Examples</dt><dd><a class="el" href="app_launch_2source_2main_8c-example.html#a5">app_launch/source/main.c</a>, <a class="el" href="audio_2filters_2source_2main_8c-example.html#a18">audio/filters/source/main.c</a>, <a class="el" href="audio_2mic_2source_2main_8c-example.html#a29">audio/mic/source/main.c</a>, <a class="el" href="audio_2streaming_2source_2main_8c-example.html#a18">audio/streaming/source/main.c</a>, <a class="el" href="camera_2image_2source_2main_8c-example.html#a46">camera/image/source/main.c</a>, <a class="el" href="camera_2video_2source_2main_8c-example.html#a50">camera/video/source/main.c</a>, <a class="el" href="get_system_language_2source_2main_8c-example.html#a10">get_system_language/source/main.c</a>, <a class="el" href="graphics_2bitmap_224bit-color_2source_2main_8c-example.html#a12">graphics/bitmap/24bit-color/source/main.c</a>, <a class="el" href="graphics_2printing_2both-screen-text_2source_2main_8c-example.html#a11">graphics/printing/both-screen-text/source/main.c</a>, <a class="el" href="graphics_2printing_2colored-text_2source_2main_8c-example.html#a8">graphics/printing/colored-text/source/main.c</a>, <a class="el" href="graphics_2printing_2hello-world_2source_2main_8c-example.html#a8">graphics/printing/hello-world/source/main.c</a>, <a class="el" href="graphics_2printing_2multiple-windows-text_2source_2main_8c-example.html#a11">graphics/printing/multiple-windows-text/source/main.c</a>, <a class="el" href="input_2read-controls_2source_2main_8c-example.html#a16">input/read-controls/source/main.c</a>, <a class="el" href="input_2software-keyboard_2source_2main_8c-example.html#a60">input/software-keyboard/source/main.c</a>, <a class="el" href="input_2touch-screen_2source_2main_8c-example.html#a12">input/touch-screen/source/main.c</a>, <a class="el" href="libapplet_launch_2source_2main_8c-example.html#a5">libapplet_launch/source/main.c</a>, <a class="el" href="network_2boss_2source_2main_8c-example.html#a27">network/boss/source/main.c</a>, <a class="el" href="network_2http_2source_2main_8c-example.html#a16">network/http/source/main.c</a>, <a class="el" href="network_2http_post_2source_2main_8c-example.html#a14">network/http_post/source/main.c</a>, <a class="el" href="network_2sslc_2source_2ssl_8c-example.html#a23">network/sslc/source/ssl.c</a>, <a class="el" href="network_2uds_2source_2uds_8c-example.html#a65">network/uds/source/uds.c</a>, <a class="el" href="threads_2event_2source_2main_8c-example.html#a16">threads/event/source/main.c</a>, <a class="el" href="threads_2thread-basic_2source_2main_8c-example.html#a14">threads/thread-basic/source/main.c</a>, and <a class="el" href="time_2rtc_2source_2main_8c-example.html#a8">time/rtc/source/main.c</a>.</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>