374 lines
18 KiB
HTML
374 lines
18 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: RenderTarget Class 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="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('class_render_target.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="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pro-methods">Protected Member Functions</a> |
|
|
<a href="#pro-attribs">Protected Attributes</a> |
|
|
<a href="class_render_target-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">RenderTarget Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Acts as a wrapper for SDL_Renderer*. You can't (and shouldn't) instantiate this, but rather derive from it.
|
|
<a href="class_render_target.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="_render_target_8hpp_source.html">RenderTarget.hpp</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for RenderTarget:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="class_render_target.png" usemap="#RenderTarget_map" alt=""/>
|
|
<map id="RenderTarget_map" name="RenderTarget_map">
|
|
<area href="class_render_window.html" title="A class that handles window related functionality." alt="RenderWindow" shape="rect" coords="0,56,97,80"/>
|
|
</map>
|
|
</div></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a1c07261ebc98a3df5614bb888e89d4df"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#a1c07261ebc98a3df5614bb888e89d4df">~RenderTarget</a> ()</td></tr>
|
|
<tr class="separator:a1c07261ebc98a3df5614bb888e89d4df"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af791541da67f68df05c3cab09847ac0f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#af791541da67f68df05c3cab09847ac0f">Clear</a> (const <a class="el" href="struct_color.html">Color</a> &color=<a class="el" href="struct_color.html#abfda8f6d25cb1b8ddbf029624bf879dd">Color::Black</a>)</td></tr>
|
|
<tr class="memdesc:af791541da67f68df05c3cab09847ac0f"><td class="mdescLeft"> </td><td class="mdescRight">Clears the display. <a href="class_render_target.html#af791541da67f68df05c3cab09847ac0f">More...</a><br /></td></tr>
|
|
<tr class="separator:af791541da67f68df05c3cab09847ac0f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1a3c1960de17ee0bc6c9802522ca43f3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#a1a3c1960de17ee0bc6c9802522ca43f3">Draw</a> (const <a class="el" href="class_drawable.html">Drawable</a> &drawable)</td></tr>
|
|
<tr class="memdesc:a1a3c1960de17ee0bc6c9802522ca43f3"><td class="mdescLeft"> </td><td class="mdescRight">Draws a sdlu::Drawable to the SDL_Renderer. <a href="class_render_target.html#a1a3c1960de17ee0bc6c9802522ca43f3">More...</a><br /></td></tr>
|
|
<tr class="separator:a1a3c1960de17ee0bc6c9802522ca43f3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:abc1f4a4f3b8976cdfd3f7db43869eca9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#abc1f4a4f3b8976cdfd3f7db43869eca9">Display</a> ()</td></tr>
|
|
<tr class="memdesc:abc1f4a4f3b8976cdfd3f7db43869eca9"><td class="mdescLeft"> </td><td class="mdescRight">Display the current state of the renderer to the screen. <a href="class_render_target.html#abc1f4a4f3b8976cdfd3f7db43869eca9">More...</a><br /></td></tr>
|
|
<tr class="separator:abc1f4a4f3b8976cdfd3f7db43869eca9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a20c60b9fd9dc7572c432a52a115de13c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#a20c60b9fd9dc7572c432a52a115de13c">SetMaxFramerate</a> (<a class="el" href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a> max)</td></tr>
|
|
<tr class="memdesc:a20c60b9fd9dc7572c432a52a115de13c"><td class="mdescLeft"> </td><td class="mdescRight">Sets a maximum framerate on the display function. <a href="class_render_target.html#a20c60b9fd9dc7572c432a52a115de13c">More...</a><br /></td></tr>
|
|
<tr class="separator:a20c60b9fd9dc7572c432a52a115de13c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
|
|
Protected Member Functions</h2></td></tr>
|
|
<tr class="memitem:afcbabdc636f3175dea0ffb28952197c3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#afcbabdc636f3175dea0ffb28952197c3">RenderTarget</a> (SDL_Window *target)</td></tr>
|
|
<tr class="memdesc:afcbabdc636f3175dea0ffb28952197c3"><td class="mdescLeft"> </td><td class="mdescRight">Create Renderer and bind it to a window. <a href="class_render_target.html#afcbabdc636f3175dea0ffb28952197c3">More...</a><br /></td></tr>
|
|
<tr class="separator:afcbabdc636f3175dea0ffb28952197c3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3f10a829b1882c62469333b116511bc1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#a3f10a829b1882c62469333b116511bc1">RenderTarget</a> (SDL_Surface *target)</td></tr>
|
|
<tr class="memdesc:a3f10a829b1882c62469333b116511bc1"><td class="mdescLeft"> </td><td class="mdescRight">Create Renderer and bind it to a texture. <a href="class_render_target.html#a3f10a829b1882c62469333b116511bc1">More...</a><br /></td></tr>
|
|
<tr class="separator:a3f10a829b1882c62469333b116511bc1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
|
|
Protected Attributes</h2></td></tr>
|
|
<tr class="memitem:a8d9f84514352b098dc9ee7b5eae59ff8"><td class="memItemLeft" align="right" valign="top">SDL_Renderer * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_render_target.html#a8d9f84514352b098dc9ee7b5eae59ff8">renderer</a></td></tr>
|
|
<tr class="memdesc:a8d9f84514352b098dc9ee7b5eae59ff8"><td class="mdescLeft"> </td><td class="mdescRight">The renderer object. <a href="class_render_target.html#a8d9f84514352b098dc9ee7b5eae59ff8">More...</a><br /></td></tr>
|
|
<tr class="separator:a8d9f84514352b098dc9ee7b5eae59ff8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Acts as a wrapper for SDL_Renderer*. You can't (and shouldn't) instantiate this, but rather derive from it. </p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a1c07261ebc98a3df5614bb888e89d4df"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1c07261ebc98a3df5614bb888e89d4df">◆ </a></span>~RenderTarget()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual RenderTarget::~RenderTarget </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afcbabdc636f3175dea0ffb28952197c3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afcbabdc636f3175dea0ffb28952197c3">◆ </a></span>RenderTarget() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">RenderTarget::RenderTarget </td>
|
|
<td>(</td>
|
|
<td class="paramtype">SDL_Window * </td>
|
|
<td class="paramname"><em>target</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create Renderer and bind it to a window. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">target</td><td>The SDL_Window to bind to </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3f10a829b1882c62469333b116511bc1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3f10a829b1882c62469333b116511bc1">◆ </a></span>RenderTarget() <span class="overload">[2/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">RenderTarget::RenderTarget </td>
|
|
<td>(</td>
|
|
<td class="paramtype">SDL_Surface * </td>
|
|
<td class="paramname"><em>target</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Create Renderer and bind it to a texture. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">target</td><td>The SDL_Surface to bind to </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="af791541da67f68df05c3cab09847ac0f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af791541da67f68df05c3cab09847ac0f">◆ </a></span>Clear()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void RenderTarget::Clear </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="struct_color.html">Color</a> & </td>
|
|
<td class="paramname"><em>color</em> = <code><a class="el" href="struct_color.html#abfda8f6d25cb1b8ddbf029624bf879dd">Color::Black</a></code></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Clears the display. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">color</td><td>The color to clear the display with </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="abc1f4a4f3b8976cdfd3f7db43869eca9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#abc1f4a4f3b8976cdfd3f7db43869eca9">◆ </a></span>Display()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void RenderTarget::Display </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Display the current state of the renderer to the screen. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1a3c1960de17ee0bc6c9802522ca43f3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1a3c1960de17ee0bc6c9802522ca43f3">◆ </a></span>Draw()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void RenderTarget::Draw </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="class_drawable.html">Drawable</a> & </td>
|
|
<td class="paramname"><em>drawable</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Draws a sdlu::Drawable to the SDL_Renderer. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">drawable</td><td>A reference to a derived class of <a class="el" href="class_drawable.html" title="Everything that can be rendered derives from this class.">Drawable</a> </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a20c60b9fd9dc7572c432a52a115de13c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a20c60b9fd9dc7572c432a52a115de13c">◆ </a></span>SetMaxFramerate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void RenderTarget::SetMaxFramerate </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="_util_8hpp.html#add440eff171ea5f55cb00c4a9ab8672d">Uint32</a> </td>
|
|
<td class="paramname"><em>max</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Sets a maximum framerate on the display function. </p>
|
|
<p>If the maximum framerate is not 0, SDL_Delay() will be called after each <a class="el" href="class_render_target.html#abc1f4a4f3b8976cdfd3f7db43869eca9" title="Display the current state of the renderer to the screen.">Display()</a> to ensure that the time between displays is not shorter than the framerate limit.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramdir">[in]</td><td class="paramname">max</td><td>The new maximum framerate </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="a8d9f84514352b098dc9ee7b5eae59ff8"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8d9f84514352b098dc9ee7b5eae59ff8">◆ </a></span>renderer</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">SDL_Renderer* RenderTarget::renderer</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>The renderer object. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>C:/Users/Robert/source/repos/SDLU/include/graphics/<a class="el" href="_render_target_8hpp_source.html">RenderTarget.hpp</a></li>
|
|
</ul>
|
|
</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="class_render_target.html">RenderTarget</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>
|