shooter/SFML-mingw32/doc/html/classsf_1_1Shader.html

2093 lines
126 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_1Shader.html">Shader</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="classsf_1_1Shader-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sf::Shader Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">Shader</a> class (vertex, geometry and fragment)
<a href="classsf_1_1Shader.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="Shader_8hpp_source.html">Shader.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::Shader:</div>
<div class="dyncontent">
<div class="center">
<img src="classsf_1_1Shader.png" usemap="#sf::Shader_map" alt=""/>
<map id="sf::Shader_map" name="sf::Shader_map">
<area href="classsf_1_1GlResource.html" title="Base class for classes that require an OpenGL context. " alt="sf::GlResource" shape="rect" coords="0,0,105,24"/>
<area href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable. " alt="sf::NonCopyable" shape="rect" coords="115,0,220,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Special type that can be passed to <a class="el" href="classsf_1_1Shader.html#abf78e3bea1e9b0bab850b6b0a0de29c7" title="Specify value for float uniform. ">setUniform()</a>, and that represents the texture of the object being drawn. <a href="structsf_1_1Shader_1_1CurrentTextureType.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:afaa1aa65e5de37b74d047da9def9f9b3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a> { <a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3a8718008f827eb32e29bbdd1791c62dce">Vertex</a>,
<a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3a812421100fd57456727375938fb62788">Geometry</a>,
<a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3ace6e88eec3a56b2e55ee3c8e64e9b89a">Fragment</a>
}</td></tr>
<tr class="memdesc:afaa1aa65e5de37b74d047da9def9f9b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Types of shaders. <a href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">More...</a><br /></td></tr>
<tr class="separator:afaa1aa65e5de37b74d047da9def9f9b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a1d7f28f26b4122959fcafec871c2c3c5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a1d7f28f26b4122959fcafec871c2c3c5">Shader</a> ()</td></tr>
<tr class="memdesc:a1d7f28f26b4122959fcafec871c2c3c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a1d7f28f26b4122959fcafec871c2c3c5">More...</a><br /></td></tr>
<tr class="separator:a1d7f28f26b4122959fcafec871c2c3c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bac6cc8b046ecd8fb967c145a2380e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a4bac6cc8b046ecd8fb967c145a2380e6">~Shader</a> ()</td></tr>
<tr class="memdesc:a4bac6cc8b046ecd8fb967c145a2380e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a4bac6cc8b046ecd8fb967c145a2380e6">More...</a><br /></td></tr>
<tr class="separator:a4bac6cc8b046ecd8fb967c145a2380e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a053a5632848ebaca2fcd8ba29abe9e6e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e">loadFromFile</a> (const std::string &amp;filename, <a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a> type)</td></tr>
<tr class="memdesc:a053a5632848ebaca2fcd8ba29abe9e6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the vertex, geometry or fragment shader from a file. <a href="#a053a5632848ebaca2fcd8ba29abe9e6e">More...</a><br /></td></tr>
<tr class="separator:a053a5632848ebaca2fcd8ba29abe9e6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9d7289966fcef562eeb92271c03e3dc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ac9d7289966fcef562eeb92271c03e3dc">loadFromFile</a> (const std::string &amp;vertexShaderFilename, const std::string &amp;fragmentShaderFilename)</td></tr>
<tr class="memdesc:ac9d7289966fcef562eeb92271c03e3dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load both the vertex and fragment shaders from files. <a href="#ac9d7289966fcef562eeb92271c03e3dc">More...</a><br /></td></tr>
<tr class="separator:ac9d7289966fcef562eeb92271c03e3dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a295d8468811ca15bf9c5401a7a7d4f54"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a295d8468811ca15bf9c5401a7a7d4f54">loadFromFile</a> (const std::string &amp;vertexShaderFilename, const std::string &amp;geometryShaderFilename, const std::string &amp;fragmentShaderFilename)</td></tr>
<tr class="memdesc:a295d8468811ca15bf9c5401a7a7d4f54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the vertex, geometry and fragment shaders from files. <a href="#a295d8468811ca15bf9c5401a7a7d4f54">More...</a><br /></td></tr>
<tr class="separator:a295d8468811ca15bf9c5401a7a7d4f54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac92d46bf71dff2d791117e4e472148aa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa">loadFromMemory</a> (const std::string &amp;shader, <a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a> type)</td></tr>
<tr class="memdesc:ac92d46bf71dff2d791117e4e472148aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the vertex, geometry or fragment shader from a source code in memory. <a href="#ac92d46bf71dff2d791117e4e472148aa">More...</a><br /></td></tr>
<tr class="separator:ac92d46bf71dff2d791117e4e472148aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae34e94070d7547a890166b7993658a9b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ae34e94070d7547a890166b7993658a9b">loadFromMemory</a> (const std::string &amp;vertexShader, const std::string &amp;fragmentShader)</td></tr>
<tr class="memdesc:ae34e94070d7547a890166b7993658a9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load both the vertex and fragment shaders from source codes in memory. <a href="#ae34e94070d7547a890166b7993658a9b">More...</a><br /></td></tr>
<tr class="separator:ae34e94070d7547a890166b7993658a9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8c8b715b02aba2cf7c0a0e0c0984250"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ab8c8b715b02aba2cf7c0a0e0c0984250">loadFromMemory</a> (const std::string &amp;vertexShader, const std::string &amp;geometryShader, const std::string &amp;fragmentShader)</td></tr>
<tr class="memdesc:ab8c8b715b02aba2cf7c0a0e0c0984250"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the vertex, geometry and fragment shaders from source codes in memory. <a href="#ab8c8b715b02aba2cf7c0a0e0c0984250">More...</a><br /></td></tr>
<tr class="separator:ab8c8b715b02aba2cf7c0a0e0c0984250"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ee1b130c0606e4f8bcdf65c1efc2a53"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53">loadFromStream</a> (<a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;stream, <a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a> type)</td></tr>
<tr class="memdesc:a2ee1b130c0606e4f8bcdf65c1efc2a53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the vertex, geometry or fragment shader from a custom stream. <a href="#a2ee1b130c0606e4f8bcdf65c1efc2a53">More...</a><br /></td></tr>
<tr class="separator:a2ee1b130c0606e4f8bcdf65c1efc2a53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b7958159ffb5596c4babc3052e35465"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a3b7958159ffb5596c4babc3052e35465">loadFromStream</a> (<a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;vertexShaderStream, <a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;fragmentShaderStream)</td></tr>
<tr class="memdesc:a3b7958159ffb5596c4babc3052e35465"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load both the vertex and fragment shaders from custom streams. <a href="#a3b7958159ffb5596c4babc3052e35465">More...</a><br /></td></tr>
<tr class="separator:a3b7958159ffb5596c4babc3052e35465"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa08f1c091806205e6654db9d83197fcd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aa08f1c091806205e6654db9d83197fcd">loadFromStream</a> (<a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;vertexShaderStream, <a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;geometryShaderStream, <a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;fragmentShaderStream)</td></tr>
<tr class="memdesc:aa08f1c091806205e6654db9d83197fcd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load the vertex, geometry and fragment shaders from custom streams. <a href="#aa08f1c091806205e6654db9d83197fcd">More...</a><br /></td></tr>
<tr class="separator:aa08f1c091806205e6654db9d83197fcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf78e3bea1e9b0bab850b6b0a0de29c7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#abf78e3bea1e9b0bab850b6b0a0de29c7">setUniform</a> (const std::string &amp;name, float x)</td></tr>
<tr class="memdesc:abf78e3bea1e9b0bab850b6b0a0de29c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>float</code> uniform. <a href="#abf78e3bea1e9b0bab850b6b0a0de29c7">More...</a><br /></td></tr>
<tr class="separator:abf78e3bea1e9b0bab850b6b0a0de29c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a2c673c41e37b17d67e4af1298b679f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a4a2c673c41e37b17d67e4af1298b679f">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#adeed356d346d87634b4c197a530e4edf">Glsl::Vec2</a> &amp;vector)</td></tr>
<tr class="memdesc:a4a2c673c41e37b17d67e4af1298b679f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>vec2</code> uniform. <a href="#a4a2c673c41e37b17d67e4af1298b679f">More...</a><br /></td></tr>
<tr class="separator:a4a2c673c41e37b17d67e4af1298b679f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad654ad8de6f0c56191fa7b8cea21db2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aad654ad8de6f0c56191fa7b8cea21db2">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a9bdd0463b7cb5316244a082007bd50f0">Glsl::Vec3</a> &amp;vector)</td></tr>
<tr class="memdesc:aad654ad8de6f0c56191fa7b8cea21db2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>vec3</code> uniform. <a href="#aad654ad8de6f0c56191fa7b8cea21db2">More...</a><br /></td></tr>
<tr class="separator:aad654ad8de6f0c56191fa7b8cea21db2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc1aee8343800680fd62e1f3d43c24bf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#abc1aee8343800680fd62e1f3d43c24bf">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a7c67253548c58adb77cb14f847f18f83">Glsl::Vec4</a> &amp;vector)</td></tr>
<tr class="memdesc:abc1aee8343800680fd62e1f3d43c24bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>vec4</code> uniform. <a href="#abc1aee8343800680fd62e1f3d43c24bf">More...</a><br /></td></tr>
<tr class="separator:abc1aee8343800680fd62e1f3d43c24bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4fc8b4c18e6b653952bce5c8c81e4a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ae4fc8b4c18e6b653952bce5c8c81e4a0">setUniform</a> (const std::string &amp;name, int x)</td></tr>
<tr class="memdesc:ae4fc8b4c18e6b653952bce5c8c81e4a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>int</code> uniform. <a href="#ae4fc8b4c18e6b653952bce5c8c81e4a0">More...</a><br /></td></tr>
<tr class="separator:ae4fc8b4c18e6b653952bce5c8c81e4a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ccb5bae59cedc7d6a9b533c97f7d1ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a2ccb5bae59cedc7d6a9b533c97f7d1ed">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#aab803ee70c4b7bfcd63ec09e10408fd3">Glsl::Ivec2</a> &amp;vector)</td></tr>
<tr class="memdesc:a2ccb5bae59cedc7d6a9b533c97f7d1ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>ivec2</code> uniform. <a href="#a2ccb5bae59cedc7d6a9b533c97f7d1ed">More...</a><br /></td></tr>
<tr class="separator:a2ccb5bae59cedc7d6a9b533c97f7d1ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e328e3e97cd753fdc7b842f4b0f202e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a9e328e3e97cd753fdc7b842f4b0f202e">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a64f403dd0219e7f128ffddca641394df">Glsl::Ivec3</a> &amp;vector)</td></tr>
<tr class="memdesc:a9e328e3e97cd753fdc7b842f4b0f202e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>ivec3</code> uniform. <a href="#a9e328e3e97cd753fdc7b842f4b0f202e">More...</a><br /></td></tr>
<tr class="separator:a9e328e3e97cd753fdc7b842f4b0f202e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a380e7a5a2896162c5fd08966c4523790"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a380e7a5a2896162c5fd08966c4523790">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a778682c4f085d2daeb90c724791f3f68">Glsl::Ivec4</a> &amp;vector)</td></tr>
<tr class="memdesc:a380e7a5a2896162c5fd08966c4523790"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>ivec4</code> uniform. <a href="#a380e7a5a2896162c5fd08966c4523790">More...</a><br /></td></tr>
<tr class="separator:a380e7a5a2896162c5fd08966c4523790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af417027ac72c06e6cfbf30975cd678e9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#af417027ac72c06e6cfbf30975cd678e9">setUniform</a> (const std::string &amp;name, bool x)</td></tr>
<tr class="memdesc:af417027ac72c06e6cfbf30975cd678e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>bool</code> uniform. <a href="#af417027ac72c06e6cfbf30975cd678e9">More...</a><br /></td></tr>
<tr class="separator:af417027ac72c06e6cfbf30975cd678e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2518b8dd0762e682b452a5d5005f2bf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ab2518b8dd0762e682b452a5d5005f2bf">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a59d8cf909c3d71ebf3db057480b464da">Glsl::Bvec2</a> &amp;vector)</td></tr>
<tr class="memdesc:ab2518b8dd0762e682b452a5d5005f2bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>bvec2</code> uniform. <a href="#ab2518b8dd0762e682b452a5d5005f2bf">More...</a><br /></td></tr>
<tr class="separator:ab2518b8dd0762e682b452a5d5005f2bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab06830875c82476fbb9c975cdeb78a11"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ab06830875c82476fbb9c975cdeb78a11">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a4166ffc506619b4912d576e6eba2c957">Glsl::Bvec3</a> &amp;vector)</td></tr>
<tr class="memdesc:ab06830875c82476fbb9c975cdeb78a11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>bvec3</code> uniform. <a href="#ab06830875c82476fbb9c975cdeb78a11">More...</a><br /></td></tr>
<tr class="separator:ab06830875c82476fbb9c975cdeb78a11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8db3e0adf1129abf24f0a51a7ec36f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ac8db3e0adf1129abf24f0a51a7ec36f4">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a8b1f0ac369666c48a9eafc9d3f5618e6">Glsl::Bvec4</a> &amp;vector)</td></tr>
<tr class="memdesc:ac8db3e0adf1129abf24f0a51a7ec36f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>bvec4</code> uniform. <a href="#ac8db3e0adf1129abf24f0a51a7ec36f4">More...</a><br /></td></tr>
<tr class="separator:ac8db3e0adf1129abf24f0a51a7ec36f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1198ae0152d439bc05781046883e281"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ac1198ae0152d439bc05781046883e281">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a9e984ebdc1cebc693a12f01a32b2d28d">Glsl::Mat3</a> &amp;matrix)</td></tr>
<tr class="memdesc:ac1198ae0152d439bc05781046883e281"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>mat3</code> matrix. <a href="#ac1198ae0152d439bc05781046883e281">More...</a><br /></td></tr>
<tr class="separator:ac1198ae0152d439bc05781046883e281"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca5c55c4a3b23d21e33dbdaab7990755"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aca5c55c4a3b23d21e33dbdaab7990755">setUniform</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a769de806596348a8e56ed6506c688271">Glsl::Mat4</a> &amp;matrix)</td></tr>
<tr class="memdesc:aca5c55c4a3b23d21e33dbdaab7990755"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify value for <code>mat4</code> matrix. <a href="#aca5c55c4a3b23d21e33dbdaab7990755">More...</a><br /></td></tr>
<tr class="separator:aca5c55c4a3b23d21e33dbdaab7990755"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7806a29ffbd0ee9251256a9e7265d479"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a7806a29ffbd0ee9251256a9e7265d479">setUniform</a> (const std::string &amp;name, const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;texture)</td></tr>
<tr class="memdesc:a7806a29ffbd0ee9251256a9e7265d479"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify a texture as <code>sampler2D</code> uniform. <a href="#a7806a29ffbd0ee9251256a9e7265d479">More...</a><br /></td></tr>
<tr class="separator:a7806a29ffbd0ee9251256a9e7265d479"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab18f531e1f726b88fec1cf5a1e6af26d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ab18f531e1f726b88fec1cf5a1e6af26d">setUniform</a> (const std::string &amp;name, <a class="el" href="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a>)</td></tr>
<tr class="memdesc:ab18f531e1f726b88fec1cf5a1e6af26d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify current texture as <code>sampler2D</code> uniform. <a href="#ab18f531e1f726b88fec1cf5a1e6af26d">More...</a><br /></td></tr>
<tr class="separator:ab18f531e1f726b88fec1cf5a1e6af26d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a731d3b9953c50fe7d3fb03340b97deff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a731d3b9953c50fe7d3fb03340b97deff">setUniformArray</a> (const std::string &amp;name, const float *scalarArray, std::size_t length)</td></tr>
<tr class="memdesc:a731d3b9953c50fe7d3fb03340b97deff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify values for <code>float</code>[] array uniform. <a href="#a731d3b9953c50fe7d3fb03340b97deff">More...</a><br /></td></tr>
<tr class="separator:a731d3b9953c50fe7d3fb03340b97deff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2e2eab45d9a091f3720c0879a5bb026"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ab2e2eab45d9a091f3720c0879a5bb026">setUniformArray</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#adeed356d346d87634b4c197a530e4edf">Glsl::Vec2</a> *vectorArray, std::size_t length)</td></tr>
<tr class="memdesc:ab2e2eab45d9a091f3720c0879a5bb026"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify values for <code>vec2</code>[] array uniform. <a href="#ab2e2eab45d9a091f3720c0879a5bb026">More...</a><br /></td></tr>
<tr class="separator:ab2e2eab45d9a091f3720c0879a5bb026"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeae884292fed977bbea5039818f208e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aeae884292fed977bbea5039818f208e7">setUniformArray</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a9bdd0463b7cb5316244a082007bd50f0">Glsl::Vec3</a> *vectorArray, std::size_t length)</td></tr>
<tr class="memdesc:aeae884292fed977bbea5039818f208e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify values for <code>vec3</code>[] array uniform. <a href="#aeae884292fed977bbea5039818f208e7">More...</a><br /></td></tr>
<tr class="separator:aeae884292fed977bbea5039818f208e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa89ac1ea7918c9b1c2232df59affb7fa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aa89ac1ea7918c9b1c2232df59affb7fa">setUniformArray</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a7c67253548c58adb77cb14f847f18f83">Glsl::Vec4</a> *vectorArray, std::size_t length)</td></tr>
<tr class="memdesc:aa89ac1ea7918c9b1c2232df59affb7fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify values for <code>vec4</code>[] array uniform. <a href="#aa89ac1ea7918c9b1c2232df59affb7fa">More...</a><br /></td></tr>
<tr class="separator:aa89ac1ea7918c9b1c2232df59affb7fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69587701d347ba21d506197d0fb9f842"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a69587701d347ba21d506197d0fb9f842">setUniformArray</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a9e984ebdc1cebc693a12f01a32b2d28d">Glsl::Mat3</a> *matrixArray, std::size_t length)</td></tr>
<tr class="memdesc:a69587701d347ba21d506197d0fb9f842"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify values for <code>mat3</code>[] array uniform. <a href="#a69587701d347ba21d506197d0fb9f842">More...</a><br /></td></tr>
<tr class="separator:a69587701d347ba21d506197d0fb9f842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a066b0ba02e1c1bddc9e2571eca1156ab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a066b0ba02e1c1bddc9e2571eca1156ab">setUniformArray</a> (const std::string &amp;name, const <a class="el" href="namespacesf_1_1Glsl.html#a769de806596348a8e56ed6506c688271">Glsl::Mat4</a> *matrixArray, std::size_t length)</td></tr>
<tr class="memdesc:a066b0ba02e1c1bddc9e2571eca1156ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specify values for <code>mat4</code>[] array uniform. <a href="#a066b0ba02e1c1bddc9e2571eca1156ab">More...</a><br /></td></tr>
<tr class="separator:a066b0ba02e1c1bddc9e2571eca1156ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47e4dd78f0752ae08664b4ee616db1cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a47e4dd78f0752ae08664b4ee616db1cf">setParameter</a> (const std::string &amp;name, float x)</td></tr>
<tr class="memdesc:a47e4dd78f0752ae08664b4ee616db1cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a float parameter of the shader. <a href="#a47e4dd78f0752ae08664b4ee616db1cf">More...</a><br /></td></tr>
<tr class="separator:a47e4dd78f0752ae08664b4ee616db1cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8d379f40810b8e3eadebee81aedd231"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ab8d379f40810b8e3eadebee81aedd231">setParameter</a> (const std::string &amp;name, float x, float y)</td></tr>
<tr class="memdesc:ab8d379f40810b8e3eadebee81aedd231"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 2-components vector parameter of the shader. <a href="#ab8d379f40810b8e3eadebee81aedd231">More...</a><br /></td></tr>
<tr class="separator:ab8d379f40810b8e3eadebee81aedd231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e36e044d6b8adca8339f40c5a4b1801"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a7e36e044d6b8adca8339f40c5a4b1801">setParameter</a> (const std::string &amp;name, float x, float y, float z)</td></tr>
<tr class="memdesc:a7e36e044d6b8adca8339f40c5a4b1801"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 3-components vector parameter of the shader. <a href="#a7e36e044d6b8adca8339f40c5a4b1801">More...</a><br /></td></tr>
<tr class="separator:a7e36e044d6b8adca8339f40c5a4b1801"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb468f1bc2d26750b96b74f1e19027fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aeb468f1bc2d26750b96b74f1e19027fb">setParameter</a> (const std::string &amp;name, float x, float y, float z, float w)</td></tr>
<tr class="memdesc:aeb468f1bc2d26750b96b74f1e19027fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 4-components vector parameter of the shader. <a href="#aeb468f1bc2d26750b96b74f1e19027fb">More...</a><br /></td></tr>
<tr class="separator:aeb468f1bc2d26750b96b74f1e19027fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ac473ece2c6fa26dc5032c07fd7288e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a3ac473ece2c6fa26dc5032c07fd7288e">setParameter</a> (const std::string &amp;name, const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;vector)</td></tr>
<tr class="memdesc:a3ac473ece2c6fa26dc5032c07fd7288e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 2-components vector parameter of the shader. <a href="#a3ac473ece2c6fa26dc5032c07fd7288e">More...</a><br /></td></tr>
<tr class="separator:a3ac473ece2c6fa26dc5032c07fd7288e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87d4a0c6dc70ae68aecc0dda3f343c07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a87d4a0c6dc70ae68aecc0dda3f343c07">setParameter</a> (const std::string &amp;name, const <a class="el" href="classsf_1_1Vector3.html">Vector3f</a> &amp;vector)</td></tr>
<tr class="memdesc:a87d4a0c6dc70ae68aecc0dda3f343c07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a 3-components vector parameter of the shader. <a href="#a87d4a0c6dc70ae68aecc0dda3f343c07">More...</a><br /></td></tr>
<tr class="separator:a87d4a0c6dc70ae68aecc0dda3f343c07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8618119ed4399df3fd33e78ee96b4fc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#aa8618119ed4399df3fd33e78ee96b4fc">setParameter</a> (const std::string &amp;name, const <a class="el" href="classsf_1_1Color.html">Color</a> &amp;color)</td></tr>
<tr class="memdesc:aa8618119ed4399df3fd33e78ee96b4fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a color parameter of the shader. <a href="#aa8618119ed4399df3fd33e78ee96b4fc">More...</a><br /></td></tr>
<tr class="separator:aa8618119ed4399df3fd33e78ee96b4fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8599ee1348407025039b89ddf3f7cb62"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a8599ee1348407025039b89ddf3f7cb62">setParameter</a> (const std::string &amp;name, const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp;transform)</td></tr>
<tr class="memdesc:a8599ee1348407025039b89ddf3f7cb62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a matrix parameter of the shader. <a href="#a8599ee1348407025039b89ddf3f7cb62">More...</a><br /></td></tr>
<tr class="separator:a8599ee1348407025039b89ddf3f7cb62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f58ab5c0a1084f238dfcec86602daa1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a7f58ab5c0a1084f238dfcec86602daa1">setParameter</a> (const std::string &amp;name, const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;texture)</td></tr>
<tr class="memdesc:a7f58ab5c0a1084f238dfcec86602daa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a texture parameter of the shader. <a href="#a7f58ab5c0a1084f238dfcec86602daa1">More...</a><br /></td></tr>
<tr class="separator:a7f58ab5c0a1084f238dfcec86602daa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af06b4cba0bab915fa01032b063909044"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#af06b4cba0bab915fa01032b063909044">setParameter</a> (const std::string &amp;name, <a class="el" href="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a>)</td></tr>
<tr class="memdesc:af06b4cba0bab915fa01032b063909044"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change a texture parameter of the shader. <a href="#af06b4cba0bab915fa01032b063909044">More...</a><br /></td></tr>
<tr class="separator:af06b4cba0bab915fa01032b063909044"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac14d0bf7afe7b6bb415d309f9c707188"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ac14d0bf7afe7b6bb415d309f9c707188">getNativeHandle</a> () const</td></tr>
<tr class="memdesc:ac14d0bf7afe7b6bb415d309f9c707188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the underlying OpenGL handle of the shader. <a href="#ac14d0bf7afe7b6bb415d309f9c707188">More...</a><br /></td></tr>
<tr class="separator:ac14d0bf7afe7b6bb415d309f9c707188"><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:a09778f78afcbeb854d608c8dacd8ea30"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a09778f78afcbeb854d608c8dacd8ea30">bind</a> (const <a class="el" href="classsf_1_1Shader.html">Shader</a> *shader)</td></tr>
<tr class="memdesc:a09778f78afcbeb854d608c8dacd8ea30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bind a shader for rendering. <a href="#a09778f78afcbeb854d608c8dacd8ea30">More...</a><br /></td></tr>
<tr class="separator:a09778f78afcbeb854d608c8dacd8ea30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad22474690bafe4a305c1b9826b1bd86a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ad22474690bafe4a305c1b9826b1bd86a">isAvailable</a> ()</td></tr>
<tr class="memdesc:ad22474690bafe4a305c1b9826b1bd86a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether or not the system supports shaders. <a href="#ad22474690bafe4a305c1b9826b1bd86a">More...</a><br /></td></tr>
<tr class="separator:ad22474690bafe4a305c1b9826b1bd86a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45db14baf1bbc688577f81813b1fce96"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#a45db14baf1bbc688577f81813b1fce96">isGeometryAvailable</a> ()</td></tr>
<tr class="memdesc:a45db14baf1bbc688577f81813b1fce96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether or not the system supports geometry shaders. <a href="#a45db14baf1bbc688577f81813b1fce96">More...</a><br /></td></tr>
<tr class="separator:a45db14baf1bbc688577f81813b1fce96"><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-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:ac84c7953eec2e19358ea6e2cc5385b8d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d">CurrentTexture</a></td></tr>
<tr class="memdesc:ac84c7953eec2e19358ea6e2cc5385b8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents the texture of the object being drawn. <a href="#ac84c7953eec2e19358ea6e2cc5385b8d">More...</a><br /></td></tr>
<tr class="separator:ac84c7953eec2e19358ea6e2cc5385b8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:ab171bdaf5eb36789da14b30a846db471"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1GlResource.html#ab171bdaf5eb36789da14b30a846db471">registerContextDestroyCallback</a> (ContextDestroyCallback callback, void *arg)</td></tr>
<tr class="memdesc:ab171bdaf5eb36789da14b30a846db471"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a function to be called when a context is destroyed. <a href="#ab171bdaf5eb36789da14b30a846db471">More...</a><br /></td></tr>
<tr class="separator:ab171bdaf5eb36789da14b30a846db471"><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><a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">Shader</a> class (vertex, geometry and fragment) </p>
<p>Shaders are programs written using a specific language, executed directly by the graphics card and allowing to apply real-time operations to the rendered entities.</p>
<p>There are three kinds of shaders: </p><ul>
<li>Vertex shaders, that process vertices </li>
<li>Geometry shaders, that process primitives </li>
<li>Fragment (pixel) shaders, that process pixels</li>
</ul>
<p>A <a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">sf::Shader</a> can be composed of either a vertex shader alone, a geometry shader alone, a fragment shader alone, or any combination of them. (see the variants of the load functions).</p>
<p>Shaders are written in GLSL, which is a C-like language dedicated to OpenGL shaders. You'll probably need to learn its basics before writing your own shaders for SFML.</p>
<p>Like any C/C++ program, a GLSL shader has its own variables called <em>uniforms</em> that you can set from your C++ application. <a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">sf::Shader</a> handles different types of uniforms: </p><ul>
<li>scalars: <code>float</code>, <code>int</code>, <code>bool</code> </li>
<li>vectors (2, 3 or 4 components) </li>
<li>matrices (3x3 or 4x4) </li>
<li>samplers (textures)</li>
</ul>
<p>Some SFML-specific types can be converted: </p><ul>
<li><a class="el" href="classsf_1_1Color.html" title="Utility class for manipulating RGBA colors. ">sf::Color</a> as a 4D vector (<code>vec4</code>) </li>
<li><a class="el" href="classsf_1_1Transform.html" title="Define a 3x3 transform matrix. ">sf::Transform</a> as matrices (<code>mat3</code> or <code>mat4</code>)</li>
</ul>
<p>Every uniform variable in a shader can be set through one of the <a class="el" href="classsf_1_1Shader.html#abf78e3bea1e9b0bab850b6b0a0de29c7" title="Specify value for float uniform. ">setUniform()</a> or <a class="el" href="classsf_1_1Shader.html#a731d3b9953c50fe7d3fb03340b97deff" title="Specify values for float[] array uniform. ">setUniformArray()</a> overloads. For example, if you have a shader with the following uniforms: </p><div class="fragment"><div class="line">uniform <span class="keywordtype">float</span> offset;</div><div class="line">uniform vec3 point;</div><div class="line">uniform vec4 color;</div><div class="line">uniform mat4 matrix;</div><div class="line">uniform sampler2D overlay;</div><div class="line">uniform sampler2D current;</div></div><!-- fragment --><p> You can set their values from C++ code as follows, using the types defined in the <a class="el" href="namespacesf_1_1Glsl.html" title="Namespace with GLSL types. ">sf::Glsl</a> namespace: </p><div class="fragment"><div class="line">shader.setUniform(<span class="stringliteral">&quot;offset&quot;</span>, 2.f);</div><div class="line">shader.setUniform(<span class="stringliteral">&quot;point&quot;</span>, <a class="code" href="classsf_1_1Vector3.html">sf::Vector3f</a>(0.5f, 0.8f, 0.3f));</div><div class="line">shader.setUniform(<span class="stringliteral">&quot;color&quot;</span>, <a class="code" href="namespacesf_1_1Glsl.html#a7c67253548c58adb77cb14f847f18f83">sf::Glsl::Vec4</a>(color)); <span class="comment">// color is a sf::Color</span></div><div class="line">shader.setUniform(<span class="stringliteral">&quot;matrix&quot;</span>, <a class="code" href="namespacesf_1_1Glsl.html#a769de806596348a8e56ed6506c688271">sf::Glsl::Mat4</a>(transform)); <span class="comment">// transform is a sf::Transform</span></div><div class="line">shader.setUniform(<span class="stringliteral">&quot;overlay&quot;</span>, texture); <span class="comment">// texture is a sf::Texture</span></div><div class="line">shader.setUniform(<span class="stringliteral">&quot;current&quot;</span>, <a class="code" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d">sf::Shader::CurrentTexture</a>);</div></div><!-- fragment --><p>The old <a class="el" href="classsf_1_1Shader.html#a47e4dd78f0752ae08664b4ee616db1cf" title="Change a float parameter of the shader. ">setParameter()</a> overloads are deprecated and will be removed in a future version. You should use their <a class="el" href="classsf_1_1Shader.html#abf78e3bea1e9b0bab850b6b0a0de29c7" title="Specify value for float uniform. ">setUniform()</a> equivalents instead.</p>
<p>The special <a class="el" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d" title="Represents the texture of the object being drawn. ">Shader::CurrentTexture</a> argument maps the given <code>sampler2D</code> uniform to the current texture of the object being drawn (which cannot be known in advance).</p>
<p>To apply a shader to a drawable, you must pass it as an additional parameter to the <a class="el" href="classsf_1_1RenderTarget.html#a12417a3bcc245c41d957b29583556f39">RenderWindow::draw</a> function: </p><div class="fragment"><div class="line">window.draw(sprite, &amp;shader);</div></div><!-- fragment --><p>... which is in fact just a shortcut for this: </p><div class="fragment"><div class="line"><a class="code" href="classsf_1_1RenderStates.html">sf::RenderStates</a> states;</div><div class="line">states.<a class="code" href="classsf_1_1RenderStates.html#ad4f79ecdd0c60ed0d24fbe555b221bd8">shader</a> = &amp;shader;</div><div class="line">window.draw(sprite, states);</div></div><!-- fragment --><p>In the code above we pass a pointer to the shader, because it may be null (which means "no shader").</p>
<p>Shaders can be used on any drawable, but some combinations are not interesting. For example, using a vertex shader on a <a class="el" href="classsf_1_1Sprite.html" title="Drawable representation of a texture, with its own transformations, color, etc. ">sf::Sprite</a> is limited because there are only 4 vertices, the sprite would have to be subdivided in order to apply wave effects. Another bad example is a fragment shader with <a class="el" href="classsf_1_1Text.html" title="Graphical text that can be drawn to a render target. ">sf::Text</a>: the texture of the text is not the actual text that you see on screen, it is a big texture containing all the characters of the font in an arbitrary order; thus, texture lookups on pixels other than the current one may not give you the expected result.</p>
<p>Shaders can also be used to apply global post-effects to the current contents of the target (like the old sf::PostFx class in SFML 1). This can be done in two different ways: </p><ul>
<li>draw everything to a <a class="el" href="classsf_1_1RenderTexture.html" title="Target for off-screen 2D rendering into a texture. ">sf::RenderTexture</a>, then draw it to the main target using the shader </li>
<li>draw everything directly to the main target, then use sf::Texture::update(Window&amp;) to copy its contents to a texture and draw it to the main target using the shader</li>
</ul>
<p>The first technique is more optimized because it doesn't involve retrieving the target's pixels to system memory, but the second one doesn't impact the rendering process and can be easily inserted anywhere without impacting all the code.</p>
<p>Like <a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing. ">sf::Texture</a> that can be used as a raw OpenGL texture, <a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">sf::Shader</a> can also be used directly as a raw shader for custom OpenGL geometry. </p><div class="fragment"><div class="line"><a class="code" href="classsf_1_1Shader.html#a09778f78afcbeb854d608c8dacd8ea30">sf::Shader::bind</a>(&amp;shader);</div><div class="line">... render OpenGL geometry ...</div><div class="line">sf::Shader::bind(NULL);</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="namespacesf_1_1Glsl.html" title="Namespace with GLSL types. ">sf::Glsl</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="Shader_8hpp_source.html#l00052">52</a> of file <a class="el" href="Shader_8hpp_source.html">Shader.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="afaa1aa65e5de37b74d047da9def9f9b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaa1aa65e5de37b74d047da9def9f9b3">&#9670;&nbsp;</a></span>Type</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">sf::Shader::Type</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Types of shaders. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="afaa1aa65e5de37b74d047da9def9f9b3a8718008f827eb32e29bbdd1791c62dce"></a>Vertex&#160;</td><td class="fielddoc"><p>Vertex shader </p>
</td></tr>
<tr><td class="fieldname"><a id="afaa1aa65e5de37b74d047da9def9f9b3a812421100fd57456727375938fb62788"></a>Geometry&#160;</td><td class="fielddoc"><p>Geometry shader. </p>
</td></tr>
<tr><td class="fieldname"><a id="afaa1aa65e5de37b74d047da9def9f9b3ace6e88eec3a56b2e55ee3c8e64e9b89a"></a>Fragment&#160;</td><td class="fielddoc"><p>Fragment (pixel) shader. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="Shader_8hpp_source.html#l00060">60</a> of file <a class="el" href="Shader_8hpp_source.html">Shader.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a1d7f28f26b4122959fcafec871c2c3c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d7f28f26b4122959fcafec871c2c3c5">&#9670;&nbsp;</a></span>Shader()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::Shader::Shader </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>This constructor creates an invalid shader. </p>
</div>
</div>
<a id="a4bac6cc8b046ecd8fb967c145a2380e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bac6cc8b046ecd8fb967c145a2380e6">&#9670;&nbsp;</a></span>~Shader()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::Shader::~Shader </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a09778f78afcbeb854d608c8dacd8ea30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09778f78afcbeb854d608c8dacd8ea30">&#9670;&nbsp;</a></span>bind()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void sf::Shader::bind </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Shader.html">Shader</a> *&#160;</td>
<td class="paramname"><em>shader</em></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>Bind a shader for rendering. </p>
<p>This function is not part of the graphics API, it mustn't be used when drawing SFML entities. It must be used only if you mix <a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">sf::Shader</a> with OpenGL code.</p>
<div class="fragment"><div class="line"><a class="code" href="classsf_1_1Shader.html">sf::Shader</a> s1, s2;</div><div class="line">...</div><div class="line">sf::Shader::bind(&amp;s1);</div><div class="line"><span class="comment">// draw OpenGL stuff that use s1...</span></div><div class="line"><a class="code" href="classsf_1_1Shader.html#a09778f78afcbeb854d608c8dacd8ea30">sf::Shader::bind</a>(&amp;s2);</div><div class="line"><span class="comment">// draw OpenGL stuff that use s2...</span></div><div class="line"><a class="code" href="classsf_1_1Shader.html#a09778f78afcbeb854d608c8dacd8ea30">sf::Shader::bind</a>(NULL);</div><div class="line"><span class="comment">// draw OpenGL stuff that use no shader...</span></div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">shader</td><td><a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">Shader</a> to bind, can be null to use no shader </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ac14d0bf7afe7b6bb415d309f9c707188"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac14d0bf7afe7b6bb415d309f9c707188">&#9670;&nbsp;</a></span>getNativeHandle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int sf::Shader::getNativeHandle </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the underlying OpenGL handle of the shader. </p>
<p>You shouldn't need to use this function, unless you have very specific stuff to implement that SFML doesn't support, or implement a temporary workaround until a bug is fixed.</p>
<dl class="section return"><dt>Returns</dt><dd>OpenGL handle of the shader or 0 if not yet loaded </dd></dl>
</div>
</div>
<a id="ad22474690bafe4a305c1b9826b1bd86a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad22474690bafe4a305c1b9826b1bd86a">&#9670;&nbsp;</a></span>isAvailable()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool sf::Shader::isAvailable </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>Tell whether or not the system supports shaders. </p>
<p>This function should always be called before using the shader features. If it returns false, then any attempt to use <a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">sf::Shader</a> will fail.</p>
<dl class="section return"><dt>Returns</dt><dd>True if shaders are supported, false otherwise </dd></dl>
</div>
</div>
<a id="a45db14baf1bbc688577f81813b1fce96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45db14baf1bbc688577f81813b1fce96">&#9670;&nbsp;</a></span>isGeometryAvailable()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool sf::Shader::isGeometryAvailable </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>Tell whether or not the system supports geometry shaders. </p>
<p>This function should always be called before using the geometry shader features. If it returns false, then any attempt to use <a class="el" href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment) ">sf::Shader</a> geometry shader features will fail.</p>
<p>This function can only return true if <a class="el" href="classsf_1_1Shader.html#ad22474690bafe4a305c1b9826b1bd86a" title="Tell whether or not the system supports shaders. ">isAvailable()</a> would also return true, since shaders in general have to be supported in order for geometry shaders to be supported as well.</p>
<p>Note: The first call to this function, whether by your code or SFML will result in a context switch.</p>
<dl class="section return"><dt>Returns</dt><dd>True if geometry shaders are supported, false otherwise </dd></dl>
</div>
</div>
<a id="a053a5632848ebaca2fcd8ba29abe9e6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a053a5632848ebaca2fcd8ba29abe9e6e">&#9670;&nbsp;</a></span>loadFromFile() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromFile </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>filename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a>&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load the vertex, geometry or fragment shader from a file. </p>
<p>This function loads a single shader, vertex, geometry or fragment, identified by the second argument. The source must be a text file containing a valid shader in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>Path of the vertex, geometry or fragment shader file to load </td></tr>
<tr><td class="paramname">type</td><td>Type of shader (vertex, geometry or fragment)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa" title="Load the vertex, geometry or fragment shader from a source code in memory. ">loadFromMemory</a>, <a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53" title="Load the vertex, geometry or fragment shader from a custom stream. ">loadFromStream</a> </dd></dl>
</div>
</div>
<a id="ac9d7289966fcef562eeb92271c03e3dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9d7289966fcef562eeb92271c03e3dc">&#9670;&nbsp;</a></span>loadFromFile() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromFile </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>vertexShaderFilename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>fragmentShaderFilename</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load both the vertex and fragment shaders from files. </p>
<p>This function loads both the vertex and the fragment shaders. If one of them fails to load, the shader is left empty (the valid shader is unloaded). The sources must be text files containing valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexShaderFilename</td><td>Path of the vertex shader file to load </td></tr>
<tr><td class="paramname">fragmentShaderFilename</td><td>Path of the fragment shader file to load</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa" title="Load the vertex, geometry or fragment shader from a source code in memory. ">loadFromMemory</a>, <a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53" title="Load the vertex, geometry or fragment shader from a custom stream. ">loadFromStream</a> </dd></dl>
</div>
</div>
<a id="a295d8468811ca15bf9c5401a7a7d4f54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a295d8468811ca15bf9c5401a7a7d4f54">&#9670;&nbsp;</a></span>loadFromFile() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromFile </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>vertexShaderFilename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>geometryShaderFilename</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>fragmentShaderFilename</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load the vertex, geometry and fragment shaders from files. </p>
<p>This function loads the vertex, geometry and fragment shaders. If one of them fails to load, the shader is left empty (the valid shader is unloaded). The sources must be text files containing valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexShaderFilename</td><td>Path of the vertex shader file to load </td></tr>
<tr><td class="paramname">geometryShaderFilename</td><td>Path of the geometry shader file to load </td></tr>
<tr><td class="paramname">fragmentShaderFilename</td><td>Path of the fragment shader file to load</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa" title="Load the vertex, geometry or fragment shader from a source code in memory. ">loadFromMemory</a>, <a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53" title="Load the vertex, geometry or fragment shader from a custom stream. ">loadFromStream</a> </dd></dl>
</div>
</div>
<a id="ac92d46bf71dff2d791117e4e472148aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac92d46bf71dff2d791117e4e472148aa">&#9670;&nbsp;</a></span>loadFromMemory() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromMemory </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>shader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a>&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load the vertex, geometry or fragment shader from a source code in memory. </p>
<p>This function loads a single shader, vertex, geometry or fragment, identified by the second argument. The source code must be a valid shader in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">shader</td><td><a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">String</a> containing the source code of the shader </td></tr>
<tr><td class="paramname">type</td><td>Type of shader (vertex, geometry or fragment)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e" title="Load the vertex, geometry or fragment shader from a file. ">loadFromFile</a>, <a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53" title="Load the vertex, geometry or fragment shader from a custom stream. ">loadFromStream</a> </dd></dl>
</div>
</div>
<a id="ae34e94070d7547a890166b7993658a9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae34e94070d7547a890166b7993658a9b">&#9670;&nbsp;</a></span>loadFromMemory() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromMemory </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>vertexShader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>fragmentShader</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load both the vertex and fragment shaders from source codes in memory. </p>
<p>This function loads both the vertex and the fragment shaders. If one of them fails to load, the shader is left empty (the valid shader is unloaded). The sources must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexShader</td><td><a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">String</a> containing the source code of the vertex shader </td></tr>
<tr><td class="paramname">fragmentShader</td><td><a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">String</a> containing the source code of the fragment shader</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e" title="Load the vertex, geometry or fragment shader from a file. ">loadFromFile</a>, <a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53" title="Load the vertex, geometry or fragment shader from a custom stream. ">loadFromStream</a> </dd></dl>
</div>
</div>
<a id="ab8c8b715b02aba2cf7c0a0e0c0984250"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8c8b715b02aba2cf7c0a0e0c0984250">&#9670;&nbsp;</a></span>loadFromMemory() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromMemory </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>vertexShader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>geometryShader</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>fragmentShader</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load the vertex, geometry and fragment shaders from source codes in memory. </p>
<p>This function loads the vertex, geometry and fragment shaders. If one of them fails to load, the shader is left empty (the valid shader is unloaded). The sources must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexShader</td><td><a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">String</a> containing the source code of the vertex shader </td></tr>
<tr><td class="paramname">geometryShader</td><td><a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">String</a> containing the source code of the geometry shader </td></tr>
<tr><td class="paramname">fragmentShader</td><td><a class="el" href="classsf_1_1String.html" title="Utility string class that automatically handles conversions between types and encodings. ">String</a> containing the source code of the fragment shader</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e" title="Load the vertex, geometry or fragment shader from a file. ">loadFromFile</a>, <a class="el" href="classsf_1_1Shader.html#a2ee1b130c0606e4f8bcdf65c1efc2a53" title="Load the vertex, geometry or fragment shader from a custom stream. ">loadFromStream</a> </dd></dl>
</div>
</div>
<a id="a2ee1b130c0606e4f8bcdf65c1efc2a53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ee1b130c0606e4f8bcdf65c1efc2a53">&#9670;&nbsp;</a></span>loadFromStream() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;&#160;</td>
<td class="paramname"><em>stream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1Shader.html#afaa1aa65e5de37b74d047da9def9f9b3">Type</a>&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load the vertex, geometry or fragment shader from a custom stream. </p>
<p>This function loads a single shader, vertex, geometry or fragment, identified by the second argument. The source code must be a valid shader in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stream</td><td>Source stream to read from </td></tr>
<tr><td class="paramname">type</td><td>Type of shader (vertex, geometry or fragment)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e" title="Load the vertex, geometry or fragment shader from a file. ">loadFromFile</a>, <a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa" title="Load the vertex, geometry or fragment shader from a source code in memory. ">loadFromMemory</a> </dd></dl>
</div>
</div>
<a id="a3b7958159ffb5596c4babc3052e35465"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b7958159ffb5596c4babc3052e35465">&#9670;&nbsp;</a></span>loadFromStream() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;&#160;</td>
<td class="paramname"><em>vertexShaderStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;&#160;</td>
<td class="paramname"><em>fragmentShaderStream</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load both the vertex and fragment shaders from custom streams. </p>
<p>This function loads both the vertex and the fragment shaders. If one of them fails to load, the shader is left empty (the valid shader is unloaded). The source codes must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexShaderStream</td><td>Source stream to read the vertex shader from </td></tr>
<tr><td class="paramname">fragmentShaderStream</td><td>Source stream to read the fragment shader from</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e" title="Load the vertex, geometry or fragment shader from a file. ">loadFromFile</a>, <a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa" title="Load the vertex, geometry or fragment shader from a source code in memory. ">loadFromMemory</a> </dd></dl>
</div>
</div>
<a id="aa08f1c091806205e6654db9d83197fcd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa08f1c091806205e6654db9d83197fcd">&#9670;&nbsp;</a></span>loadFromStream() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::Shader::loadFromStream </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;&#160;</td>
<td class="paramname"><em>vertexShaderStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;&#160;</td>
<td class="paramname"><em>geometryShaderStream</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1InputStream.html">InputStream</a> &amp;&#160;</td>
<td class="paramname"><em>fragmentShaderStream</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Load the vertex, geometry and fragment shaders from custom streams. </p>
<p>This function loads the vertex, geometry and fragment shaders. If one of them fails to load, the shader is left empty (the valid shader is unloaded). The source codes must be valid shaders in GLSL language. GLSL is a C-like language dedicated to OpenGL shaders; you'll probably need to read a good documentation for it before writing your own shaders.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexShaderStream</td><td>Source stream to read the vertex shader from </td></tr>
<tr><td class="paramname">geometryShaderStream</td><td>Source stream to read the geometry shader from </td></tr>
<tr><td class="paramname">fragmentShaderStream</td><td>Source stream to read the fragment shader from</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if loading succeeded, false if it failed</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#a053a5632848ebaca2fcd8ba29abe9e6e" title="Load the vertex, geometry or fragment shader from a file. ">loadFromFile</a>, <a class="el" href="classsf_1_1Shader.html#ac92d46bf71dff2d791117e4e472148aa" title="Load the vertex, geometry or fragment shader from a source code in memory. ">loadFromMemory</a> </dd></dl>
</div>
</div>
<a id="a47e4dd78f0752ae08664b4ee616db1cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47e4dd78f0752ae08664b4ee616db1cf">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[1/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>x</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a float parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000006">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#abf78e3bea1e9b0bab850b6b0a0de29c7" title="Specify value for float uniform. ">setUniform(const std::string&amp;, float)</a> instead.</dd></dl>
</div>
</div>
<a id="ab8d379f40810b8e3eadebee81aedd231"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab8d379f40810b8e3eadebee81aedd231">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[2/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>y</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a 2-components vector parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000007">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#a4a2c673c41e37b17d67e4af1298b679f" title="Specify value for vec2 uniform. ">setUniform(const std::string&amp;, const Glsl::Vec2&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="a7e36e044d6b8adca8339f40c5a4b1801"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e36e044d6b8adca8339f40c5a4b1801">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[3/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>z</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a 3-components vector parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000008">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#aad654ad8de6f0c56191fa7b8cea21db2" title="Specify value for vec3 uniform. ">setUniform(const std::string&amp;, const Glsl::Vec3&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="aeb468f1bc2d26750b96b74f1e19027fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb468f1bc2d26750b96b74f1e19027fb">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[4/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>w</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a 4-components vector parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000009">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#abc1aee8343800680fd62e1f3d43c24bf" title="Specify value for vec4 uniform. ">setUniform(const std::string&amp;, const Glsl::Vec4&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="a3ac473ece2c6fa26dc5032c07fd7288e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ac473ece2c6fa26dc5032c07fd7288e">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[5/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector2.html">Vector2f</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a 2-components vector parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000010">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#a4a2c673c41e37b17d67e4af1298b679f" title="Specify value for vec2 uniform. ">setUniform(const std::string&amp;, const Glsl::Vec2&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="a87d4a0c6dc70ae68aecc0dda3f343c07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87d4a0c6dc70ae68aecc0dda3f343c07">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[6/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector3.html">Vector3f</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a 3-components vector parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000011">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#aad654ad8de6f0c56191fa7b8cea21db2" title="Specify value for vec3 uniform. ">setUniform(const std::string&amp;, const Glsl::Vec3&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="aa8618119ed4399df3fd33e78ee96b4fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8618119ed4399df3fd33e78ee96b4fc">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[7/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></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>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a color parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000012">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#abc1aee8343800680fd62e1f3d43c24bf" title="Specify value for vec4 uniform. ">setUniform(const std::string&amp;, const Glsl::Vec4&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="a8599ee1348407025039b89ddf3f7cb62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8599ee1348407025039b89ddf3f7cb62">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[8/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1Transform.html">Transform</a> &amp;&#160;</td>
<td class="paramname"><em>transform</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a matrix parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000013">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#abc1aee8343800680fd62e1f3d43c24bf" title="Specify value for vec4 uniform. ">setUniform(const std::string&amp;, const Glsl::Mat4&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="a7f58ab5c0a1084f238dfcec86602daa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f58ab5c0a1084f238dfcec86602daa1">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[9/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;&#160;</td>
<td class="paramname"><em>texture</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a texture parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000014">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#a7806a29ffbd0ee9251256a9e7265d479" title="Specify a texture as sampler2D uniform. ">setUniform(const std::string&amp;, const Texture&amp;)</a> instead.</dd></dl>
</div>
</div>
<a id="af06b4cba0bab915fa01032b063909044"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af06b4cba0bab915fa01032b063909044">&#9670;&nbsp;</a></span>setParameter() <span class="overload">[10/10]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setParameter </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a>&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change a texture parameter of the shader. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000015">Deprecated:</a></b></dt><dd>Use <a class="el" href="classsf_1_1Shader.html#ab18f531e1f726b88fec1cf5a1e6af26d" title="Specify current texture as sampler2D uniform. ">setUniform(const std::string&amp;, CurrentTextureType)</a> instead.</dd></dl>
</div>
</div>
<a id="abf78e3bea1e9b0bab850b6b0a0de29c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf78e3bea1e9b0bab850b6b0a0de29c7">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[1/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>x</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>float</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">x</td><td>Value of the float scalar </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4a2c673c41e37b17d67e4af1298b679f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a2c673c41e37b17d67e4af1298b679f">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[2/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#adeed356d346d87634b4c197a530e4edf">Glsl::Vec2</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>vec2</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the vec2 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aad654ad8de6f0c56191fa7b8cea21db2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad654ad8de6f0c56191fa7b8cea21db2">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[3/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a9bdd0463b7cb5316244a082007bd50f0">Glsl::Vec3</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>vec3</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the vec3 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="abc1aee8343800680fd62e1f3d43c24bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc1aee8343800680fd62e1f3d43c24bf">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[4/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a7c67253548c58adb77cb14f847f18f83">Glsl::Vec4</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>vec4</code> uniform. </p>
<p>This overload can also be called with <a class="el" href="classsf_1_1Color.html" title="Utility class for manipulating RGBA colors. ">sf::Color</a> objects that are converted to <a class="el" href="namespacesf_1_1Glsl.html#a7c67253548c58adb77cb14f847f18f83" title="4D float vector (vec4 in GLSL) ">sf::Glsl::Vec4</a>.</p>
<p>It is important to note that the components of the color are normalized before being passed to the shader. Therefore, they are converted from range [0 .. 255] to range [0 .. 1]. For example, a <a class="el" href="classsf_1_1Color.html" title="Utility class for manipulating RGBA colors. ">sf::Color(255, 127, 0, 255)</a> will be transformed to a vec4(1.0, 0.5, 0.0, 1.0) in the shader.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the vec4 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ae4fc8b4c18e6b653952bce5c8c81e4a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4fc8b4c18e6b653952bce5c8c81e4a0">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[5/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>x</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>int</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">x</td><td>Value of the int scalar </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a2ccb5bae59cedc7d6a9b533c97f7d1ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ccb5bae59cedc7d6a9b533c97f7d1ed">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[6/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#aab803ee70c4b7bfcd63ec09e10408fd3">Glsl::Ivec2</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>ivec2</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the ivec2 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a9e328e3e97cd753fdc7b842f4b0f202e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e328e3e97cd753fdc7b842f4b0f202e">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[7/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a64f403dd0219e7f128ffddca641394df">Glsl::Ivec3</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>ivec3</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the ivec3 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a380e7a5a2896162c5fd08966c4523790"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a380e7a5a2896162c5fd08966c4523790">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[8/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a778682c4f085d2daeb90c724791f3f68">Glsl::Ivec4</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>ivec4</code> uniform. </p>
<p>This overload can also be called with <a class="el" href="classsf_1_1Color.html" title="Utility class for manipulating RGBA colors. ">sf::Color</a> objects that are converted to <a class="el" href="namespacesf_1_1Glsl.html#a778682c4f085d2daeb90c724791f3f68" title="4D int vector (ivec4 in GLSL) ">sf::Glsl::Ivec4</a>.</p>
<p>If color conversions are used, the ivec4 uniform in GLSL will hold the same values as the original <a class="el" href="classsf_1_1Color.html" title="Utility class for manipulating RGBA colors. ">sf::Color</a> instance. For example, <a class="el" href="classsf_1_1Color.html" title="Utility class for manipulating RGBA colors. ">sf::Color(255, 127, 0, 255)</a> is mapped to ivec4(255, 127, 0, 255).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the ivec4 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af417027ac72c06e6cfbf30975cd678e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af417027ac72c06e6cfbf30975cd678e9">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[9/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>x</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>bool</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">x</td><td>Value of the bool scalar </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab2518b8dd0762e682b452a5d5005f2bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2518b8dd0762e682b452a5d5005f2bf">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[10/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a59d8cf909c3d71ebf3db057480b464da">Glsl::Bvec2</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>bvec2</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the bvec2 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab06830875c82476fbb9c975cdeb78a11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab06830875c82476fbb9c975cdeb78a11">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[11/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a4166ffc506619b4912d576e6eba2c957">Glsl::Bvec3</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>bvec3</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the bvec3 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ac8db3e0adf1129abf24f0a51a7ec36f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8db3e0adf1129abf24f0a51a7ec36f4">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[12/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a8b1f0ac369666c48a9eafc9d3f5618e6">Glsl::Bvec4</a> &amp;&#160;</td>
<td class="paramname"><em>vector</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>bvec4</code> uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vector</td><td>Value of the bvec4 vector </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ac1198ae0152d439bc05781046883e281"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1198ae0152d439bc05781046883e281">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[13/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a9e984ebdc1cebc693a12f01a32b2d28d">Glsl::Mat3</a> &amp;&#160;</td>
<td class="paramname"><em>matrix</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>mat3</code> matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">matrix</td><td>Value of the mat3 matrix </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aca5c55c4a3b23d21e33dbdaab7990755"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca5c55c4a3b23d21e33dbdaab7990755">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[14/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a769de806596348a8e56ed6506c688271">Glsl::Mat4</a> &amp;&#160;</td>
<td class="paramname"><em>matrix</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify value for <code>mat4</code> matrix. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">matrix</td><td>Value of the mat4 matrix </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7806a29ffbd0ee9251256a9e7265d479"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7806a29ffbd0ee9251256a9e7265d479">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[15/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classsf_1_1Texture.html">Texture</a> &amp;&#160;</td>
<td class="paramname"><em>texture</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify a texture as <code>sampler2D</code> uniform. </p>
<p><em>name</em> is the name of the variable to change in the shader. The corresponding parameter in the shader must be a 2D texture (<code>sampler2D</code> GLSL type).</p>
<p>Example: </p><div class="fragment"><div class="line">uniform sampler2D the_texture; <span class="comment">// this is the variable in the shader</span></div></div><!-- fragment --> <div class="fragment"><div class="line"><a class="code" href="classsf_1_1Texture.html">sf::Texture</a> texture;</div><div class="line">...</div><div class="line">shader.setUniform(<span class="stringliteral">&quot;the_texture&quot;</span>, texture);</div></div><!-- fragment --><p> It is important to note that <em>texture</em> must remain alive as long as the shader uses it, no copy is made internally.</p>
<p>To use the texture of the object being drawn, which cannot be known in advance, you can pass the special value <a class="el" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d" title="Represents the texture of the object being drawn. ">sf::Shader::CurrentTexture</a>: </p><div class="fragment"><div class="line">shader.setUniform(<span class="stringliteral">&quot;the_texture&quot;</span>, <a class="code" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d">sf::Shader::CurrentTexture</a>).</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the texture in the shader </td></tr>
<tr><td class="paramname">texture</td><td><a class="el" href="classsf_1_1Texture.html" title="Image living on the graphics card that can be used for drawing. ">Texture</a> to assign </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab18f531e1f726b88fec1cf5a1e6af26d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab18f531e1f726b88fec1cf5a1e6af26d">&#9670;&nbsp;</a></span>setUniform() <span class="overload">[16/16]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniform </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a>&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify current texture as <code>sampler2D</code> uniform. </p>
<p>This overload maps a shader texture variable to the texture of the object being drawn, which cannot be known in advance. The second argument must be <a class="el" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d" title="Represents the texture of the object being drawn. ">sf::Shader::CurrentTexture</a>. The corresponding parameter in the shader must be a 2D texture (<code>sampler2D</code> GLSL type).</p>
<p>Example: </p><div class="fragment"><div class="line">uniform sampler2D current; <span class="comment">// this is the variable in the shader</span></div></div><!-- fragment --> <div class="fragment"><div class="line">shader.setUniform(<span class="stringliteral">&quot;current&quot;</span>, <a class="code" href="classsf_1_1Shader.html#ac84c7953eec2e19358ea6e2cc5385b8d">sf::Shader::CurrentTexture</a>);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the texture in the shader </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a731d3b9953c50fe7d3fb03340b97deff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a731d3b9953c50fe7d3fb03340b97deff">&#9670;&nbsp;</a></span>setUniformArray() <span class="overload">[1/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniformArray </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float *&#160;</td>
<td class="paramname"><em>scalarArray</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify values for <code>float</code>[] array uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">scalarArray</td><td>pointer to array of <code>float</code> values </td></tr>
<tr><td class="paramname">length</td><td>Number of elements in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab2e2eab45d9a091f3720c0879a5bb026"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2e2eab45d9a091f3720c0879a5bb026">&#9670;&nbsp;</a></span>setUniformArray() <span class="overload">[2/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniformArray </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#adeed356d346d87634b4c197a530e4edf">Glsl::Vec2</a> *&#160;</td>
<td class="paramname"><em>vectorArray</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify values for <code>vec2</code>[] array uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vectorArray</td><td>pointer to array of <code>vec2</code> values </td></tr>
<tr><td class="paramname">length</td><td>Number of elements in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aeae884292fed977bbea5039818f208e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeae884292fed977bbea5039818f208e7">&#9670;&nbsp;</a></span>setUniformArray() <span class="overload">[3/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniformArray </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a9bdd0463b7cb5316244a082007bd50f0">Glsl::Vec3</a> *&#160;</td>
<td class="paramname"><em>vectorArray</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify values for <code>vec3</code>[] array uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vectorArray</td><td>pointer to array of <code>vec3</code> values </td></tr>
<tr><td class="paramname">length</td><td>Number of elements in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa89ac1ea7918c9b1c2232df59affb7fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa89ac1ea7918c9b1c2232df59affb7fa">&#9670;&nbsp;</a></span>setUniformArray() <span class="overload">[4/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniformArray </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a7c67253548c58adb77cb14f847f18f83">Glsl::Vec4</a> *&#160;</td>
<td class="paramname"><em>vectorArray</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify values for <code>vec4</code>[] array uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">vectorArray</td><td>pointer to array of <code>vec4</code> values </td></tr>
<tr><td class="paramname">length</td><td>Number of elements in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a69587701d347ba21d506197d0fb9f842"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69587701d347ba21d506197d0fb9f842">&#9670;&nbsp;</a></span>setUniformArray() <span class="overload">[5/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniformArray </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a9e984ebdc1cebc693a12f01a32b2d28d">Glsl::Mat3</a> *&#160;</td>
<td class="paramname"><em>matrixArray</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify values for <code>mat3</code>[] array uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">matrixArray</td><td>pointer to array of <code>mat3</code> values </td></tr>
<tr><td class="paramname">length</td><td>Number of elements in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a066b0ba02e1c1bddc9e2571eca1156ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a066b0ba02e1c1bddc9e2571eca1156ab">&#9670;&nbsp;</a></span>setUniformArray() <span class="overload">[6/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::Shader::setUniformArray </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacesf_1_1Glsl.html#a769de806596348a8e56ed6506c688271">Glsl::Mat4</a> *&#160;</td>
<td class="paramname"><em>matrixArray</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>length</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Specify values for <code>mat4</code>[] array uniform. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>Name of the uniform variable in GLSL </td></tr>
<tr><td class="paramname">matrixArray</td><td>pointer to array of <code>mat4</code> values </td></tr>
<tr><td class="paramname">length</td><td>Number of elements in the array </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="ac84c7953eec2e19358ea6e2cc5385b8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac84c7953eec2e19358ea6e2cc5385b8d">&#9670;&nbsp;</a></span>CurrentTexture</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="structsf_1_1Shader_1_1CurrentTextureType.html">CurrentTextureType</a> sf::Shader::CurrentTexture</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>Represents the texture of the object being drawn. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Shader.html#ab18f531e1f726b88fec1cf5a1e6af26d" title="Specify current texture as sampler2D uniform. ">setUniform(const std::string&amp;, CurrentTextureType)</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="Shader_8hpp_source.html#l00082">82</a> of file <a class="el" href="Shader_8hpp_source.html">Shader.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Shader_8hpp_source.html">Shader.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>