153 lines
15 KiB
HTML
153 lines
15 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>SDL Utility: C:/Users/Robert/source/repos/SDLU/include/graphics/RenderTarget.hpp Source File</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="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.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">SDL Utility
|
|
</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&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&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>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('_render_target_8hpp_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- 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">RenderTarget.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="_render_target_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#pragma once</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <chrono></span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>  </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="_color_8hpp.html">structures/Color.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="_drawable_8hpp.html">graphics/drawable/Drawable.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  </div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="keyword">struct </span>SDL_Window;</div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">struct </span>SDL_Surface;</div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  </div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <a class="code" href="_util_8hpp.html#ad0494d8896dbc587136819e261afdc91">SDLU_BEGIN</a></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_render_target.html"> 21</a></span> <span class="keyword">class </span><a class="code" href="class_render_target.html">RenderTarget</a></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> {</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_render_target.html#a1c07261ebc98a3df5614bb888e89d4df"> 24</a></span>  <span class="keyword">virtual</span> <a class="code" href="class_render_target.html#a1c07261ebc98a3df5614bb888e89d4df">~RenderTarget</a>();</div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  </div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_render_target.html#af791541da67f68df05c3cab09847ac0f"> 31</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_render_target.html#af791541da67f68df05c3cab09847ac0f">Clear</a>(<span class="keyword">const</span> <a class="code" href="struct_color.html">Color</a>& color = <a class="code" href="struct_color.html#abfda8f6d25cb1b8ddbf029624bf879dd">Color::Black</a>);</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_render_target.html#a1a3c1960de17ee0bc6c9802522ca43f3"> 38</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_render_target.html#a1a3c1960de17ee0bc6c9802522ca43f3">Draw</a>(<span class="keyword">const</span> <a class="code" href="class_drawable.html">Drawable</a>& drawable);</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_render_target.html#abc1f4a4f3b8976cdfd3f7db43869eca9"> 43</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_render_target.html#abc1f4a4f3b8976cdfd3f7db43869eca9">Display</a>();</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_render_target.html#a20c60b9fd9dc7572c432a52a115de13c"> 54</a></span>  <span class="keywordtype">void</span> <a class="code" href="class_render_target.html#a20c60b9fd9dc7572c432a52a115de13c">SetMaxFramerate</a>(<a class="code" href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a> max);</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  </div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="class_render_target.html#afcbabdc636f3175dea0ffb28952197c3"> 62</a></span>  <a class="code" href="class_render_target.html#afcbabdc636f3175dea0ffb28952197c3">RenderTarget</a>(SDL_Window* target);</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  </div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="class_render_target.html#a3f10a829b1882c62469333b116511bc1"> 69</a></span>  <a class="code" href="class_render_target.html#a3f10a829b1882c62469333b116511bc1">RenderTarget</a>(SDL_Surface* target);</div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="class_render_target.html#a8d9f84514352b098dc9ee7b5eae59ff8"> 72</a></span>  SDL_Renderer* <a class="code" href="class_render_target.html#a8d9f84514352b098dc9ee7b5eae59ff8">renderer</a>; </div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  </div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a> m_oFramerate; </div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  </div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  std::chrono::steady_clock::time_point m_oTimeSinceLastDisplay; </div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> };</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> SDLU_END</div>
|
|
<div class="ttc" id="a_color_8hpp_html"><div class="ttname"><a href="_color_8hpp.html">Color.hpp</a></div><div class="ttdoc">Provides utility for creating and handling colors.</div></div>
|
|
<div class="ttc" id="a_drawable_8hpp_html"><div class="ttname"><a href="_drawable_8hpp.html">Drawable.hpp</a></div><div class="ttdoc">The base class of everything renderable by RenderTarget.</div></div>
|
|
<div class="ttc" id="a_util_8hpp_html_ad0494d8896dbc587136819e261afdc91"><div class="ttname"><a href="_util_8hpp.html#ad0494d8896dbc587136819e261afdc91">SDLU_BEGIN</a></div><div class="ttdeci">#define SDLU_BEGIN</div><div class="ttdef"><b>Definition:</b> Util.hpp:32</div></div>
|
|
<div class="ttc" id="a_util_8hpp_html_add440eff171ea5f55cb00c4a9ab8672d"><div class="ttname"><a href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a></div><div class="ttdeci">uint32_t Uint32</div><div class="ttdef"><b>Definition:</b> Util.hpp:23</div></div>
|
|
<div class="ttc" id="aclass_drawable_html"><div class="ttname"><a href="class_drawable.html">Drawable</a></div><div class="ttdoc">Everything that can be rendered derives from this class.</div><div class="ttdef"><b>Definition:</b> Drawable.hpp:18</div></div>
|
|
<div class="ttc" id="aclass_render_target_html"><div class="ttname"><a href="class_render_target.html">RenderTarget</a></div><div class="ttdoc">Acts as a wrapper for SDL_Renderer*. You can't (and shouldn't) instantiate this, but rather derive fr...</div><div class="ttdef"><b>Definition:</b> RenderTarget.hpp:22</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_a1a3c1960de17ee0bc6c9802522ca43f3"><div class="ttname"><a href="class_render_target.html#a1a3c1960de17ee0bc6c9802522ca43f3">RenderTarget::Draw</a></div><div class="ttdeci">void Draw(const Drawable &drawable)</div><div class="ttdoc">Draws a sdlu::Drawable to the SDL_Renderer.</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_a1c07261ebc98a3df5614bb888e89d4df"><div class="ttname"><a href="class_render_target.html#a1c07261ebc98a3df5614bb888e89d4df">RenderTarget::~RenderTarget</a></div><div class="ttdeci">virtual ~RenderTarget()</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_a20c60b9fd9dc7572c432a52a115de13c"><div class="ttname"><a href="class_render_target.html#a20c60b9fd9dc7572c432a52a115de13c">RenderTarget::SetMaxFramerate</a></div><div class="ttdeci">void SetMaxFramerate(Uint32 max)</div><div class="ttdoc">Sets a maximum framerate on the display function.</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_a3f10a829b1882c62469333b116511bc1"><div class="ttname"><a href="class_render_target.html#a3f10a829b1882c62469333b116511bc1">RenderTarget::RenderTarget</a></div><div class="ttdeci">RenderTarget(SDL_Surface *target)</div><div class="ttdoc">Create Renderer and bind it to a texture.</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_a8d9f84514352b098dc9ee7b5eae59ff8"><div class="ttname"><a href="class_render_target.html#a8d9f84514352b098dc9ee7b5eae59ff8">RenderTarget::renderer</a></div><div class="ttdeci">SDL_Renderer * renderer</div><div class="ttdoc">The renderer object.</div><div class="ttdef"><b>Definition:</b> RenderTarget.hpp:72</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_abc1f4a4f3b8976cdfd3f7db43869eca9"><div class="ttname"><a href="class_render_target.html#abc1f4a4f3b8976cdfd3f7db43869eca9">RenderTarget::Display</a></div><div class="ttdeci">void Display()</div><div class="ttdoc">Display the current state of the renderer to the screen.</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_af791541da67f68df05c3cab09847ac0f"><div class="ttname"><a href="class_render_target.html#af791541da67f68df05c3cab09847ac0f">RenderTarget::Clear</a></div><div class="ttdeci">void Clear(const Color &color=Color::Black)</div><div class="ttdoc">Clears the display.</div></div>
|
|
<div class="ttc" id="aclass_render_target_html_afcbabdc636f3175dea0ffb28952197c3"><div class="ttname"><a href="class_render_target.html#afcbabdc636f3175dea0ffb28952197c3">RenderTarget::RenderTarget</a></div><div class="ttdeci">RenderTarget(SDL_Window *target)</div><div class="ttdoc">Create Renderer and bind it to a window.</div></div>
|
|
<div class="ttc" id="astruct_color_html"><div class="ttname"><a href="struct_color.html">Color</a></div><div class="ttdoc">A structure holding color data.</div><div class="ttdef"><b>Definition:</b> Color.hpp:20</div></div>
|
|
<div class="ttc" id="astruct_color_html_abfda8f6d25cb1b8ddbf029624bf879dd"><div class="ttname"><a href="struct_color.html#abfda8f6d25cb1b8ddbf029624bf879dd">Color::Black</a></div><div class="ttdeci">static const Color Black</div><div class="ttdoc">Default Color Black (#000000FF)</div><div class="ttdef"><b>Definition:</b> Color.hpp:65</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_c17ed8a99c2aafc6034c524ffcf900dc.html">graphics</a></li><li class="navelem"><a class="el" href="_render_target_8hpp.html">RenderTarget.hpp</a></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|