2d-platformer/vendor/SFML-3.0.0/doc/html/structsf_1_1StencilMode.html

404 lines
34 KiB
HTML

<!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;charset=UTF-8" />
<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>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link rel="stylesheet" type="text/css" href="search/search.css" />
<link rel="stylesheet" type="text/css" href="searchOverrides.css" />
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 3.0.0</span>
</div>
</div>
<div id="content">
<div>
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="topics.html"><span>Topics</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>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
</span>
</div>
</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>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- 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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacesf.html">sf</a></li><li class="navelem"><a class="el" href="structsf_1_1StencilMode.html">StencilMode</a></li> </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#related">Related Symbols</a> &#124;
<a href="structsf_1_1StencilMode-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">sf::StencilMode Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div></div>
</div><!--header-->
<div class="contents">
<p>Stencil modes for drawing.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="StencilMode_8hpp_source.html">SFML/Graphics/StencilMode.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ad1b247f2844eb8dae366c4c8d8977ed2" id="r_ad1b247f2844eb8dae366c4c8d8977ed2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1">StencilComparison</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad1b247f2844eb8dae366c4c8d8977ed2">stencilComparison</a> {<a class="el" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a68eec46437c384d8dad18d5464ebc35c">StencilComparison::Always</a>}</td></tr>
<tr class="memdesc:ad1b247f2844eb8dae366c4c8d8977ed2"><td class="mdescLeft">&#160;</td><td class="mdescRight">The comparison we're performing the stencil test with. <br /></td></tr>
<tr class="separator:ad1b247f2844eb8dae366c4c8d8977ed2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4685ec755a0e33523c3f046636670011" id="r_a4685ec755a0e33523c3f046636670011"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfd">StencilUpdateOperation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4685ec755a0e33523c3f046636670011">stencilUpdateOperation</a></td></tr>
<tr class="memdesc:a4685ec755a0e33523c3f046636670011"><td class="mdescLeft">&#160;</td><td class="mdescRight">The update operation to perform if the stencil test passes. <br /></td></tr>
<tr class="separator:a4685ec755a0e33523c3f046636670011"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e39c228d32fce4822b4c0fce708b15a" id="r_a4e39c228d32fce4822b4c0fce708b15a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsf_1_1StencilValue.html">StencilValue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4e39c228d32fce4822b4c0fce708b15a">stencilReference</a> {0}</td></tr>
<tr class="memdesc:a4e39c228d32fce4822b4c0fce708b15a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The reference value we're performing the stencil test with. <br /></td></tr>
<tr class="separator:a4e39c228d32fce4822b4c0fce708b15a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae36b6ff4d2a4abcd5d50e21e1a7dbd00" id="r_ae36b6ff4d2a4abcd5d50e21e1a7dbd00"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsf_1_1StencilValue.html">StencilValue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae36b6ff4d2a4abcd5d50e21e1a7dbd00">stencilMask</a> {~0u}</td></tr>
<tr class="memdesc:ae36b6ff4d2a4abcd5d50e21e1a7dbd00"><td class="mdescLeft">&#160;</td><td class="mdescRight">The mask to apply to both the reference value and the value in the stencil buffer. <br /></td></tr>
<tr class="separator:ae36b6ff4d2a4abcd5d50e21e1a7dbd00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ea4a3427e49de1e788a3d0a5969d51" id="r_a85ea4a3427e49de1e788a3d0a5969d51"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a85ea4a3427e49de1e788a3d0a5969d51">stencilOnly</a> {}</td></tr>
<tr class="memdesc:a85ea4a3427e49de1e788a3d0a5969d51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether we should update the color buffer in addition to the stencil buffer. <br /></td></tr>
<tr class="separator:a85ea4a3427e49de1e788a3d0a5969d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="related" name="related"></a>
Related Symbols</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member symbols.) </p>
</td></tr>
<tr class="memitem:a51fba8b31d810e1a958c3feb2da1447e" id="r_a51fba8b31d810e1a958c3feb2da1447e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a51fba8b31d810e1a958c3feb2da1447e">operator==</a> (const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;left, const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;right)</td></tr>
<tr class="memdesc:a51fba8b31d810e1a958c3feb2da1447e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overload of the <code>operator==</code> <br /></td></tr>
<tr class="separator:a51fba8b31d810e1a958c3feb2da1447e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8233e8089756c2f13ecb37a721224a6" id="r_ad8233e8089756c2f13ecb37a721224a6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad8233e8089756c2f13ecb37a721224a6">operator!=</a> (const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;left, const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;right)</td></tr>
<tr class="memdesc:ad8233e8089756c2f13ecb37a721224a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overload of the <code>operator!=</code> <br /></td></tr>
<tr class="separator:ad8233e8089756c2f13ecb37a721224a6"><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>Stencil modes for drawing. </p>
<p><code><a class="el" href="structsf_1_1StencilMode.html" title="Stencil modes for drawing.">sf::StencilMode</a></code> is a class that controls stencil testing.</p>
<p>In addition to drawing to the visible portion of a render target, there is the possibility to "draw" to a so-called stencil buffer. The stencil buffer is a special non-visible buffer that can contain a single value per pixel that is drawn. This can be thought of as a fifth value in addition to red, green, blue and alpha values. The maximum value that can be represented depends on what is supported by the system. Typically support for a 8-bit stencil buffer should always be available. This will also have to be requested when creating a render target via the <code><a class="el" href="structsf_1_1ContextSettings.html" title="Structure defining the settings of the OpenGL context attached to a window.">sf::ContextSettings</a></code> that is passed during creation. Stencil testing will not work if there is no stencil buffer available in the target that is being drawn to.</p>
<p>Initially, just like with the visible color buffer, the stencil value of each pixel is set to an undefined value. Calling <code><a class="el" href="classsf_1_1RenderTarget.html#aee353fc2cd35edf0747e710301af3e4c" title="Clear the entire target with a single color.">sf::RenderTarget::clear</a></code> will set each pixel's stencil value to 0. <code><a class="el" href="classsf_1_1RenderTarget.html#aee353fc2cd35edf0747e710301af3e4c" title="Clear the entire target with a single color.">sf::RenderTarget::clear</a></code> can be called at any time to reset the stencil values back to 0.</p>
<p>When drawing an object, before each pixel of the color buffer is updated with its new color value, the stencil test is performed. During this test 2 values are compared with each other: the reference value that is passed via <code><a class="el" href="structsf_1_1StencilMode.html" title="Stencil modes for drawing.">sf::StencilMode</a></code> and the value that is currently in the stencil buffer. The arithmetic comparison that is performed on the 2 values can also be controlled via <code><a class="el" href="structsf_1_1StencilMode.html" title="Stencil modes for drawing.">sf::StencilMode</a></code>. Depending on whether the test passes i.e. the comparison yields <code>true</code>, the color buffer is updated with its new RGBA value and if set in <code><a class="el" href="structsf_1_1StencilMode.html" title="Stencil modes for drawing.">sf::StencilMode</a></code> the stencil buffer is updated accordingly. The new stencil value will be used during stencil testing the next time the pixel is drawn to.</p>
<p>The class is composed of 5 components, each of which has its own public member variable: </p><ul>
<li>Stencil Comparison (<a class="el" href="#ad1b247f2844eb8dae366c4c8d8977ed2">stencilComparison</a>) </li>
<li>Stencil Update Operation (<a class="el" href="#a4685ec755a0e33523c3f046636670011">stencilUpdateOperation</a>) </li>
<li>Stencil Reference Value (<a class="el" href="#a4e39c228d32fce4822b4c0fce708b15a">stencilReference</a>) </li>
<li>Stencil Mask Value (<a class="el" href="#ae36b6ff4d2a4abcd5d50e21e1a7dbd00">stencilMask</a>) </li>
<li>Stencil Only Update (<a class="el" href="#a85ea4a3427e49de1e788a3d0a5969d51">stencilOnly</a>)</li>
</ul>
<p>The stencil comparison specifies the comparison that is performed between the reference value of the currently active <code><a class="el" href="structsf_1_1StencilMode.html" title="Stencil modes for drawing.">sf::StencilMode</a></code> and the value that is currently in the stencil buffer. This comparison determines whether the stencil test passes or fails.</p>
<p>The stencil update operation specifies how the stencil buffer is updated if the stencil test passes. If the stencil test fails, neither the color or stencil buffers will be modified. If incrementing or decrementing the stencil value, the new value will be clamped to the range from 0 to the maximum representable value given the bit width of the stencil buffer e.g. 255 if an 8-bit stencil buffer is being used.</p>
<p>The reference value is used both during the comparison with the current stencil buffer value and as the new value to be written when the operation is set to Replace.</p>
<p>The mask value is used to mask the bits of both the reference value and the value in the stencil buffer during the comparison and when updating. The mask can be used to e.g. segment the stencil value bits into separate regions that are used for different purposes.</p>
<p>In certain situations, it might make sense to only write to the stencil buffer and not the color buffer during a draw. The written stencil buffer value can then be used in subsequent draws as a masking region.</p>
<p>In SFML, a stencil mode can be specified every time you draw a <code><a class="el" href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target.">sf::Drawable</a></code> object to a render target. It is part of the <code><a class="el" href="structsf_1_1RenderStates.html" title="Define the states used for drawing to a RenderTarget">sf::RenderStates</a></code> compound that is passed to the member function <code><a class="el" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39" title="Draw a drawable object to the render target.">sf::RenderTarget::draw()</a></code>.</p>
<p>Usage example: </p><div class="fragment"><div class="line"><span class="comment">// Make sure we create a RenderTarget with a stencil buffer by specifying it via the context settings</span></div>
<div class="line"><a class="code hl_class" href="classsf_1_1RenderWindow.html">sf::RenderWindow</a> window(<a class="code hl_class" href="classsf_1_1VideoMode.html">sf::VideoMode</a>({250, 200}), <span class="stringliteral">&quot;Stencil Window&quot;</span>, <a class="code hl_enumvalue" href="group__window.html#gga5e7da6549090361249790ccb464158cca5597cd420fc461807e4a201c92adea37">sf::Style::Default</a>, <a class="code hl_class" href="structsf_1_1ContextSettings.html">sf::ContextSettings</a>{0, 8});</div>
<div class="line"> </div>
<div class="line">...</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Left circle</span></div>
<div class="line">sf::CircleShape left(100.f);</div>
<div class="line">left.setFillColor(<a class="code hl_variable" href="classsf_1_1Color.html#a95629b30de8c6856aa7d3afed12eb865">sf::Color::Green</a>);</div>
<div class="line">left.setPosition({0, 0});</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Middle circle</span></div>
<div class="line"><a class="code hl_class" href="classsf_1_1CircleShape.html">sf::CircleShape</a> middle(100.f);</div>
<div class="line">middle.setFillColor(<a class="code hl_variable" href="classsf_1_1Color.html#af8896b5f56650935f5b9d72d528802c7">sf::Color::Yellow</a>);</div>
<div class="line">middle.setPosition({25, 0});</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Right circle</span></div>
<div class="line"><a class="code hl_class" href="classsf_1_1CircleShape.html">sf::CircleShape</a> right(100.f);</div>
<div class="line">right.setFillColor(<a class="code hl_variable" href="classsf_1_1Color.html#a127dbf55db9c07d0fa8f4bfcbb97594a">sf::Color::Red</a>);</div>
<div class="line">right.setPosition({50, 0});</div>
<div class="line"> </div>
<div class="line">...</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Clear the stencil buffer to 0 at the start of every frame</span></div>
<div class="line">window.clear(<a class="code hl_variable" href="classsf_1_1Color.html#a77c688197b981338f0b19dc58bd2facd">sf::Color::Black</a>, 0);</div>
<div class="line"> </div>
<div class="line">...</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Draw the middle circle in a stencil-only pass and write the value 1</span></div>
<div class="line"><span class="comment">// to the stencil buffer for every pixel the circle would have affected</span></div>
<div class="line">window.draw(middle, <a class="code hl_class" href="structsf_1_1StencilMode.html">sf::StencilMode</a>{<a class="code hl_enumvalue" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a68eec46437c384d8dad18d5464ebc35c">sf::StencilComparison::Always</a>, <a class="code hl_enumvalue" href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfda0ebe6df8a3ac338e0512acc741823fdb">sf::StencilUpdateOperation::Replace</a>, 1, 0xFF, <span class="keyword">true</span>});</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Draw the left and right circles</span></div>
<div class="line"><span class="comment">// Only allow rendering to pixels whose stencil value is not</span></div>
<div class="line"><span class="comment">// equal to 1 i.e. weren&#39;t written when drawing the middle circle</span></div>
<div class="line">window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(left, <a class="code hl_class" href="structsf_1_1StencilMode.html">sf::StencilMode</a>{<a class="code hl_enumvalue" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a19bb0af2c3c530538cb41aff7f235b96">sf::StencilComparison::NotEqual</a>, <a class="code hl_enumvalue" href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfda02bce93bff905887ad2233110bf9c49e">sf::StencilUpdateOperation::Keep</a>, 1, 0xFF, <span class="keyword">false</span>});</div>
<div class="line">window.<a class="code hl_function" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">draw</a>(right, <a class="code hl_class" href="structsf_1_1StencilMode.html">sf::StencilMode</a>{<a class="code hl_enumvalue" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a19bb0af2c3c530538cb41aff7f235b96">sf::StencilComparison::NotEqual</a>, <a class="code hl_enumvalue" href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfda02bce93bff905887ad2233110bf9c49e">sf::StencilUpdateOperation::Keep</a>, 1, 0xFF, <span class="keyword">false</span>});</div>
<div class="ttc" id="aclasssf_1_1CircleShape_html"><div class="ttname"><a href="classsf_1_1CircleShape.html">sf::CircleShape</a></div><div class="ttdoc">Specialized shape representing a circle.</div><div class="ttdef"><b>Definition</b> <a href="CircleShape_8hpp_source.html#l00045">CircleShape.hpp:46</a></div></div>
<div class="ttc" id="aclasssf_1_1Color_html_a127dbf55db9c07d0fa8f4bfcbb97594a"><div class="ttname"><a href="classsf_1_1Color.html#a127dbf55db9c07d0fa8f4bfcbb97594a">sf::Color::Red</a></div><div class="ttdeci">static const Color Red</div><div class="ttdoc">Red predefined color.</div><div class="ttdef"><b>Definition</b> <a href="Color_8hpp_source.html#l00084">Color.hpp:84</a></div></div>
<div class="ttc" id="aclasssf_1_1Color_html_a77c688197b981338f0b19dc58bd2facd"><div class="ttname"><a href="classsf_1_1Color.html#a77c688197b981338f0b19dc58bd2facd">sf::Color::Black</a></div><div class="ttdeci">static const Color Black</div><div class="ttdoc">Black predefined color.</div><div class="ttdef"><b>Definition</b> <a href="Color_8hpp_source.html#l00082">Color.hpp:82</a></div></div>
<div class="ttc" id="aclasssf_1_1Color_html_a95629b30de8c6856aa7d3afed12eb865"><div class="ttname"><a href="classsf_1_1Color.html#a95629b30de8c6856aa7d3afed12eb865">sf::Color::Green</a></div><div class="ttdeci">static const Color Green</div><div class="ttdoc">Green predefined color.</div><div class="ttdef"><b>Definition</b> <a href="Color_8hpp_source.html#l00085">Color.hpp:85</a></div></div>
<div class="ttc" id="aclasssf_1_1Color_html_af8896b5f56650935f5b9d72d528802c7"><div class="ttname"><a href="classsf_1_1Color.html#af8896b5f56650935f5b9d72d528802c7">sf::Color::Yellow</a></div><div class="ttdeci">static const Color Yellow</div><div class="ttdoc">Yellow predefined color.</div><div class="ttdef"><b>Definition</b> <a href="Color_8hpp_source.html#l00087">Color.hpp:87</a></div></div>
<div class="ttc" id="aclasssf_1_1RenderTarget_html_a12417a3bcc245c41d957b29583556f39"><div class="ttname"><a href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">sf::RenderTarget::draw</a></div><div class="ttdeci">void draw(const Drawable &amp;drawable, const RenderStates &amp;states=RenderStates::Default)</div><div class="ttdoc">Draw a drawable object to the render target.</div></div>
<div class="ttc" id="aclasssf_1_1RenderWindow_html"><div class="ttname"><a href="classsf_1_1RenderWindow.html">sf::RenderWindow</a></div><div class="ttdoc">Window that can serve as a target for 2D drawing.</div><div class="ttdef"><b>Definition</b> <a href="RenderWindow_8hpp_source.html#l00054">RenderWindow.hpp:55</a></div></div>
<div class="ttc" id="aclasssf_1_1VideoMode_html"><div class="ttname"><a href="classsf_1_1VideoMode.html">sf::VideoMode</a></div><div class="ttdoc">VideoMode defines a video mode (size, bpp)</div><div class="ttdef"><b>Definition</b> <a href="VideoMode_8hpp_source.html#l00043">VideoMode.hpp:44</a></div></div>
<div class="ttc" id="agroup__window_html_gga5e7da6549090361249790ccb464158cca5597cd420fc461807e4a201c92adea37"><div class="ttname"><a href="group__window.html#gga5e7da6549090361249790ccb464158cca5597cd420fc461807e4a201c92adea37">sf::Style::Default</a></div><div class="ttdeci">@ Default</div><div class="ttdoc">Default window style.</div><div class="ttdef"><b>Definition</b> <a href="WindowEnums_8hpp_source.html#l00045">WindowEnums.hpp:44</a></div></div>
<div class="ttc" id="anamespacesf_html_a5a1510ae19d01cf19178b8f3ef92a2a1a19bb0af2c3c530538cb41aff7f235b96"><div class="ttname"><a href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a19bb0af2c3c530538cb41aff7f235b96">sf::StencilComparison::NotEqual</a></div><div class="ttdeci">@ NotEqual</div><div class="ttdoc">The stencil test passes if the new value is strictly unequal to the value in the stencil buffer.</div></div>
<div class="ttc" id="anamespacesf_html_a5a1510ae19d01cf19178b8f3ef92a2a1a68eec46437c384d8dad18d5464ebc35c"><div class="ttname"><a href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a68eec46437c384d8dad18d5464ebc35c">sf::StencilComparison::Always</a></div><div class="ttdeci">@ Always</div><div class="ttdoc">The stencil test always passes.</div></div>
<div class="ttc" id="anamespacesf_html_accf495a19b2f6b4f8d9cff3dac777bfda02bce93bff905887ad2233110bf9c49e"><div class="ttname"><a href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfda02bce93bff905887ad2233110bf9c49e">sf::StencilUpdateOperation::Keep</a></div><div class="ttdeci">@ Keep</div><div class="ttdoc">If the stencil test passes, the value in the stencil buffer is not modified.</div></div>
<div class="ttc" id="anamespacesf_html_accf495a19b2f6b4f8d9cff3dac777bfda0ebe6df8a3ac338e0512acc741823fdb"><div class="ttname"><a href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfda0ebe6df8a3ac338e0512acc741823fdb">sf::StencilUpdateOperation::Replace</a></div><div class="ttdeci">@ Replace</div><div class="ttdoc">If the stencil test passes, the value in the stencil buffer is set to the new value.</div></div>
<div class="ttc" id="astructsf_1_1ContextSettings_html"><div class="ttname"><a href="structsf_1_1ContextSettings.html">sf::ContextSettings</a></div><div class="ttdoc">Structure defining the settings of the OpenGL context attached to a window.</div><div class="ttdef"><b>Definition</b> <a href="ContextSettings_8hpp_source.html#l00038">ContextSettings.hpp:39</a></div></div>
<div class="ttc" id="astructsf_1_1StencilMode_html"><div class="ttname"><a href="structsf_1_1StencilMode.html">sf::StencilMode</a></div><div class="ttdoc">Stencil modes for drawing.</div><div class="ttdef"><b>Definition</b> <a href="StencilMode_8hpp_source.html#l00106">StencilMode.hpp:107</a></div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><code><a class="el" href="structsf_1_1RenderStates.html" title="Define the states used for drawing to a RenderTarget">sf::RenderStates</a></code>, <code><a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...)">sf::RenderTarget</a></code> </dd></dl>
<p class="definition">Definition at line <a class="el" href="StencilMode_8hpp_source.html#l00106">106</a> of file <a class="el" href="StencilMode_8hpp_source.html">StencilMode.hpp</a>.</p>
</div><h2 class="groupheader">Friends And Related Symbol Documentation</h2>
<a id="ad8233e8089756c2f13ecb37a721224a6" name="ad8233e8089756c2f13ecb37a721224a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8233e8089756c2f13ecb37a721224a6">&#9670;&#160;</a></span>operator!=()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator!= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;</td> <td class="paramname"><span class="paramname"><em>left</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;</td> <td class="paramname"><span class="paramname"><em>right</em></span>&#160;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Overload of the <code>operator!=</code> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">left</td><td>Left operand </td></tr>
<tr><td class="paramname">right</td><td>Right operand</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if stencil modes are different, <code>false</code> if they are equal </dd></dl>
</div>
</div>
<a id="a51fba8b31d810e1a958c3feb2da1447e" name="a51fba8b31d810e1a958c3feb2da1447e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51fba8b31d810e1a958c3feb2da1447e">&#9670;&#160;</a></span>operator==()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator== </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;</td> <td class="paramname"><span class="paramname"><em>left</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structsf_1_1StencilMode.html">StencilMode</a> &amp;</td> <td class="paramname"><span class="paramname"><em>right</em></span>&#160;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Overload of the <code>operator==</code> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">left</td><td>Left operand </td></tr>
<tr><td class="paramname">right</td><td>Right operand</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if stencil modes are equal, <code>false</code> if they are different </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ad1b247f2844eb8dae366c4c8d8977ed2" name="ad1b247f2844eb8dae366c4c8d8977ed2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1b247f2844eb8dae366c4c8d8977ed2">&#9670;&#160;</a></span>stencilComparison</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1">StencilComparison</a> sf::StencilMode::stencilComparison {<a class="el" href="namespacesf.html#a5a1510ae19d01cf19178b8f3ef92a2a1a68eec46437c384d8dad18d5464ebc35c">StencilComparison::Always</a>}</td>
</tr>
</table>
</div><div class="memdoc">
<p>The comparison we're performing the stencil test with. </p>
<p class="definition">Definition at line <a class="el" href="StencilMode_8hpp_source.html#l00108">108</a> of file <a class="el" href="StencilMode_8hpp_source.html">StencilMode.hpp</a>.</p>
</div>
</div>
<a id="ae36b6ff4d2a4abcd5d50e21e1a7dbd00" name="ae36b6ff4d2a4abcd5d50e21e1a7dbd00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae36b6ff4d2a4abcd5d50e21e1a7dbd00">&#9670;&#160;</a></span>stencilMask</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structsf_1_1StencilValue.html">StencilValue</a> sf::StencilMode::stencilMask {~0u}</td>
</tr>
</table>
</div><div class="memdoc">
<p>The mask to apply to both the reference value and the value in the stencil buffer. </p>
<p class="definition">Definition at line <a class="el" href="StencilMode_8hpp_source.html#l00112">112</a> of file <a class="el" href="StencilMode_8hpp_source.html">StencilMode.hpp</a>.</p>
</div>
</div>
<a id="a85ea4a3427e49de1e788a3d0a5969d51" name="a85ea4a3427e49de1e788a3d0a5969d51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85ea4a3427e49de1e788a3d0a5969d51">&#9670;&#160;</a></span>stencilOnly</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::StencilMode::stencilOnly {}</td>
</tr>
</table>
</div><div class="memdoc">
<p>Whether we should update the color buffer in addition to the stencil buffer. </p>
<p class="definition">Definition at line <a class="el" href="StencilMode_8hpp_source.html#l00113">113</a> of file <a class="el" href="StencilMode_8hpp_source.html">StencilMode.hpp</a>.</p>
</div>
</div>
<a id="a4e39c228d32fce4822b4c0fce708b15a" name="a4e39c228d32fce4822b4c0fce708b15a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e39c228d32fce4822b4c0fce708b15a">&#9670;&#160;</a></span>stencilReference</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structsf_1_1StencilValue.html">StencilValue</a> sf::StencilMode::stencilReference {0}</td>
</tr>
</table>
</div><div class="memdoc">
<p>The reference value we're performing the stencil test with. </p>
<p class="definition">Definition at line <a class="el" href="StencilMode_8hpp_source.html#l00111">111</a> of file <a class="el" href="StencilMode_8hpp_source.html">StencilMode.hpp</a>.</p>
</div>
</div>
<a id="a4685ec755a0e33523c3f046636670011" name="a4685ec755a0e33523c3f046636670011"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4685ec755a0e33523c3f046636670011">&#9670;&#160;</a></span>stencilUpdateOperation</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfd">StencilUpdateOperation</a> sf::StencilMode::stencilUpdateOperation</td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">{</div>
<div class="line"> <a class="code hl_enumvalue" href="namespacesf.html#accf495a19b2f6b4f8d9cff3dac777bfda02bce93bff905887ad2233110bf9c49e">StencilUpdateOperation::Keep</a>}</div>
</div><!-- fragment -->
<p>The update operation to perform if the stencil test passes. </p>
<p class="definition">Definition at line <a class="el" href="StencilMode_8hpp_source.html#l00109">109</a> of file <a class="el" href="StencilMode_8hpp_source.html">StencilMode.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="StencilMode_8hpp_source.html">StencilMode.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>