diff options
Diffstat (limited to 'libraries/irrlicht-1.8/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html')
-rw-r--r-- | libraries/irrlicht-1.8/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html | 247 |
1 files changed, 0 insertions, 247 deletions
diff --git a/libraries/irrlicht-1.8/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html b/libraries/irrlicht-1.8/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html deleted file mode 100644 index 136681a..0000000 --- a/libraries/irrlicht-1.8/doc/html/classirr_1_1video_1_1_i_shader_constant_set_call_back.html +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
3 | <head> | ||
4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | ||
5 | <title>Irrlicht 3D Engine: irr::video::IShaderConstantSetCallBack Class Reference</title> | ||
6 | |||
7 | <link href="tabs.css" rel="stylesheet" type="text/css"/> | ||
8 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> | ||
9 | <link href="navtree.css" rel="stylesheet" type="text/css"/> | ||
10 | <script type="text/javascript" src="jquery.js"></script> | ||
11 | <script type="text/javascript" src="resize.js"></script> | ||
12 | <script type="text/javascript" src="navtree.js"></script> | ||
13 | <script type="text/javascript"> | ||
14 | $(document).ready(initResizable); | ||
15 | </script> | ||
16 | <link href="search/search.css" rel="stylesheet" type="text/css"/> | ||
17 | <script type="text/javascript" src="search/search.js"></script> | ||
18 | <script type="text/javascript"> | ||
19 | $(document).ready(function() { searchBox.OnSelectItem(0); }); | ||
20 | </script> | ||
21 | |||
22 | </head> | ||
23 | <body> | ||
24 | <div id="top"><!-- do not remove this div! --> | ||
25 | |||
26 | |||
27 | <div id="titlearea"> | ||
28 | <table cellspacing="0" cellpadding="0"> | ||
29 | <tbody> | ||
30 | <tr style="height: 56px;"> | ||
31 | |||
32 | <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td> | ||
33 | |||
34 | |||
35 | <td style="padding-left: 0.5em;"> | ||
36 | <div id="projectname">Irrlicht 3D Engine | ||
37 | |||
38 | </div> | ||
39 | |||
40 | </td> | ||
41 | |||
42 | |||
43 | |||
44 | |||
45 | <td> <div id="MSearchBox" class="MSearchBoxInactive"> | ||
46 | <span class="left"> | ||
47 | <img id="MSearchSelect" src="search/mag_sel.png" | ||
48 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
49 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
50 | alt=""/> | ||
51 | <input type="text" id="MSearchField" value="Search" accesskey="S" | ||
52 | onfocus="searchBox.OnSearchFieldFocus(true)" | ||
53 | onblur="searchBox.OnSearchFieldFocus(false)" | ||
54 | onkeyup="searchBox.OnSearchFieldChange(event)"/> | ||
55 | </span><span class="right"> | ||
56 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> | ||
57 | </span> | ||
58 | </div> | ||
59 | </td> | ||
60 | |||
61 | |||
62 | </tr> | ||
63 | </tbody> | ||
64 | </table> | ||
65 | </div> | ||
66 | |||
67 | <!-- Generated by Doxygen 1.7.5.1 --> | ||
68 | <script type="text/javascript"> | ||
69 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); | ||
70 | </script> | ||
71 | <script type="text/javascript" src="dynsections.js"></script> | ||
72 | </div> | ||
73 | <div id="side-nav" class="ui-resizable side-nav-resizable"> | ||
74 | <div id="nav-tree"> | ||
75 | <div id="nav-tree-contents"> | ||
76 | </div> | ||
77 | </div> | ||
78 | <div id="splitbar" style="-moz-user-select:none;" | ||
79 | class="ui-resizable-handle"> | ||
80 | </div> | ||
81 | </div> | ||
82 | <script type="text/javascript"> | ||
83 | initNavTree('classirr_1_1video_1_1_i_shader_constant_set_call_back.html',''); | ||
84 | </script> | ||
85 | <div id="doc-content"> | ||
86 | <div class="header"> | ||
87 | <div class="summary"> | ||
88 | <a href="#pub-methods">Public Member Functions</a> </div> | ||
89 | <div class="headertitle"> | ||
90 | <div class="title">irr::video::IShaderConstantSetCallBack Class Reference</div> </div> | ||
91 | </div> | ||
92 | <div class="contents"> | ||
93 | <!-- doxytag: class="irr::video::IShaderConstantSetCallBack" --><!-- doxytag: inherits="irr::IReferenceCounted" --> | ||
94 | <p>Interface making it possible to set constants for gpu programs every frame. | ||
95 | <a href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html#details">More...</a></p> | ||
96 | |||
97 | <p><code>#include <<a class="el" href="_i_shader_constant_set_call_back_8h_source.html">IShaderConstantSetCallBack.h</a>></code></p> | ||
98 | <div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"> | ||
99 | <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for irr::video::IShaderConstantSetCallBack:</div> | ||
100 | <div id="dynsection-0-summary" class="dynsummary" style="display:block;"> | ||
101 | </div> | ||
102 | <div id="dynsection-0-content" class="dyncontent" style="display:none;"> | ||
103 | <div class="center"> | ||
104 | <img src="classirr_1_1video_1_1_i_shader_constant_set_call_back.png" usemap="#irr::video::IShaderConstantSetCallBack_map" alt=""/> | ||
105 | <map id="irr::video::IShaderConstantSetCallBack_map" name="irr::video::IShaderConstantSetCallBack_map"> | ||
106 | <area href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine." alt="irr::IReferenceCounted" shape="rect" coords="0,0,229,24"/> | ||
107 | </map> | ||
108 | </div></div> | ||
109 | |||
110 | <p><a href="classirr_1_1video_1_1_i_shader_constant_set_call_back-members.html">List of all members.</a></p> | ||
111 | <h2><a name="pub-methods"></a> | ||
112 | Public Member Functions</h2> | ||
113 | <ul> | ||
114 | <li>virtual void <a class="el" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html#a91cf4eb8d20d278defaca4e3c9390396">OnSetConstants</a> (<a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a> *services, <a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> userData)=0 | ||
115 | <dl class="el"><dd class="mdescRight">Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set. <a href="#a91cf4eb8d20d278defaca4e3c9390396"></a><br/></dl><li>virtual void <a class="el" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html#a837ad9419ca4c17b011af75bb24e7a72">OnSetMaterial</a> (const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> &material) | ||
116 | <dl class="el"><dd class="mdescRight">Called to let the callBack know the used material (optional method) <a href="#a837ad9419ca4c17b011af75bb24e7a72"></a><br/></dl></ul> | ||
117 | <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> | ||
118 | <div class="textblock"><p>Interface making it possible to set constants for gpu programs every frame. </p> | ||
119 | <p>Implement this interface in an own class and pass a pointer to it to one of the methods in <a class="el" href="classirr_1_1video_1_1_i_g_p_u_programming_services.html" title="Interface making it possible to create and use programs running on the GPU.">IGPUProgrammingServices</a> when creating a shader. The OnSetConstants method will be called every frame now. </p> | ||
120 | |||
121 | <p>Definition at line <a class="el" href="_i_shader_constant_set_call_back_8h_source.html#l00021">21</a> of file <a class="el" href="_i_shader_constant_set_call_back_8h_source.html">IShaderConstantSetCallBack.h</a>.</p> | ||
122 | </div><hr/><h2>Member Function Documentation</h2> | ||
123 | <a class="anchor" id="a91cf4eb8d20d278defaca4e3c9390396"></a><!-- doxytag: member="irr::video::IShaderConstantSetCallBack::OnSetConstants" ref="a91cf4eb8d20d278defaca4e3c9390396" args="(IMaterialRendererServices *services, s32 userData)=0" --> | ||
124 | <div class="memitem"> | ||
125 | <div class="memproto"> | ||
126 | <table class="memname"> | ||
127 | <tr> | ||
128 | <td class="memname">virtual void irr::video::IShaderConstantSetCallBack::OnSetConstants </td> | ||
129 | <td>(</td> | ||
130 | <td class="paramtype"><a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html">IMaterialRendererServices</a> * </td> | ||
131 | <td class="paramname"><em>services</em>, </td> | ||
132 | </tr> | ||
133 | <tr> | ||
134 | <td class="paramkey"></td> | ||
135 | <td></td> | ||
136 | <td class="paramtype"><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> </td> | ||
137 | <td class="paramname"><em>userData</em> </td> | ||
138 | </tr> | ||
139 | <tr> | ||
140 | <td></td> | ||
141 | <td>)</td> | ||
142 | <td></td><td><code> [pure virtual]</code></td> | ||
143 | </tr> | ||
144 | </table> | ||
145 | </div> | ||
146 | <div class="memdoc"> | ||
147 | |||
148 | <p>Called by the engine when the vertex and/or pixel shader constants for an material renderer should be set. </p> | ||
149 | <p>Implement the <a class="el" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html" title="Interface making it possible to set constants for gpu programs every frame.">IShaderConstantSetCallBack</a> in an own class and implement your own OnSetConstants method using the given <a class="el" href="classirr_1_1video_1_1_i_material_renderer_services.html" title="Interface providing some methods for changing advanced, internal states of a IVideoDriver.">IMaterialRendererServices</a> interface. Pass a pointer to this class to one of the methods in <a class="el" href="classirr_1_1video_1_1_i_g_p_u_programming_services.html" title="Interface making it possible to create and use programs running on the GPU.">IGPUProgrammingServices</a> when creating a shader. The OnSetConstants method will now be called every time before geometry is being drawn using your shader material. A sample implementation would look like this: </p> | ||
150 | <div class="fragment"><pre class="fragment"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html#a91cf4eb8d20d278defaca4e3c9390396" title="Called by the engine when the vertex and/or pixel shader constants for an material renderer should be...">OnSetConstants</a>(video::IMaterialRendererServices* services, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> userData) | ||
151 | { | ||
152 | video::IVideoDriver* driver = services->getVideoDriver(); | ||
153 | |||
154 | <span class="comment">// set clip matrix at register 4</span> | ||
155 | <a class="code" href="namespaceirr_1_1core.html#a73fa92e638c5ca97efd72da307cc9b65" title="Typedef for f32 matrix.">core::matrix4</a> worldViewProj(driver->getTransform(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43dae7ec186418508c67a7562af012d7b63f" title="Projection transformation.">video::ETS_PROJECTION</a>)); | ||
156 | worldViewProj *= driver->getTransform(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43da152f4262d5874186e0288934c7d31e14" title="View transformation.">video::ETS_VIEW</a>); | ||
157 | worldViewProj *= driver->getTransform(<a class="code" href="namespaceirr_1_1video.html#a15b57657a320243be03ae6f66fcff43da843cf42adb3fa9caf61c9e228cf14e85" title="World transformation.">video::ETS_WORLD</a>); | ||
158 | services->setVertexShaderConstant(&worldViewProj.M[0], 4, 4); | ||
159 | <span class="comment">// for high level shading languages, this would be another solution:</span> | ||
160 | <span class="comment">//services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16);</span> | ||
161 | |||
162 | <span class="comment">// set some light color at register 9</span> | ||
163 | video::SColorf col(0.0f,1.0f,1.0f,0.0f); | ||
164 | services->setVertexShaderConstant(reinterpret_cast<const f32*>(&col), 9, 1); | ||
165 | <span class="comment">// for high level shading languages, this would be another solution:</span> | ||
166 | <span class="comment">//services->setVertexShaderConstant("myColor", reinterpret_cast<f32*>(&col), 4);</span> | ||
167 | } | ||
168 | </pre></div> <dl><dt><b>Parameters:</b></dt><dd> | ||
169 | <table class="params"> | ||
170 | <tr><td class="paramname">services,:</td><td>Pointer to an interface providing methods to set the constants for the shader. </td></tr> | ||
171 | <tr><td class="paramname">userData,:</td><td>Userdata int which can be specified when creating the shader. </td></tr> | ||
172 | </table> | ||
173 | </dd> | ||
174 | </dl> | ||
175 | |||
176 | </div> | ||
177 | </div> | ||
178 | <a class="anchor" id="a837ad9419ca4c17b011af75bb24e7a72"></a><!-- doxytag: member="irr::video::IShaderConstantSetCallBack::OnSetMaterial" ref="a837ad9419ca4c17b011af75bb24e7a72" args="(const SMaterial &material)" --> | ||
179 | <div class="memitem"> | ||
180 | <div class="memproto"> | ||
181 | <table class="memname"> | ||
182 | <tr> | ||
183 | <td class="memname">virtual void irr::video::IShaderConstantSetCallBack::OnSetMaterial </td> | ||
184 | <td>(</td> | ||
185 | <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_material.html">SMaterial</a> & </td> | ||
186 | <td class="paramname"><em>material</em></td><td>)</td> | ||
187 | <td><code> [inline, virtual]</code></td> | ||
188 | </tr> | ||
189 | </table> | ||
190 | </div> | ||
191 | <div class="memdoc"> | ||
192 | |||
193 | <p>Called to let the callBack know the used material (optional method) </p> | ||
194 | <div class="fragment"><pre class="fragment"> <span class="keyword">class </span>MyCallBack : <span class="keyword">public</span> IShaderConstantSetCallBack | ||
195 | { | ||
196 | <span class="keyword">const</span> video::SMaterial *UsedMaterial; | ||
197 | |||
198 | <a class="code" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html#a837ad9419ca4c17b011af75bb24e7a72" title="Called to let the callBack know the used material (optional method)">OnSetMaterial</a>(<span class="keyword">const</span> video::SMaterial& material) | ||
199 | { | ||
200 | UsedMaterial=&material; | ||
201 | } | ||
202 | |||
203 | <a class="code" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html#a91cf4eb8d20d278defaca4e3c9390396" title="Called by the engine when the vertex and/or pixel shader constants for an material renderer should be...">OnSetConstants</a>(IMaterialRendererServices* services, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> userData) | ||
204 | { | ||
205 | services->setVertexShaderConstant(<span class="stringliteral">"myColor"</span>, reinterpret_cast<f32*>(&UsedMaterial->color), 4); | ||
206 | } | ||
207 | } | ||
208 | </pre></div> | ||
209 | <p>Definition at line <a class="el" href="_i_shader_constant_set_call_back_8h_source.html#l00044">44</a> of file <a class="el" href="_i_shader_constant_set_call_back_8h_source.html">IShaderConstantSetCallBack.h</a>.</p> | ||
210 | |||
211 | </div> | ||
212 | </div> | ||
213 | <hr/>The documentation for this class was generated from the following file:<ul> | ||
214 | <li><a class="el" href="_i_shader_constant_set_call_back_8h_source.html">IShaderConstantSetCallBack.h</a></li> | ||
215 | </ul> | ||
216 | </div> | ||
217 | </div> | ||
218 | <div id="nav-path" class="navpath"> | ||
219 | <ul> | ||
220 | <li class="navelem"><a class="el" href="namespaceirr.html">irr</a> </li> | ||
221 | <li class="navelem"><a class="el" href="namespaceirr_1_1video.html">video</a> </li> | ||
222 | <li class="navelem"><a class="el" href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html">IShaderConstantSetCallBack</a> </li> | ||
223 | <!-- window showing the filter options --> | ||
224 | <div id="MSearchSelectWindow" | ||
225 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
226 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
227 | onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
228 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div> | ||
229 | |||
230 | <!-- iframe showing the search results (closed by default) --> | ||
231 | <div id="MSearchResultsWindow"> | ||
232 | <iframe src="javascript:void(0)" frameborder="0" | ||
233 | name="MSearchResults" id="MSearchResults"> | ||
234 | </iframe> | ||
235 | </div> | ||
236 | |||
237 | |||
238 | <li class="footer"> | ||
239 | <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht | ||
240 | Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Tue Nov 6 2012 11:06:07 for Irrlicht 3D Engine by | ||
241 | <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li> | ||
242 | </ul> | ||
243 | </div> | ||
244 | |||
245 | |||
246 | </body> | ||
247 | </html> | ||