diff options
Diffstat (limited to 'libraries/irrlicht-1.8/doc/html/example008.html')
-rw-r--r-- | libraries/irrlicht-1.8/doc/html/example008.html | 320 |
1 files changed, 0 insertions, 320 deletions
diff --git a/libraries/irrlicht-1.8/doc/html/example008.html b/libraries/irrlicht-1.8/doc/html/example008.html deleted file mode 100644 index 540172f..0000000 --- a/libraries/irrlicht-1.8/doc/html/example008.html +++ /dev/null | |||
@@ -1,320 +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: Tutorial 8: SpecialFX</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('example008.html',''); | ||
84 | </script> | ||
85 | <div id="doc-content"> | ||
86 | <div class="header"> | ||
87 | <div class="headertitle"> | ||
88 | <div class="title">Tutorial 8: SpecialFX </div> </div> | ||
89 | </div> | ||
90 | <div class="contents"> | ||
91 | <div class="textblock"><div class="image"> | ||
92 | <img src="008shot.jpg" alt="008shot.jpg"/> | ||
93 | </div> | ||
94 | <p>This tutorials describes how to do special effects. It shows how to use stencil buffer shadows, the particle system, billboards, dynamic light, and the water surface scene node.</p> | ||
95 | <p>We start like in some tutorials before. Please note that this time, the 'shadows' flag in <a class="el" href="namespaceirr.html#abaf4d8719cc26b0d30813abf85e47c76" title="Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.">createDevice()</a> is set to true, for we want to have a dynamic shadow casted from an animated character. If this example runs too slow, set it to false. The Irrlicht Engine checks if your hardware doesn't support the stencil buffer, and disables shadows by itself, but just in case the demo runs slow on your hardware. </p> | ||
96 | <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <<a class="code" href="irrlicht_8h.html" title="Main header file of the irrlicht, the only file needed to include.">irrlicht.h</a>></span> | ||
97 | <span class="preprocessor">#include <iostream></span> | ||
98 | <span class="preprocessor">#include "<a class="code" href="driver_choice_8h.html">driverChoice.h</a>"</span> | ||
99 | |||
100 | <span class="keyword">using namespace </span>irr; | ||
101 | |||
102 | <span class="preprocessor">#ifdef _MSC_VER</span> | ||
103 | <span class="preprocessor"></span><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span> | ||
104 | <span class="preprocessor"></span><span class="preprocessor">#endif</span> | ||
105 | <span class="preprocessor"></span> | ||
106 | <span class="keywordtype">int</span> main() | ||
107 | { | ||
108 | <span class="comment">// ask if user would like shadows</span> | ||
109 | <span class="keywordtype">char</span> i; | ||
110 | printf(<span class="stringliteral">"Please press 'y' if you want to use realtime shadows.\n"</span>); | ||
111 | |||
112 | std::cin >> i; | ||
113 | |||
114 | <span class="keyword">const</span> <span class="keywordtype">bool</span> shadows = (i == <span class="charliteral">'y'</span>); | ||
115 | |||
116 | <span class="comment">// ask user for driver</span> | ||
117 | <a class="code" href="namespaceirr_1_1video.html#ae35a6de6d436c76107ad157fe42356d0" title="An enum for all types of drivers the Irrlicht Engine supports.">video::E_DRIVER_TYPE</a> driverType=driverChoiceConsole(); | ||
118 | <span class="keywordflow">if</span> (driverType==<a class="code" href="namespaceirr_1_1video.html#ae35a6de6d436c76107ad157fe42356d0ae685cada50f8c100403134d932d0414c" title="No driver, just for counting the elements.">video::EDT_COUNT</a>) | ||
119 | <span class="keywordflow">return</span> 1; | ||
120 | </pre></div><p>Create device and exit if creation failed. We make the stencil flag optional to avoid slow screen modes for runs without shadows. </p> | ||
121 | <div class="fragment"><pre class="fragment"> IrrlichtDevice *device = | ||
122 | <a class="code" href="namespaceirr.html#abaf4d8719cc26b0d30813abf85e47c76" title="Creates an Irrlicht device. The Irrlicht device is the root object for using the engine.">createDevice</a>(driverType, core::dimension2d<u32>(640, 480), | ||
123 | 16, <span class="keyword">false</span>, shadows); | ||
124 | |||
125 | <span class="keywordflow">if</span> (device == 0) | ||
126 | <span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span> | ||
127 | |||
128 | video::IVideoDriver* driver = device->getVideoDriver(); | ||
129 | scene::ISceneManager* smgr = device->getSceneManager(); | ||
130 | </pre></div><p>For our environment, we load a .3ds file. It is a small room I modelled with Anim8or and exported into the 3ds format because the Irrlicht Engine does not support the .an8 format. I am a very bad 3d graphic artist, and so the texture mapping is not very nice in this model. Luckily I am a better programmer than artist, and so the Irrlicht Engine is able to create a cool texture mapping for me: Just use the mesh manipulator and create a planar texture mapping for the mesh. If you want to see the mapping I made with Anim8or, uncomment this line. I also did not figure out how to set the material right in Anim8or, it has a specular light color which I don't really like. I'll switch it off too with this code. </p> | ||
131 | <div class="fragment"><pre class="fragment"> scene::IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"../../media/room.3ds"</span>); | ||
132 | |||
133 | smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.004f); | ||
134 | |||
135 | scene::ISceneNode* node = 0; | ||
136 | |||
137 | node = smgr->addAnimatedMeshSceneNode(mesh); | ||
138 | node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.jpg"</span>)); | ||
139 | node->getMaterial(0).SpecularColor.set(0,0,0,0); | ||
140 | </pre></div><p>Now, for the first special effect: Animated water. It works like this: The WaterSurfaceSceneNode takes a mesh as input and makes it wave like a water surface. And if we let this scene node use a nice material like the EMT_REFLECTION_2_LAYER, it looks really cool. We are doing this with the next few lines of code. As input mesh, we create a hill plane mesh, without hills. But any other mesh could be used for this, you could even use the room.3ds (which would look really strange) if you want to. </p> | ||
141 | <div class="fragment"><pre class="fragment"> mesh = smgr->addHillPlaneMesh( <span class="stringliteral">"myHill"</span>, | ||
142 | core::dimension2d<f32>(20,20), | ||
143 | core::dimension2d<u32>(40,40), 0, 0, | ||
144 | core::dimension2d<f32>(0,0), | ||
145 | core::dimension2d<f32>(10,10)); | ||
146 | |||
147 | node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f); | ||
148 | node->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(0,7,0)); | ||
149 | |||
150 | node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/stones.jpg"</span>)); | ||
151 | node->setMaterialTexture(1, driver->getTexture(<span class="stringliteral">"../../media/water.jpg"</span>)); | ||
152 | |||
153 | node->setMaterialType(<a class="code" href="namespaceirr_1_1video.html#ac8e9b6c66f7cebabd1a6d30cbc5430f1ad8574343353ed8ade6e78bc04d64b6ae" title="A reflecting material with an optional non reflecting texture layer.">video::EMT_REFLECTION_2_LAYER</a>); | ||
154 | </pre></div><p>The second special effect is very basic, I bet you saw it already in some Irrlicht Engine demos: A transparent billboard combined with a dynamic light. We simply create a light scene node, let it fly around, and to make it look more cool, we attach a billboard scene node to it. </p> | ||
155 | <div class="fragment"><pre class="fragment"> <span class="comment">// create light</span> | ||
156 | |||
157 | node = smgr->addLightSceneNode(0, <a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(0,0,0), | ||
158 | video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 800.0f); | ||
159 | scene::ISceneNodeAnimator* anim = 0; | ||
160 | anim = smgr->createFlyCircleAnimator (<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(0,150,0),250.0f); | ||
161 | node->addAnimator(anim); | ||
162 | anim->drop(); | ||
163 | |||
164 | <span class="comment">// attach billboard to light</span> | ||
165 | |||
166 | node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50)); | ||
167 | node->setMaterialFlag(<a class="code" href="namespaceirr_1_1video.html#a8a3bc00ae8137535b9fbc5f40add70d3acea597a2692b8415486a464a7f954d34" title="Will this material be lighted? Default: true.">video::EMF_LIGHTING</a>, <span class="keyword">false</span>); | ||
168 | node->setMaterialType(<a class="code" href="namespaceirr_1_1video.html#ac8e9b6c66f7cebabd1a6d30cbc5430f1a1b5a814c4466aca2943ff056003a50d1" title="A transparent material.">video::EMT_TRANSPARENT_ADD_COLOR</a>); | ||
169 | node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particlewhite.bmp"</span>)); | ||
170 | </pre></div><p>The next special effect is a lot more interesting: A particle system. The particle system in the Irrlicht Engine is quite modular and extensible, but yet easy to use. There is a particle system scene node into which you can put a particle emitter, which makes particles come out of nothing. These emitters are quite flexible and usually have lots of parameters like direction, amount, and color of the particles they create.</p> | ||
171 | <p>There are different emitters, for example a point emitter which lets particles pop out at a fixed point. If the particle emitters available in the engine are not enough for you, you can easily create your own ones, you'll simply have to create a class derived from the IParticleEmitter interface and attach it to the particle system using setEmitter(). In this example we create a box particle emitter, which creates particles randomly inside a box. The parameters define the box, direction of the particles, minimal and maximal new particles per second, color, and minimal and maximal lifetime of the particles.</p> | ||
172 | <p>Because only with emitters particle system would be a little bit boring, there are particle affectors which modify particles while they fly around. Affectors can be added to a particle system for simulating additional effects like gravity or wind. The particle affector we use in this example is an affector which modifies the color of the particles: It lets them fade out. Like the particle emitters, additional particle affectors can also be implemented by you, simply derive a class from IParticleAffector and add it with addAffector().</p> | ||
173 | <p>After we set a nice material to the particle system, we have a cool looking camp fire. By adjusting material, texture, particle emitter, and affector parameters, it is also easily possible to create smoke, rain, explosions, snow, and so on. </p> | ||
174 | <div class="fragment"><pre class="fragment"> <span class="comment">// create a particle system</span> | ||
175 | |||
176 | scene::IParticleSystemSceneNode* ps = | ||
177 | smgr->addParticleSystemSceneNode(<span class="keyword">false</span>); | ||
178 | |||
179 | scene::IParticleEmitter* em = ps->createBoxEmitter( | ||
180 | core::aabbox3d<f32>(-7,0,-7,7,1,7), <span class="comment">// emitter size</span> | ||
181 | <a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(0.0f,0.06f,0.0f), <span class="comment">// initial direction</span> | ||
182 | 80,100, <span class="comment">// emit rate</span> | ||
183 | video::SColor(0,255,255,255), <span class="comment">// darkest color</span> | ||
184 | video::SColor(0,255,255,255), <span class="comment">// brightest color</span> | ||
185 | 800,2000,0, <span class="comment">// min and max age, angle</span> | ||
186 | <a class="code" href="namespaceirr_1_1core.html#af6dc5c45ff13e7712758c827ff58676b" title="Typedef for an f32 dimension.">core::dimension2df</a>(10.f,10.f), <span class="comment">// min size</span> | ||
187 | <a class="code" href="namespaceirr_1_1core.html#af6dc5c45ff13e7712758c827ff58676b" title="Typedef for an f32 dimension.">core::dimension2df</a>(20.f,20.f)); <span class="comment">// max size</span> | ||
188 | |||
189 | ps->setEmitter(em); <span class="comment">// this grabs the emitter</span> | ||
190 | em->drop(); <span class="comment">// so we can drop it here without deleting it</span> | ||
191 | |||
192 | scene::IParticleAffector* paf = ps->createFadeOutParticleAffector(); | ||
193 | |||
194 | ps->addAffector(paf); <span class="comment">// same goes for the affector</span> | ||
195 | paf->drop(); | ||
196 | |||
197 | ps->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-70,60,40)); | ||
198 | ps->setScale(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(2,2,2)); | ||
199 | ps->setMaterialFlag(<a class="code" href="namespaceirr_1_1video.html#a8a3bc00ae8137535b9fbc5f40add70d3acea597a2692b8415486a464a7f954d34" title="Will this material be lighted? Default: true.">video::EMF_LIGHTING</a>, <span class="keyword">false</span>); | ||
200 | ps->setMaterialFlag(<a class="code" href="namespaceirr_1_1video.html#a8a3bc00ae8137535b9fbc5f40add70d3a4bc03b7b9dd19e577bf909313ea62510" title="May be written to the zbuffer or is it readonly. Default: true.">video::EMF_ZWRITE_ENABLE</a>, <span class="keyword">false</span>); | ||
201 | ps->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/fire.bmp"</span>)); | ||
202 | ps->setMaterialType(<a class="code" href="namespaceirr_1_1video.html#ac8e9b6c66f7cebabd1a6d30cbc5430f1a1b5a814c4466aca2943ff056003a50d1" title="A transparent material.">video::EMT_TRANSPARENT_ADD_COLOR</a>); | ||
203 | </pre></div><p>Next we add a volumetric light node, which adds a glowing fake area light to the scene. Like with the billboards and particle systems we also assign a texture for the desired effect, though this time we'll use a texture animator to create the illusion of a magical glowing area effect. </p> | ||
204 | <div class="fragment"><pre class="fragment"> scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1, | ||
205 | 32, <span class="comment">// Subdivisions on U axis</span> | ||
206 | 32, <span class="comment">// Subdivisions on V axis</span> | ||
207 | video::SColor(0, 255, 255, 255), <span class="comment">// foot color</span> | ||
208 | video::SColor(0, 0, 0, 0)); <span class="comment">// tail color</span> | ||
209 | |||
210 | <span class="keywordflow">if</span> (n) | ||
211 | { | ||
212 | n->setScale(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(56.0f, 56.0f, 56.0f)); | ||
213 | n->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-120,50,40)); | ||
214 | |||
215 | <span class="comment">// load textures for animation</span> | ||
216 | core::array<video::ITexture*> textures; | ||
217 | <span class="keywordflow">for</span> (<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> g=7; g > 0; --g) | ||
218 | { | ||
219 | <a class="code" href="namespaceirr_1_1core.html#ade1071a878633f2f6d8a75c5d11fec19" title="Typedef for character strings.">core::stringc</a> tmp; | ||
220 | tmp = <span class="stringliteral">"../../media/portal"</span>; | ||
221 | tmp += g; | ||
222 | tmp += <span class="stringliteral">".bmp"</span>; | ||
223 | video::ITexture* t = driver->getTexture( tmp.c_str() ); | ||
224 | textures.push_back(t); | ||
225 | } | ||
226 | |||
227 | <span class="comment">// create texture animator</span> | ||
228 | scene::ISceneNodeAnimator* glow = smgr->createTextureAnimator(textures, 150); | ||
229 | |||
230 | <span class="comment">// add the animator</span> | ||
231 | n->addAnimator(glow); | ||
232 | |||
233 | <span class="comment">// drop the animator because it was created with a create() function</span> | ||
234 | glow->drop(); | ||
235 | } | ||
236 | </pre></div><p>As our last special effect, we want a dynamic shadow be casted from an animated character. For this we load a DirectX .x model and place it into our world. For creating the shadow, we simply need to call addShadowVolumeSceneNode(). The color of shadows is only adjustable globally for all shadows, by calling ISceneManager::setShadowColor(). Voila, here is our dynamic shadow.</p> | ||
237 | <p>Because the character is a little bit too small for this scene, we make it bigger using setScale(). And because the character is lighted by a dynamic light, we need to normalize the normals to make the lighting on it correct. This is always necessary if the scale of a dynamic lighted model is not (1,1,1). Otherwise it would get too dark or too bright because the normals will be scaled too. </p> | ||
238 | <div class="fragment"><pre class="fragment"> <span class="comment">// add animated character</span> | ||
239 | |||
240 | mesh = smgr->getMesh(<span class="stringliteral">"../../media/dwarf.x"</span>); | ||
241 | scene::IAnimatedMeshSceneNode* anode = 0; | ||
242 | |||
243 | anode = smgr->addAnimatedMeshSceneNode(mesh); | ||
244 | anode->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-50,20,-60)); | ||
245 | anode->setAnimationSpeed(15); | ||
246 | |||
247 | <span class="comment">// add shadow</span> | ||
248 | anode->addShadowVolumeSceneNode(); | ||
249 | smgr->setShadowColor(video::SColor(150,0,0,0)); | ||
250 | |||
251 | <span class="comment">// make the model a little bit bigger and normalize its normals</span> | ||
252 | <span class="comment">// because of the scaling, for correct lighting</span> | ||
253 | anode->setScale(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(2,2,2)); | ||
254 | anode->setMaterialFlag(<a class="code" href="namespaceirr_1_1video.html#a8a3bc00ae8137535b9fbc5f40add70d3a3efe2d4921909a842adfc44dacc74520" title="Normalizes normals. Default: false.">video::EMF_NORMALIZE_NORMALS</a>, <span class="keyword">true</span>); | ||
255 | </pre></div><p>Finally we simply have to draw everything, that's all. </p> | ||
256 | <div class="fragment"><pre class="fragment"> scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(); | ||
257 | camera->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-50,50,-150)); | ||
258 | camera->setFarValue(10000.0f); <span class="comment">// this increase a shadow visible range.</span> | ||
259 | |||
260 | <span class="comment">// disable mouse cursor</span> | ||
261 | device->getCursorControl()->setVisible(<span class="keyword">false</span>); | ||
262 | |||
263 | <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> lastFPS = -1; | ||
264 | |||
265 | <span class="keywordflow">while</span>(device->run()) | ||
266 | <span class="keywordflow">if</span> (device->isWindowActive()) | ||
267 | { | ||
268 | driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0); | ||
269 | |||
270 | smgr->drawAll(); | ||
271 | |||
272 | driver->endScene(); | ||
273 | |||
274 | <span class="keyword">const</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> fps = driver->getFPS(); | ||
275 | |||
276 | <span class="keywordflow">if</span> (lastFPS != fps) | ||
277 | { | ||
278 | <a class="code" href="namespaceirr_1_1core.html#aef83fafbb1b36fcce44c07c9be23a7f2" title="Typedef for wide character strings.">core::stringw</a> str = L<span class="stringliteral">"Irrlicht Engine - SpecialFX example ["</span>; | ||
279 | str += driver->getName(); | ||
280 | str += <span class="stringliteral">"] FPS:"</span>; | ||
281 | str += fps; | ||
282 | |||
283 | device->setWindowCaption(str.c_str()); | ||
284 | lastFPS = fps; | ||
285 | } | ||
286 | } | ||
287 | |||
288 | device->drop(); | ||
289 | |||
290 | <span class="keywordflow">return</span> 0; | ||
291 | } | ||
292 | </pre></div> </div></div> | ||
293 | </div> | ||
294 | <div id="nav-path" class="navpath"> | ||
295 | <ul> | ||
296 | <!-- window showing the filter options --> | ||
297 | <div id="MSearchSelectWindow" | ||
298 | onmouseover="return searchBox.OnSearchSelectShow()" | ||
299 | onmouseout="return searchBox.OnSearchSelectHide()" | ||
300 | onkeydown="return searchBox.OnSearchSelectKey(event)"> | ||
301 | <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> | ||
302 | |||
303 | <!-- iframe showing the search results (closed by default) --> | ||
304 | <div id="MSearchResultsWindow"> | ||
305 | <iframe src="javascript:void(0)" frameborder="0" | ||
306 | name="MSearchResults" id="MSearchResults"> | ||
307 | </iframe> | ||
308 | </div> | ||
309 | |||
310 | |||
311 | <li class="footer"> | ||
312 | <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht | ||
313 | Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Tue Nov 6 2012 11:06:01 for Irrlicht 3D Engine by | ||
314 | <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li> | ||
315 | </ul> | ||
316 | </div> | ||
317 | |||
318 | |||
319 | </body> | ||
320 | </html> | ||