shooter/SFML-VS32/doc/html/classsf_1_1RenderTexture.html

1265 lines
78 KiB
HTML
Raw Normal View History

2021-10-09 13:41:12 +03:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 2.5.1</span>
</div>
</div>
<div id="content">
<!-- Generated by Doxygen 1.8.14 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1RenderTexture.html">RenderTexture</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classsf_1_1RenderTexture-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sf::RenderTexture Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Target for off-screen 2D rendering into a texture.
<a href="classsf_1_1RenderTexture.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="RenderTexture_8hpp_source.html">RenderTexture.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::RenderTexture:</div>
<div class="dyncontent">
<div class="center">
<img src="classsf_1_1RenderTexture.png" usemap="#sf::RenderTexture_map" alt=""/>
<map id="sf::RenderTexture_map" name="sf::RenderTexture_map">
<area href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...) " alt="sf::RenderTarget" shape="rect" coords="0,56,111,80"/>
<area href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable. " alt="sf::NonCopyable" shape="rect" coords="0,0,111,24"/>
</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:a19ee6e5b4c40ad251803389b3953a9c6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a19ee6e5b4c40ad251803389b3953a9c6">RenderTexture</a> ()</td></tr>
<tr class="memdesc:a19ee6e5b4c40ad251803389b3953a9c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a19ee6e5b4c40ad251803389b3953a9c6">More...</a><br /></td></tr>
<tr class="separator:a19ee6e5b4c40ad251803389b3953a9c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94b84ab9335be84d2a014c964d973304"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a94b84ab9335be84d2a014c964d973304">~RenderTexture</a> ()</td></tr>
<tr class="memdesc:a94b84ab9335be84d2a014c964d973304"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a94b84ab9335be84d2a014c964d973304">More...</a><br /></td></tr>
<tr class="separator:a94b84ab9335be84d2a014c964d973304"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e945c4ce7703591c7f240b169744603"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a0e945c4ce7703591c7f240b169744603">create</a> (unsigned int width, unsigned int height, bool depthBuffer)</td></tr>
<tr class="memdesc:a0e945c4ce7703591c7f240b169744603"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the render-texture. <a href="#a0e945c4ce7703591c7f240b169744603">More...</a><br /></td></tr>
<tr class="separator:a0e945c4ce7703591c7f240b169744603"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49b7b723a80f89bc409a942364351dc3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a49b7b723a80f89bc409a942364351dc3">create</a> (unsigned int width, unsigned int height, const <a class="el" href="structsf_1_1ContextSettings.html">ContextSettings</a> &amp;settings=<a class="el" href="structsf_1_1ContextSettings.html">ContextSettings</a>())</td></tr>
<tr class="memdesc:a49b7b723a80f89bc409a942364351dc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the render-texture. <a href="#a49b7b723a80f89bc409a942364351dc3">More...</a><br /></td></tr>
<tr class="separator:a49b7b723a80f89bc409a942364351dc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af08991e63c6020865dd07b20e27305b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#af08991e63c6020865dd07b20e27305b6">setSmooth</a> (bool smooth)</td></tr>
<tr class="memdesc:af08991e63c6020865dd07b20e27305b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable texture smoothing. <a href="#af08991e63c6020865dd07b20e27305b6">More...</a><br /></td></tr>
<tr class="separator:af08991e63c6020865dd07b20e27305b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b43c007ab6643accc5dae84b5bc8f61"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a5b43c007ab6643accc5dae84b5bc8f61">isSmooth</a> () const</td></tr>
<tr class="memdesc:a5b43c007ab6643accc5dae84b5bc8f61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether the smooth filtering is enabled or not. <a href="#a5b43c007ab6643accc5dae84b5bc8f61">More...</a><br /></td></tr>
<tr class="separator:a5b43c007ab6643accc5dae84b5bc8f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8f97b33512bf7d5b6be3da6f65f7365"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#af8f97b33512bf7d5b6be3da6f65f7365">setRepeated</a> (bool repeated)</td></tr>
<tr class="memdesc:af8f97b33512bf7d5b6be3da6f65f7365"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable texture repeating. <a href="#af8f97b33512bf7d5b6be3da6f65f7365">More...</a><br /></td></tr>
<tr class="separator:af8f97b33512bf7d5b6be3da6f65f7365"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81c5a453a21c7e78299b062b97dc8c87"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a81c5a453a21c7e78299b062b97dc8c87">isRepeated</a> () const</td></tr>
<tr class="memdesc:a81c5a453a21c7e78299b062b97dc8c87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether the texture is repeated or not. <a href="#a81c5a453a21c7e78299b062b97dc8c87">More...</a><br /></td></tr>
<tr class="separator:a81c5a453a21c7e78299b062b97dc8c87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ca34c8b7e00793c1d3ef4f9a834f8cc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a8ca34c8b7e00793c1d3ef4f9a834f8cc">generateMipmap</a> ()</td></tr>
<tr class="memdesc:a8ca34c8b7e00793c1d3ef4f9a834f8cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a mipmap using the current texture data. <a href="#a8ca34c8b7e00793c1d3ef4f9a834f8cc">More...</a><br /></td></tr>
<tr class="separator:a8ca34c8b7e00793c1d3ef4f9a834f8cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5da95ecdbce615a80bb78399012508cf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a5da95ecdbce615a80bb78399012508cf">setActive</a> (bool active=true)</td></tr>
<tr class="memdesc:a5da95ecdbce615a80bb78399012508cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Activate or deactivate the render-texture for rendering. <a href="#a5da95ecdbce615a80bb78399012508cf">More...</a><br /></td></tr>
<tr class="separator:a5da95ecdbce615a80bb78399012508cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af92886d5faef3916caff9fa9ab32c555"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#af92886d5faef3916caff9fa9ab32c555">display</a> ()</td></tr>
2021-10-28 16:58:02 +03:00
<tr class="memdesc:af92886d5faef3916caff9fa9ab32c555"><td class="mdescLeft">&#160;</td><td class="mdescRight">ServerUpdate the contents of the target texture. <a href="#af92886d5faef3916caff9fa9ab32c555">More...</a><br /></td></tr>
2021-10-09 13:41:12 +03:00
<tr class="separator:af92886d5faef3916caff9fa9ab32c555"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6685315b5c4c25a5dcb75b4280b381ba"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classsf_1_1Vector2.html">Vector2u</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a6685315b5c4c25a5dcb75b4280b381ba">getSize</a> () const</td></tr>
<tr class="memdesc:a6685315b5c4c25a5dcb75b4280b381ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the size of the rendering region of the texture. <a href="#a6685315b5c4c25a5dcb75b4280b381ba">More...</a><br /></td></tr>
<tr class="separator:a6685315b5c4c25a5dcb75b4280b381ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07ecea85f05932fa02a8279416721bc9"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#a07ecea85f05932fa02a8279416721bc9">getTexture</a> () const</td></tr>
<tr class="memdesc:a07ecea85f05932fa02a8279416721bc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a read-only reference to the target texture. <a href="#a07ecea85f05932fa02a8279416721bc9">More...</a><br /></td></tr>
<tr class="separator:a07ecea85f05932fa02a8279416721bc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bb6f0ba348f2b1e2f46114aeaf60f26"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a6bb6f0ba348f2b1e2f46114aeaf60f26">clear</a> (const <a class="el" href="classsf_1_1Color.html">Color</a> &amp;color=<a class="el" href="classsf_1_1Color.html">Color</a>(0, 0, 0, 255))</td></tr>
<tr class="memdesc:a6bb6f0ba348f2b1e2f46114aeaf60f26"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the entire target with a single color. <a href="#a6bb6f0ba348f2b1e2f46114aeaf60f26">More...</a><br /></td></tr>
<tr class="separator:a6bb6f0ba348f2b1e2f46114aeaf60f26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a063db6dd0a14913504af30e50cb6d946"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a063db6dd0a14913504af30e50cb6d946">setView</a> (const <a class="el" href="classsf_1_1View.html">View</a> &amp;view)</td></tr>
<tr class="memdesc:a063db6dd0a14913504af30e50cb6d946"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the current active view. <a href="#a063db6dd0a14913504af30e50cb6d946">More...</a><br /></td></tr>
<tr class="separator:a063db6dd0a14913504af30e50cb6d946"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c179503b4dcdf5282ef6426d317602c"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1View.html">View</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a2c179503b4dcdf5282ef6426d317602c">getView</a> () const</td></tr>
<tr class="memdesc:a2c179503b4dcdf5282ef6426d317602c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the view currently in use in the render target. <a href="#a2c179503b4dcdf5282ef6426d317602c">More...</a><br /></td></tr>
<tr class="separator:a2c179503b4dcdf5282ef6426d317602c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3b533c3f899d7044d981ed607aef9be"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1View.html">View</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#ad3b533c3f899d7044d981ed607aef9be">getDefaultView</a> () const</td></tr>
<tr class="memdesc:ad3b533c3f899d7044d981ed607aef9be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the default view of the render target. <a href="#ad3b533c3f899d7044d981ed607aef9be">More...</a><br /></td></tr>
<tr class="separator:ad3b533c3f899d7044d981ed607aef9be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a865d462915dc2a1fae2ebfb3300382ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Rect.html">IntRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a865d462915dc2a1fae2ebfb3300382ac">getViewport</a> (const <a class="el" href="classsf_1_1View.html">View</a> &amp;view) const</td></tr>
<tr class="memdesc:a865d462915dc2a1fae2ebfb3300382ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the viewport of a view, applied to this render target. <a href="#a865d462915dc2a1fae2ebfb3300382ac">More...</a><br /></td></tr>
<tr class="separator:a865d462915dc2a1fae2ebfb3300382ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0103ebebafa43a97e6e6414f8560d5e3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2f</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a0103ebebafa43a97e6e6414f8560d5e3">mapPixelToCoords</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2i</a> &amp;point) const</td></tr>
<tr class="memdesc:a0103ebebafa43a97e6e6414f8560d5e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a point from target coordinates to world coordinates, using the current view. <a href="#a0103ebebafa43a97e6e6414f8560d5e3">More...</a><br /></td></tr>
<tr class="separator:a0103ebebafa43a97e6e6414f8560d5e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d3e9d7c4a1f5ea7e52b06f53e3011f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2f</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a2d3e9d7c4a1f5ea7e52b06f53e3011f9">mapPixelToCoords</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2i</a> &amp;point, const <a class="el" href="classsf_1_1View.html">View</a> &amp;view) const</td></tr>
<tr class="memdesc:a2d3e9d7c4a1f5ea7e52b06f53e3011f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a point from target coordinates to world coordinates. <a href="#a2d3e9d7c4a1f5ea7e52b06f53e3011f9">More...</a><br /></td></tr>
<tr class="separator:a2d3e9d7c4a1f5ea7e52b06f53e3011f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad92a9f0283aa5f3f67e473c1105b68cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2i</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#ad92a9f0283aa5f3f67e473c1105b68cf">mapCoordsToPixel</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;point) const</td></tr>
<tr class="memdesc:ad92a9f0283aa5f3f67e473c1105b68cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a point from world coordinates to target coordinates, using the current view. <a href="#ad92a9f0283aa5f3f67e473c1105b68cf">More...</a><br /></td></tr>
<tr class="separator:ad92a9f0283aa5f3f67e473c1105b68cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a848eee44b72ac3f16fa9182df26e83bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector2.html">Vector2i</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a848eee44b72ac3f16fa9182df26e83bc">mapCoordsToPixel</a> (const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;point, const <a class="el" href="classsf_1_1View.html">View</a> &amp;view) const</td></tr>
<tr class="memdesc:a848eee44b72ac3f16fa9182df26e83bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a point from world coordinates to target coordinates. <a href="#a848eee44b72ac3f16fa9182df26e83bc">More...</a><br /></td></tr>
<tr class="separator:a848eee44b72ac3f16fa9182df26e83bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12417a3bcc245c41d957b29583556f39"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a> (const <a class="el" href="classsf_1_1Drawable.html">Drawable</a> &amp;drawable, const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;states=<a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a>)</td></tr>
<tr class="memdesc:a12417a3bcc245c41d957b29583556f39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw a drawable object to the render target. <a href="#a12417a3bcc245c41d957b29583556f39">More...</a><br /></td></tr>
<tr class="separator:a12417a3bcc245c41d957b29583556f39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a976bc94057799eb9f8a18ac5fdfd9b73"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a976bc94057799eb9f8a18ac5fdfd9b73">draw</a> (const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> *vertices, std::size_t vertexCount, <a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> type, const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;states=<a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a>)</td></tr>
<tr class="memdesc:a976bc94057799eb9f8a18ac5fdfd9b73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw primitives defined by an array of vertices. <a href="#a976bc94057799eb9f8a18ac5fdfd9b73">More...</a><br /></td></tr>
<tr class="separator:a976bc94057799eb9f8a18ac5fdfd9b73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dc4d06f081d36ca1e8f1a1298d49abc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a3dc4d06f081d36ca1e8f1a1298d49abc">draw</a> (const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;vertexBuffer, const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;states=<a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a>)</td></tr>
<tr class="memdesc:a3dc4d06f081d36ca1e8f1a1298d49abc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw primitives defined by a vertex buffer. <a href="#a3dc4d06f081d36ca1e8f1a1298d49abc">More...</a><br /></td></tr>
<tr class="separator:a3dc4d06f081d36ca1e8f1a1298d49abc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07cb25d4557a30146b24b25b242310ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a07cb25d4557a30146b24b25b242310ea">draw</a> (const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;vertexBuffer, std::size_t firstVertex, std::size_t vertexCount, const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;states=<a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a>)</td></tr>
<tr class="memdesc:a07cb25d4557a30146b24b25b242310ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw primitives defined by a vertex buffer. <a href="#a07cb25d4557a30146b24b25b242310ea">More...</a><br /></td></tr>
<tr class="separator:a07cb25d4557a30146b24b25b242310ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d1998464ccc54e789aaf990242b47f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#a8d1998464ccc54e789aaf990242b47f7">pushGLStates</a> ()</td></tr>
<tr class="memdesc:a8d1998464ccc54e789aaf990242b47f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Save the current OpenGL render states and matrices. <a href="#a8d1998464ccc54e789aaf990242b47f7">More...</a><br /></td></tr>
<tr class="separator:a8d1998464ccc54e789aaf990242b47f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5a98401113df931ddcd54c080f7aa8e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#ad5a98401113df931ddcd54c080f7aa8e">popGLStates</a> ()</td></tr>
<tr class="memdesc:ad5a98401113df931ddcd54c080f7aa8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Restore the previously saved OpenGL render states and matrices. <a href="#ad5a98401113df931ddcd54c080f7aa8e">More...</a><br /></td></tr>
<tr class="separator:ad5a98401113df931ddcd54c080f7aa8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac7504990d27dada4bfe3c7866920765"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#aac7504990d27dada4bfe3c7866920765">resetGLStates</a> ()</td></tr>
<tr class="memdesc:aac7504990d27dada4bfe3c7866920765"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the internal OpenGL states so that the target is ready for drawing. <a href="#aac7504990d27dada4bfe3c7866920765">More...</a><br /></td></tr>
<tr class="separator:aac7504990d27dada4bfe3c7866920765"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab0849fc3e064b744ffae1ab1d85ee12b"><td class="memItemLeft" align="right" valign="top">static unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTexture.html#ab0849fc3e064b744ffae1ab1d85ee12b">getMaximumAntialiasingLevel</a> ()</td></tr>
<tr class="memdesc:ab0849fc3e064b744ffae1ab1d85ee12b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum anti-aliasing level supported by the system. <a href="#ab0849fc3e064b744ffae1ab1d85ee12b">More...</a><br /></td></tr>
<tr class="separator:ab0849fc3e064b744ffae1ab1d85ee12b"><td class="memSeparator" colspan="2">&#160;</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:af530274b34159d644e509b4b4dc43eb7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1RenderTarget.html#af530274b34159d644e509b4b4dc43eb7">initialize</a> ()</td></tr>
<tr class="memdesc:af530274b34159d644e509b4b4dc43eb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the common initialization step after creation. <a href="#af530274b34159d644e509b4b4dc43eb7">More...</a><br /></td></tr>
<tr class="separator:af530274b34159d644e509b4b4dc43eb7"><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>Target for off-screen 2D rendering into a texture. </p>
<p><a class="el" href="classsf_1_1RenderTexture.html" title="Target for off-screen 2D rendering into a texture. ">sf::RenderTexture</a> is the little brother of <a class="el" href="classsf_1_1RenderWindow.html" title="Window that can serve as a target for 2D drawing. ">sf::RenderWindow</a>.</p>
<p>It implements the same 2D drawing and OpenGL-related functions (see their base class <a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...) ">sf::RenderTarget</a> for more details), the difference is that the result is stored in an off-screen texture rather than being show in a window.</p>
<p>Rendering to a texture can be useful in a variety of situations: </p><ul>
<li>precomputing a complex static texture (like a level's background from multiple tiles) </li>
<li>applying post-effects to the whole scene with shaders </li>
<li>creating a sprite from a 3D object rendered with OpenGL </li>
<li>etc.</li>
</ul>
<p>Usage example:</p>
<div class="fragment"><div class="line"><span class="comment">// Create a new render-window</span></div><div class="line"><a class="code" href="classsf_1_1RenderWindow.html">sf::RenderWindow</a> window(<a class="code" href="classsf_1_1VideoMode.html">sf::VideoMode</a>(800, 600), <span class="stringliteral">&quot;SFML window&quot;</span>);</div><div class="line"></div><div class="line"><span class="comment">// Create a new render-texture</span></div><div class="line"><a class="code" href="classsf_1_1RenderTexture.html">sf::RenderTexture</a> texture;</div><div class="line"><span class="keywordflow">if</span> (!texture.<a class="code" href="classsf_1_1RenderTexture.html#a0e945c4ce7703591c7f240b169744603">create</a>(500, 500))</div><div class="line"> <span class="keywordflow">return</span> -1;</div><div class="line"></div><div class="line"><span class="comment">// The main loop</span></div><div class="line"><span class="keywordflow">while</span> (window.<a class="code" href="classsf_1_1Window.html#ae873503db7d48157bb9cbf6129562bce">isOpen</a>())</div><div class="line">{</div><div class="line"> <span class="comment">// Event processing</span></div><div class="line"> <span class="comment">// ...</span></div><div class="line"></div><div class="line"> <span class="comment">// Clear the whole texture with red color</span></div><div class="line"> texture.<a class="code" href="classsf_1_1RenderTarget.html#a6bb6f0ba348f2b1e2f46114aeaf60f26">clear</a>(<a class="code" href="classsf_1_1Color.html#a127dbf55db9c07d0fa8f4bfcbb97594a">sf::Color::Red</a>);</div><div class="line"></div><div class="line"> <span class="comment">// Draw stuff to the texture</span></div><div class="line"> texture.<a class="code" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(sprite); <span class="comment">// sprite is a sf::Sprite</span></div><div class="line"> texture.<a class="code" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(shape); <span class="comment">// shape is a sf::Shape</span></div><div class="line"> texture.<a class="code" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(text); <span class="comment">// text is a sf::Text</span></div><div class="line"></div><div class="line"> <span class="comment">// We&#39;re done drawing to the texture</span></div><div class="line"> texture.<a class="code" href="classsf_1_1RenderTexture.html#af92886d5faef3916caff9fa9ab32c555">display</a>();</div><div class="line"></div><div class="line"> <span class="comment">// Now we start rendering to the window, clear it first</span></div><div class="line"> window.clear();</div><div class="line"></div><div class="line"> <span class="comment">// Draw the texture</span></div><div class="line"> <a class="code" href="classsf_1_1Sprite.html">sf::Sprite</a> sprite(texture.<a class="code" href="classsf_1_1RenderTexture.html#a07ecea85f05932fa02a8279416721bc9">getTexture</a>());</div><div class="line"> window.draw(sprite);</div><div class="line"></div><div class="line"> <span class="comment">// End the current frame and display its contents on screen</span></div><div class="line"> window.<a class="code" href="classsf_1_1Window.html#adabf839cb103ac96cfc82f781638772a">display</a>();</div><div class="line">}</div></div><!-- fragment --><p>Like <a class="el" href="classsf_1_1RenderWindow.html" title="Window that can serve as a target for 2D drawing. ">sf::RenderWindow</a>, <a class="el" href="classsf_1_1RenderTexture.html" title="Target for off-screen 2D rendering into a texture. ">sf::RenderTexture</a> is still able to render direct OpenGL stuff. It is even possible to mix together OpenGL calls and regular SFML drawing commands. If you need a depth buffer for 3D rendering, don't forget to request it when calling <a class="el" href="classsf_1_1RenderTexture.html#a0e945c4ce7703591c7f240b169744603" title="Create the render-texture. ">RenderTexture::create</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...) ">sf::RenderTarget</a>, <a class="el" href="classsf_1_1RenderWindow.html" title="Window that can serve as a target for 2D drawing. ">sf::RenderWindow</a>, <a class="el" href="classsf_1_1View.html" title="2D camera that defines what region is shown on screen ">sf::View</a>, <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing. ">sf::Texture</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="RenderTexture_8hpp_source.html#l00048">48</a> of file <a class="el" href="RenderTexture_8hpp_source.html">RenderTexture.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a19ee6e5b4c40ad251803389b3953a9c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19ee6e5b4c40ad251803389b3953a9c6">&#9670;&nbsp;</a></span>RenderTexture()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::RenderTexture::RenderTexture </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>Constructs an empty, invalid render-texture. You must call create to have a valid render-texture.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTexture.html#a0e945c4ce7703591c7f240b169744603" title="Create the render-texture. ">create</a> </dd></dl>
</div>
</div>
<a id="a94b84ab9335be84d2a014c964d973304"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94b84ab9335be84d2a014c964d973304">&#9670;&nbsp;</a></span>~RenderTexture()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual sf::RenderTexture::~RenderTexture </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">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6bb6f0ba348f2b1e2f46114aeaf60f26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6bb6f0ba348f2b1e2f46114aeaf60f26">&#9670;&nbsp;</a></span>clear()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::clear </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Color.html">Color</a> &amp;&#160;</td>
<td class="paramname"><em>color</em> = <code><a class="el" href="classsf_1_1Color.html">Color</a>(0,&#160;0,&#160;0,&#160;255)</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Clear the entire target with a single color. </p>
<p>This function is usually called once every frame, to clear the previous contents of the target.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">color</td><td>Fill color to use to clear the render target </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a0e945c4ce7703591c7f240b169744603"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e945c4ce7703591c7f240b169744603">&#9670;&nbsp;</a></span>create() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::RenderTexture::create </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>depthBuffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create the render-texture. </p>
<p>Before calling this function, the render-texture is in an invalid state, thus it is mandatory to call it before doing anything with the render-texture. The last parameter, <em>depthBuffer</em>, is useful if you want to use the render-texture for 3D OpenGL rendering that requires a depth buffer. Otherwise it is unnecessary, and you should leave this parameter to false (which is its default value).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">width</td><td>Width of the render-texture </td></tr>
<tr><td class="paramname">height</td><td>Height of the render-texture </td></tr>
<tr><td class="paramname">depthBuffer</td><td>Do you want this render-texture to have a depth buffer?</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if creation has been successful</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1RenderTexture.html#a49b7b723a80f89bc409a942364351dc3" title="Create the render-texture. ">create(unsigned int, unsigned int, const ContextSettings&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="a49b7b723a80f89bc409a942364351dc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49b7b723a80f89bc409a942364351dc3">&#9670;&nbsp;</a></span>create() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::RenderTexture::create </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structsf_1_1ContextSettings.html">ContextSettings</a> &amp;&#160;</td>
<td class="paramname"><em>settings</em> = <code><a class="el" href="structsf_1_1ContextSettings.html">ContextSettings</a>()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create the render-texture. </p>
<p>Before calling this function, the render-texture is in an invalid state, thus it is mandatory to call it before doing anything with the render-texture. The last parameter, <em>settings</em>, is useful if you want to enable multi-sampling or use the render-texture for OpenGL rendering that requires a depth or stencil buffer. Otherwise it is unnecessary, and you should leave this parameter at its default value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">width</td><td>Width of the render-texture </td></tr>
<tr><td class="paramname">height</td><td>Height of the render-texture </td></tr>
<tr><td class="paramname">settings</td><td>Additional settings for the underlying OpenGL texture and context</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if creation has been successful </dd></dl>
</div>
</div>
<a id="af92886d5faef3916caff9fa9ab32c555"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af92886d5faef3916caff9fa9ab32c555">&#9670;&nbsp;</a></span>display()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTexture::display </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
2021-10-28 16:58:02 +03:00
<p>ServerUpdate the contents of the target texture. </p>
2021-10-09 13:41:12 +03:00
<p>This function updates the target texture with what has been drawn so far. Like for windows, calling this function is mandatory at the end of rendering. Not calling it may leave the texture in an undefined state. </p>
</div>
</div>
<a id="a12417a3bcc245c41d957b29583556f39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12417a3bcc245c41d957b29583556f39">&#9670;&nbsp;</a></span>draw() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::draw </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Drawable.html">Drawable</a> &amp;&#160;</td>
<td class="paramname"><em>drawable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;&#160;</td>
<td class="paramname"><em>states</em> = <code><a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Draw a drawable object to the render target. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">drawable</td><td>Object to draw </td></tr>
<tr><td class="paramname">states</td><td>Render states to use for drawing </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a976bc94057799eb9f8a18ac5fdfd9b73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a976bc94057799eb9f8a18ac5fdfd9b73">&#9670;&nbsp;</a></span>draw() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::draw </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> *&#160;</td>
<td class="paramname"><em>vertices</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>vertexCount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;&#160;</td>
<td class="paramname"><em>states</em> = <code><a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Draw primitives defined by an array of vertices. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertices</td><td>Pointer to the vertices </td></tr>
<tr><td class="paramname">vertexCount</td><td>Number of vertices in the array </td></tr>
<tr><td class="paramname">type</td><td>Type of primitives to draw </td></tr>
<tr><td class="paramname">states</td><td>Render states to use for drawing </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a3dc4d06f081d36ca1e8f1a1298d49abc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3dc4d06f081d36ca1e8f1a1298d49abc">&#9670;&nbsp;</a></span>draw() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::draw </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>vertexBuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;&#160;</td>
<td class="paramname"><em>states</em> = <code><a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Draw primitives defined by a vertex buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexBuffer</td><td><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">Vertex</a> buffer </td></tr>
<tr><td class="paramname">states</td><td>Render states to use for drawing </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a07cb25d4557a30146b24b25b242310ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07cb25d4557a30146b24b25b242310ea">&#9670;&nbsp;</a></span>draw() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::draw </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>vertexBuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>firstVertex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>vertexCount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1RenderStates.html">RenderStates</a> &amp;&#160;</td>
<td class="paramname"><em>states</em> = <code><a class="el" href="classsf_1_1RenderStates.html#ad29672df29f19ce50c3021d95f2bb062">RenderStates::Default</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Draw primitives defined by a vertex buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexBuffer</td><td><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">Vertex</a> buffer </td></tr>
<tr><td class="paramname">firstVertex</td><td>Index of the first vertex to render </td></tr>
<tr><td class="paramname">vertexCount</td><td>Number of vertices to render </td></tr>
<tr><td class="paramname">states</td><td>Render states to use for drawing </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a8ca34c8b7e00793c1d3ef4f9a834f8cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ca34c8b7e00793c1d3ef4f9a834f8cc">&#9670;&nbsp;</a></span>generateMipmap()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::RenderTexture::generateMipmap </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Generate a mipmap using the current texture data. </p>
<p>This function is similar to <a class="el" href="classsf_1_1Texture.html#a7779a75c0324b5faff77602f871710a9" title="Generate a mipmap using the current texture data. ">Texture::generateMipmap</a> and operates on the texture used as the target for drawing. Be aware that any draw operation may modify the base level image data. For this reason, calling this function only makes sense after all drawing is completed and display has been called. Not calling display after subsequent drawing will lead to undefined behavior if a mipmap had been previously generated.</p>
<dl class="section return"><dt>Returns</dt><dd>True if mipmap generation was successful, false if unsuccessful </dd></dl>
</div>
</div>
<a id="ad3b533c3f899d7044d981ed607aef9be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3b533c3f899d7044d981ed607aef9be">&#9670;&nbsp;</a></span>getDefaultView()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classsf_1_1View.html">View</a>&amp; sf::RenderTarget::getDefaultView </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the default view of the render target. </p>
<p>The default view has the initial size of the render target, and never changes after the target has been created.</p>
<dl class="section return"><dt>Returns</dt><dd>The default view of the render target</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#a063db6dd0a14913504af30e50cb6d946" title="Change the current active view. ">setView</a>, <a class="el" href="classsf_1_1RenderTarget.html#a2c179503b4dcdf5282ef6426d317602c" title="Get the view currently in use in the render target. ">getView</a> </dd></dl>
</div>
</div>
<a id="ab0849fc3e064b744ffae1ab1d85ee12b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0849fc3e064b744ffae1ab1d85ee12b">&#9670;&nbsp;</a></span>getMaximumAntialiasingLevel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static unsigned int sf::RenderTexture::getMaximumAntialiasingLevel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the maximum anti-aliasing level supported by the system. </p>
<dl class="section return"><dt>Returns</dt><dd>The maximum anti-aliasing level supported by the system </dd></dl>
</div>
</div>
<a id="a6685315b5c4c25a5dcb75b4280b381ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6685315b5c4c25a5dcb75b4280b381ba">&#9670;&nbsp;</a></span>getSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classsf_1_1Vector2.html">Vector2u</a> sf::RenderTexture::getSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the size of the rendering region of the texture. </p>
<p>The returned value is the size that you passed to the create function.</p>
<dl class="section return"><dt>Returns</dt><dd>Size in pixels </dd></dl>
<p>Implements <a class="el" href="classsf_1_1RenderTarget.html#a2e5ade2457d9fb4c4907ae5b3d9e94a5">sf::RenderTarget</a>.</p>
</div>
</div>
<a id="a07ecea85f05932fa02a8279416721bc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07ecea85f05932fa02a8279416721bc9">&#9670;&nbsp;</a></span>getTexture()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classsf_1_1Texture.html">Texture</a>&amp; sf::RenderTexture::getTexture </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a read-only reference to the target texture. </p>
<p>After drawing to the render-texture and calling Display, you can retrieve the updated texture using this function, and draw it using a sprite (for example). The internal <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing. ">sf::Texture</a> of a render-texture is always the same instance, so that it is possible to call this function once and keep a reference to the texture even after it is modified.</p>
<dl class="section return"><dt>Returns</dt><dd>Const reference to the texture </dd></dl>
</div>
</div>
<a id="a2c179503b4dcdf5282ef6426d317602c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c179503b4dcdf5282ef6426d317602c">&#9670;&nbsp;</a></span>getView()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classsf_1_1View.html">View</a>&amp; sf::RenderTarget::getView </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the view currently in use in the render target. </p>
<dl class="section return"><dt>Returns</dt><dd>The view object that is currently used</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#a063db6dd0a14913504af30e50cb6d946" title="Change the current active view. ">setView</a>, <a class="el" href="classsf_1_1RenderTarget.html#ad3b533c3f899d7044d981ed607aef9be" title="Get the default view of the render target. ">getDefaultView</a> </dd></dl>
</div>
</div>
<a id="a865d462915dc2a1fae2ebfb3300382ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a865d462915dc2a1fae2ebfb3300382ac">&#9670;&nbsp;</a></span>getViewport()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1Rect.html">IntRect</a> sf::RenderTarget::getViewport </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1View.html">View</a> &amp;&#160;</td>
<td class="paramname"><em>view</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the viewport of a view, applied to this render target. </p>
<p>The viewport is defined in the view as a ratio, this function simply applies this ratio to the current dimensions of the render target to calculate the pixels rectangle that the viewport actually covers in the target.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">view</td><td>The view for which we want to compute the viewport</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Viewport rectangle, expressed in pixels </dd></dl>
</div>
</div>
<a id="af530274b34159d644e509b4b4dc43eb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af530274b34159d644e509b4b4dc43eb7">&#9670;&nbsp;</a></span>initialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::initialize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs the common initialization step after creation. </p>
<p>The derived classes must call this function after the target is created and ready for drawing. </p>
</div>
</div>
<a id="a81c5a453a21c7e78299b062b97dc8c87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81c5a453a21c7e78299b062b97dc8c87">&#9670;&nbsp;</a></span>isRepeated()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::RenderTexture::isRepeated </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Tell whether the texture is repeated or not. </p>
<dl class="section return"><dt>Returns</dt><dd>True if texture is repeated</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTexture.html#af8f97b33512bf7d5b6be3da6f65f7365" title="Enable or disable texture repeating. ">setRepeated</a> </dd></dl>
</div>
</div>
<a id="a5b43c007ab6643accc5dae84b5bc8f61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b43c007ab6643accc5dae84b5bc8f61">&#9670;&nbsp;</a></span>isSmooth()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::RenderTexture::isSmooth </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Tell whether the smooth filtering is enabled or not. </p>
<dl class="section return"><dt>Returns</dt><dd>True if texture smoothing is enabled</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTexture.html#af08991e63c6020865dd07b20e27305b6" title="Enable or disable texture smoothing. ">setSmooth</a> </dd></dl>
</div>
</div>
<a id="ad92a9f0283aa5f3f67e473c1105b68cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad92a9f0283aa5f3f67e473c1105b68cf">&#9670;&nbsp;</a></span>mapCoordsToPixel() <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"><a class="el" href="classsf_1_1Vector2.html">Vector2i</a> sf::RenderTarget::mapCoordsToPixel </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
<td class="paramname"><em>point</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a point from world coordinates to target coordinates, using the current view. </p>
<p>This function is an overload of the mapCoordsToPixel function that implicitly uses the current view. It is equivalent to: </p><div class="fragment"><div class="line">target.<a class="code" href="classsf_1_1RenderTarget.html#ad92a9f0283aa5f3f67e473c1105b68cf">mapCoordsToPixel</a>(point, target.<a class="code" href="classsf_1_1RenderTarget.html#a2c179503b4dcdf5282ef6426d317602c">getView</a>());</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">point</td><td>Point to convert</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted point, in target coordinates (pixels)</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#a0103ebebafa43a97e6e6414f8560d5e3" title="Convert a point from target coordinates to world coordinates, using the current view. ">mapPixelToCoords</a> </dd></dl>
</div>
</div>
<a id="a848eee44b72ac3f16fa9182df26e83bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a848eee44b72ac3f16fa9182df26e83bc">&#9670;&nbsp;</a></span>mapCoordsToPixel() <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"><a class="el" href="classsf_1_1Vector2.html">Vector2i</a> sf::RenderTarget::mapCoordsToPixel </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
<td class="paramname"><em>point</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1View.html">View</a> &amp;&#160;</td>
<td class="paramname"><em>view</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a point from world coordinates to target coordinates. </p>
<p>This function finds the pixel of the render target that matches the given 2D point. In other words, it goes through the same process as the graphics card, to compute the final position of a rendered point.</p>
<p>Initially, both coordinate systems (world units and target pixels) match perfectly. But if you define a custom view or resize your render target, this assertion is not true anymore, i.e. a point located at (150, 75) in your 2D world may map to the pixel (10, 50) of your render target &ndash; if the view is translated by (140, 25).</p>
<p>This version uses a custom view for calculations, see the other overload of the function if you want to use the current view of the render target.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">point</td><td>Point to convert </td></tr>
<tr><td class="paramname">view</td><td>The view to use for converting the point</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted point, in target coordinates (pixels)</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#a0103ebebafa43a97e6e6414f8560d5e3" title="Convert a point from target coordinates to world coordinates, using the current view. ">mapPixelToCoords</a> </dd></dl>
</div>
</div>
<a id="a0103ebebafa43a97e6e6414f8560d5e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0103ebebafa43a97e6e6414f8560d5e3">&#9670;&nbsp;</a></span>mapPixelToCoords() <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"><a class="el" href="classsf_1_1Vector2.html">Vector2f</a> sf::RenderTarget::mapPixelToCoords </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2i</a> &amp;&#160;</td>
<td class="paramname"><em>point</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a point from target coordinates to world coordinates, using the current view. </p>
<p>This function is an overload of the mapPixelToCoords function that implicitly uses the current view. It is equivalent to: </p><div class="fragment"><div class="line">target.<a class="code" href="classsf_1_1RenderTarget.html#a0103ebebafa43a97e6e6414f8560d5e3">mapPixelToCoords</a>(point, target.<a class="code" href="classsf_1_1RenderTarget.html#a2c179503b4dcdf5282ef6426d317602c">getView</a>());</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">point</td><td>Pixel to convert</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted point, in "world" coordinates</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#ad92a9f0283aa5f3f67e473c1105b68cf" title="Convert a point from world coordinates to target coordinates, using the current view. ">mapCoordsToPixel</a> </dd></dl>
</div>
</div>
<a id="a2d3e9d7c4a1f5ea7e52b06f53e3011f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d3e9d7c4a1f5ea7e52b06f53e3011f9">&#9670;&nbsp;</a></span>mapPixelToCoords() <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"><a class="el" href="classsf_1_1Vector2.html">Vector2f</a> sf::RenderTarget::mapPixelToCoords </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2i</a> &amp;&#160;</td>
<td class="paramname"><em>point</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1View.html">View</a> &amp;&#160;</td>
<td class="paramname"><em>view</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convert a point from target coordinates to world coordinates. </p>
<p>This function finds the 2D position that matches the given pixel of the render target. In other words, it does the inverse of what the graphics card does, to find the initial position of a rendered pixel.</p>
<p>Initially, both coordinate systems (world units and target pixels) match perfectly. But if you define a custom view or resize your render target, this assertion is not true anymore, i.e. a point located at (10, 50) in your render target may map to the point (150, 75) in your 2D world &ndash; if the view is translated by (140, 25).</p>
<p>For render-windows, this function is typically used to find which point (or object) is located below the mouse cursor.</p>
<p>This version uses a custom view for calculations, see the other overload of the function if you want to use the current view of the render target.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">point</td><td>Pixel to convert </td></tr>
<tr><td class="paramname">view</td><td>The view to use for converting the point</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The converted point, in "world" units</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#ad92a9f0283aa5f3f67e473c1105b68cf" title="Convert a point from world coordinates to target coordinates, using the current view. ">mapCoordsToPixel</a> </dd></dl>
</div>
</div>
<a id="ad5a98401113df931ddcd54c080f7aa8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5a98401113df931ddcd54c080f7aa8e">&#9670;&nbsp;</a></span>popGLStates()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::popGLStates </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Restore the previously saved OpenGL render states and matrices. </p>
<p>See the description of pushGLStates to get a detailed description of these functions.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#a8d1998464ccc54e789aaf990242b47f7" title="Save the current OpenGL render states and matrices. ">pushGLStates</a> </dd></dl>
</div>
</div>
<a id="a8d1998464ccc54e789aaf990242b47f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d1998464ccc54e789aaf990242b47f7">&#9670;&nbsp;</a></span>pushGLStates()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::pushGLStates </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Save the current OpenGL render states and matrices. </p>
<p>This function can be used when you mix SFML drawing and direct OpenGL rendering. Combined with popGLStates, it ensures that: </p><ul>
<li>SFML's internal states are not messed up by your OpenGL code </li>
<li>your OpenGL states are not modified by a call to a SFML function</li>
</ul>
<p>More specifically, it must be used around code that calls Draw functions. Example: </p><div class="fragment"><div class="line"><span class="comment">// OpenGL code here...</span></div><div class="line">window.pushGLStates();</div><div class="line">window.draw(...);</div><div class="line">window.draw(...);</div><div class="line">window.popGLStates();</div><div class="line"><span class="comment">// OpenGL code here...</span></div></div><!-- fragment --><p>Note that this function is quite expensive: it saves all the possible OpenGL states and matrices, even the ones you don't care about. Therefore it should be used wisely. It is provided for convenience, but the best results will be achieved if you handle OpenGL states yourself (because you know which states have really changed, and need to be saved and restored). Take a look at the resetGLStates function if you do so.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#ad5a98401113df931ddcd54c080f7aa8e" title="Restore the previously saved OpenGL render states and matrices. ">popGLStates</a> </dd></dl>
</div>
</div>
<a id="aac7504990d27dada4bfe3c7866920765"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac7504990d27dada4bfe3c7866920765">&#9670;&nbsp;</a></span>resetGLStates()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::resetGLStates </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Reset the internal OpenGL states so that the target is ready for drawing. </p>
<p>This function can be used when you mix SFML drawing and direct OpenGL rendering, if you choose not to use pushGLStates/popGLStates. It makes sure that all OpenGL states needed by SFML are set, so that subsequent <a class="el" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39" title="Draw a drawable object to the render target. ">draw()</a> calls will work as expected.</p>
<p>Example: </p><div class="fragment"><div class="line"><span class="comment">// OpenGL code here...</span></div><div class="line">glPushAttrib(...);</div><div class="line">window.resetGLStates();</div><div class="line">window.draw(...);</div><div class="line">window.draw(...);</div><div class="line">glPopAttrib(...);</div><div class="line"><span class="comment">// OpenGL code here...</span></div></div><!-- fragment -->
</div>
</div>
<a id="a5da95ecdbce615a80bb78399012508cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5da95ecdbce615a80bb78399012508cf">&#9670;&nbsp;</a></span>setActive()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool sf::RenderTexture::setActive </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>active</em> = <code>true</code></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">
<p>Activate or deactivate the render-texture for rendering. </p>
<p>This function makes the render-texture's context current for future OpenGL rendering operations (so you shouldn't care about it if you're not doing direct OpenGL stuff). Only one context can be current in a thread, so if you want to draw OpenGL geometry to another render target (like a <a class="el" href="classsf_1_1RenderWindow.html" title="Window that can serve as a target for 2D drawing. ">RenderWindow</a>) don't forget to activate it again.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">active</td><td>True to activate, false to deactivate</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if operation was successful, false otherwise </dd></dl>
<p>Reimplemented from <a class="el" href="classsf_1_1RenderTarget.html#adc225ead22a70843ffa9b7eebefa0ce1">sf::RenderTarget</a>.</p>
</div>
</div>
<a id="af8f97b33512bf7d5b6be3da6f65f7365"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8f97b33512bf7d5b6be3da6f65f7365">&#9670;&nbsp;</a></span>setRepeated()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTexture::setRepeated </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>repeated</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable or disable texture repeating. </p>
<p>This function is similar to <a class="el" href="classsf_1_1Texture.html#aaa87d1eff053b9d4d34a24c784a28658" title="Enable or disable repeating. ">Texture::setRepeated</a>. This parameter is disabled by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">repeated</td><td>True to enable repeating, false to disable it</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTexture.html#a81c5a453a21c7e78299b062b97dc8c87" title="Tell whether the texture is repeated or not. ">isRepeated</a> </dd></dl>
</div>
</div>
<a id="af08991e63c6020865dd07b20e27305b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af08991e63c6020865dd07b20e27305b6">&#9670;&nbsp;</a></span>setSmooth()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTexture::setSmooth </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>smooth</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable or disable texture smoothing. </p>
<p>This function is similar to <a class="el" href="classsf_1_1Texture.html#a0c3bd6825b9a99714f10d44179d74324" title="Enable or disable the smooth filter. ">Texture::setSmooth</a>. This parameter is disabled by default.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">smooth</td><td>True to enable smoothing, false to disable it</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTexture.html#a5b43c007ab6643accc5dae84b5bc8f61" title="Tell whether the smooth filtering is enabled or not. ">isSmooth</a> </dd></dl>
</div>
</div>
<a id="a063db6dd0a14913504af30e50cb6d946"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a063db6dd0a14913504af30e50cb6d946">&#9670;&nbsp;</a></span>setView()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::RenderTarget::setView </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1View.html">View</a> &amp;&#160;</td>
<td class="paramname"><em>view</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Change the current active view. </p>
<p>The view is like a 2D camera, it controls which part of the 2D scene is visible, and how it is viewed in the render target. The new view will affect everything that is drawn, until another view is set. The render target keeps its own copy of the view object, so it is not necessary to keep the original one alive after calling this function. To restore the original view of the target, you can pass the result of <a class="el" href="classsf_1_1RenderTarget.html#ad3b533c3f899d7044d981ed607aef9be" title="Get the default view of the render target. ">getDefaultView()</a> to this function.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">view</td><td>New view to use</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1RenderTarget.html#a2c179503b4dcdf5282ef6426d317602c" title="Get the view currently in use in the render target. ">getView</a>, <a class="el" href="classsf_1_1RenderTarget.html#ad3b533c3f899d7044d981ed607aef9be" title="Get the default view of the render target. ">getDefaultView</a> </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="RenderTexture_8hpp_source.html">RenderTexture.hpp</a></li>
</ul>
</div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
</html>