mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-14 06:20:26 +01:00
321 lines
24 KiB
HTML
321 lines
24 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<title>Irrlicht 3D Engine: Tutorial 8: SpecialFX</title>
|
||
|
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="resize.js"></script>
|
||
|
<script type="text/javascript" src="navtree.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(initResizable);
|
||
|
</script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div! -->
|
||
|
|
||
|
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
|
||
|
<td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
|
||
|
|
||
|
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">Irrlicht 3D Engine
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</td>
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<!-- Generated by Doxygen 1.7.5.1 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
</div>
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
initNavTree('example008.html','');
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Tutorial 8: SpecialFX </div> </div>
|
||
|
</div>
|
||
|
<div class="contents">
|
||
|
<div class="textblock"><div class="image">
|
||
|
<img src="008shot.jpg" alt="008shot.jpg"/>
|
||
|
</div>
|
||
|
<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>
|
||
|
<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>
|
||
|
<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>
|
||
|
<span class="preprocessor">#include <iostream></span>
|
||
|
<span class="preprocessor">#include "<a class="code" href="driver_choice_8h.html">driverChoice.h</a>"</span>
|
||
|
|
||
|
<span class="keyword">using namespace </span>irr;
|
||
|
|
||
|
<span class="preprocessor">#ifdef _MSC_VER</span>
|
||
|
<span class="preprocessor"></span><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span>
|
||
|
<span class="preprocessor"></span><span class="preprocessor">#endif</span>
|
||
|
<span class="preprocessor"></span>
|
||
|
<span class="keywordtype">int</span> main()
|
||
|
{
|
||
|
<span class="comment">// ask if user would like shadows</span>
|
||
|
<span class="keywordtype">char</span> i;
|
||
|
printf(<span class="stringliteral">"Please press 'y' if you want to use realtime shadows.\n"</span>);
|
||
|
|
||
|
std::cin >> i;
|
||
|
|
||
|
<span class="keyword">const</span> <span class="keywordtype">bool</span> shadows = (i == <span class="charliteral">'y'</span>);
|
||
|
|
||
|
<span class="comment">// ask user for driver</span>
|
||
|
<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();
|
||
|
<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>)
|
||
|
<span class="keywordflow">return</span> 1;
|
||
|
</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>
|
||
|
<div class="fragment"><pre class="fragment"> IrrlichtDevice *device =
|
||
|
<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),
|
||
|
16, <span class="keyword">false</span>, shadows);
|
||
|
|
||
|
<span class="keywordflow">if</span> (device == 0)
|
||
|
<span class="keywordflow">return</span> 1; <span class="comment">// could not create selected driver.</span>
|
||
|
|
||
|
video::IVideoDriver* driver = device->getVideoDriver();
|
||
|
scene::ISceneManager* smgr = device->getSceneManager();
|
||
|
</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>
|
||
|
<div class="fragment"><pre class="fragment"> scene::IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"../../media/room.3ds"</span>);
|
||
|
|
||
|
smgr->getMeshManipulator()->makePlanarTextureMapping(mesh->getMesh(0), 0.004f);
|
||
|
|
||
|
scene::ISceneNode* node = 0;
|
||
|
|
||
|
node = smgr->addAnimatedMeshSceneNode(mesh);
|
||
|
node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/wall.jpg"</span>));
|
||
|
node->getMaterial(0).SpecularColor.set(0,0,0,0);
|
||
|
</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>
|
||
|
<div class="fragment"><pre class="fragment"> mesh = smgr->addHillPlaneMesh( <span class="stringliteral">"myHill"</span>,
|
||
|
core::dimension2d<f32>(20,20),
|
||
|
core::dimension2d<u32>(40,40), 0, 0,
|
||
|
core::dimension2d<f32>(0,0),
|
||
|
core::dimension2d<f32>(10,10));
|
||
|
|
||
|
node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
|
||
|
node->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(0,7,0));
|
||
|
|
||
|
node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/stones.jpg"</span>));
|
||
|
node->setMaterialTexture(1, driver->getTexture(<span class="stringliteral">"../../media/water.jpg"</span>));
|
||
|
|
||
|
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>);
|
||
|
</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>
|
||
|
<div class="fragment"><pre class="fragment"> <span class="comment">// create light</span>
|
||
|
|
||
|
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),
|
||
|
video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 800.0f);
|
||
|
scene::ISceneNodeAnimator* anim = 0;
|
||
|
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);
|
||
|
node->addAnimator(anim);
|
||
|
anim->drop();
|
||
|
|
||
|
<span class="comment">// attach billboard to light</span>
|
||
|
|
||
|
node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));
|
||
|
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>);
|
||
|
node->setMaterialType(<a class="code" href="namespaceirr_1_1video.html#ac8e9b6c66f7cebabd1a6d30cbc5430f1a1b5a814c4466aca2943ff056003a50d1" title="A transparent material.">video::EMT_TRANSPARENT_ADD_COLOR</a>);
|
||
|
node->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/particlewhite.bmp"</span>));
|
||
|
</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>
|
||
|
<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>
|
||
|
<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>
|
||
|
<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>
|
||
|
<div class="fragment"><pre class="fragment"> <span class="comment">// create a particle system</span>
|
||
|
|
||
|
scene::IParticleSystemSceneNode* ps =
|
||
|
smgr->addParticleSystemSceneNode(<span class="keyword">false</span>);
|
||
|
|
||
|
scene::IParticleEmitter* em = ps->createBoxEmitter(
|
||
|
core::aabbox3d<f32>(-7,0,-7,7,1,7), <span class="comment">// emitter size</span>
|
||
|
<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>
|
||
|
80,100, <span class="comment">// emit rate</span>
|
||
|
video::SColor(0,255,255,255), <span class="comment">// darkest color</span>
|
||
|
video::SColor(0,255,255,255), <span class="comment">// brightest color</span>
|
||
|
800,2000,0, <span class="comment">// min and max age, angle</span>
|
||
|
<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>
|
||
|
<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>
|
||
|
|
||
|
ps->setEmitter(em); <span class="comment">// this grabs the emitter</span>
|
||
|
em->drop(); <span class="comment">// so we can drop it here without deleting it</span>
|
||
|
|
||
|
scene::IParticleAffector* paf = ps->createFadeOutParticleAffector();
|
||
|
|
||
|
ps->addAffector(paf); <span class="comment">// same goes for the affector</span>
|
||
|
paf->drop();
|
||
|
|
||
|
ps->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-70,60,40));
|
||
|
ps->setScale(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(2,2,2));
|
||
|
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>);
|
||
|
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>);
|
||
|
ps->setMaterialTexture(0, driver->getTexture(<span class="stringliteral">"../../media/fire.bmp"</span>));
|
||
|
ps->setMaterialType(<a class="code" href="namespaceirr_1_1video.html#ac8e9b6c66f7cebabd1a6d30cbc5430f1a1b5a814c4466aca2943ff056003a50d1" title="A transparent material.">video::EMT_TRANSPARENT_ADD_COLOR</a>);
|
||
|
</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>
|
||
|
<div class="fragment"><pre class="fragment"> scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(0, -1,
|
||
|
32, <span class="comment">// Subdivisions on U axis</span>
|
||
|
32, <span class="comment">// Subdivisions on V axis</span>
|
||
|
video::SColor(0, 255, 255, 255), <span class="comment">// foot color</span>
|
||
|
video::SColor(0, 0, 0, 0)); <span class="comment">// tail color</span>
|
||
|
|
||
|
<span class="keywordflow">if</span> (n)
|
||
|
{
|
||
|
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));
|
||
|
n->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-120,50,40));
|
||
|
|
||
|
<span class="comment">// load textures for animation</span>
|
||
|
core::array<video::ITexture*> textures;
|
||
|
<span class="keywordflow">for</span> (<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> g=7; g > 0; --g)
|
||
|
{
|
||
|
<a class="code" href="namespaceirr_1_1core.html#ade1071a878633f2f6d8a75c5d11fec19" title="Typedef for character strings.">core::stringc</a> tmp;
|
||
|
tmp = <span class="stringliteral">"../../media/portal"</span>;
|
||
|
tmp += g;
|
||
|
tmp += <span class="stringliteral">".bmp"</span>;
|
||
|
video::ITexture* t = driver->getTexture( tmp.c_str() );
|
||
|
textures.push_back(t);
|
||
|
}
|
||
|
|
||
|
<span class="comment">// create texture animator</span>
|
||
|
scene::ISceneNodeAnimator* glow = smgr->createTextureAnimator(textures, 150);
|
||
|
|
||
|
<span class="comment">// add the animator</span>
|
||
|
n->addAnimator(glow);
|
||
|
|
||
|
<span class="comment">// drop the animator because it was created with a create() function</span>
|
||
|
glow->drop();
|
||
|
}
|
||
|
</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>
|
||
|
<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>
|
||
|
<div class="fragment"><pre class="fragment"> <span class="comment">// add animated character</span>
|
||
|
|
||
|
mesh = smgr->getMesh(<span class="stringliteral">"../../media/dwarf.x"</span>);
|
||
|
scene::IAnimatedMeshSceneNode* anode = 0;
|
||
|
|
||
|
anode = smgr->addAnimatedMeshSceneNode(mesh);
|
||
|
anode->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-50,20,-60));
|
||
|
anode->setAnimationSpeed(15);
|
||
|
|
||
|
<span class="comment">// add shadow</span>
|
||
|
anode->addShadowVolumeSceneNode();
|
||
|
smgr->setShadowColor(video::SColor(150,0,0,0));
|
||
|
|
||
|
<span class="comment">// make the model a little bit bigger and normalize its normals</span>
|
||
|
<span class="comment">// because of the scaling, for correct lighting</span>
|
||
|
anode->setScale(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(2,2,2));
|
||
|
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>);
|
||
|
</pre></div><p>Finally we simply have to draw everything, that's all. </p>
|
||
|
<div class="fragment"><pre class="fragment"> scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS();
|
||
|
camera->setPosition(<a class="code" href="namespaceirr_1_1core.html#a06f169d08b5c429f5575acb7edbad811" title="Typedef for a f32 3d vector.">core::vector3df</a>(-50,50,-150));
|
||
|
camera->setFarValue(10000.0f); <span class="comment">// this increase a shadow visible range.</span>
|
||
|
|
||
|
<span class="comment">// disable mouse cursor</span>
|
||
|
device->getCursorControl()->setVisible(<span class="keyword">false</span>);
|
||
|
|
||
|
<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> lastFPS = -1;
|
||
|
|
||
|
<span class="keywordflow">while</span>(device->run())
|
||
|
<span class="keywordflow">if</span> (device->isWindowActive())
|
||
|
{
|
||
|
driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, 0);
|
||
|
|
||
|
smgr->drawAll();
|
||
|
|
||
|
driver->endScene();
|
||
|
|
||
|
<span class="keyword">const</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> fps = driver->getFPS();
|
||
|
|
||
|
<span class="keywordflow">if</span> (lastFPS != fps)
|
||
|
{
|
||
|
<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>;
|
||
|
str += driver->getName();
|
||
|
str += <span class="stringliteral">"] FPS:"</span>;
|
||
|
str += fps;
|
||
|
|
||
|
device->setWindowCaption(str.c_str());
|
||
|
lastFPS = fps;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
device->drop();
|
||
|
|
||
|
<span class="keywordflow">return</span> 0;
|
||
|
}
|
||
|
</pre></div> </div></div>
|
||
|
</div>
|
||
|
<div id="nav-path" class="navpath">
|
||
|
<ul>
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<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>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<li class="footer">
|
||
|
<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht
|
||
|
Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Tue Jan 19 2016 16:08:47 for Irrlicht 3D Engine by
|
||
|
<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|