aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html')
-rw-r--r--src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html129
1 files changed, 129 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html
new file mode 100644
index 0000000..e3e4a6b
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/examples/15.LoadIrrFile/tutorial.html
@@ -0,0 +1,129 @@
1<html>
2<head>
3<title>Irrlicht Engine Tutorial</title>
4<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5</head>
6
7<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
8<br>
9<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
10 <tr>
11 <td bgcolor="#666699" width="10"><b><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="../../media/irrlichtlogo.jpg" width="88" height="31" border="0"></a></b></td>
12 <td bgcolor="#666699" width="100%"> <div align="center"><b><font color="#FFFFFF"></font></b></div>
13 <b><font color="#FFFFFF">Tutorial 15. Load .irr File</font></b></td>
14 </tr>
15 <tr bgcolor="#eeeeff">
16 <td height="90" colspan="2"> <div align="left">
17 <p>Since version 1.1, Irrlicht is able to save and load the full scene
18 graph into an .irr file, an xml based format. There is also an editor
19 available to edit those files, named irrEdit on <a href="http://www.ambiera.com/irredit" target="_blank">http://www.ambiera.com/irredit</a>,
20 which can also be used as world and particle editor. This tutorial shows
21 how to use .irr files.</p>
22 <p align="center"><img src="../../media/015shot.jpg" width="256" height="200"><br>
23 </p>
24 </div></td>
25 </tr>
26</table>
27<br>
28<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
29 <tr>
30 <td bgcolor="#666699"> <div align="center"><b><font color="#000000"></font></b></div>
31 <font color="#FFFFFF"><b>Lets start!</b></font></td>
32 </tr>
33 <tr>
34 <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left">
35 <p>Lets start: Create an Irrlicht device and setup the window.</p>
36 <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center">
37 <tr>
38 <td> <pre>#include <irrlicht.h>
39#include <iostream>
40using namespace irr;
41
42#pragma comment(lib, "Irrlicht.lib")
43
44int main()
45{
46 // ask user for driver
47
48 video::E_DRIVER_TYPE driverType;
49
50 printf("Please select the driver you want for this example:\n"\
51 " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
52 " (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\
53 " (f) NullDevice\n (otherKey) exit\n\n");
54
55 char i;
56 std::cin >> i;
57
58 switch(i)
59 {
60 case 'a': driverType = video::EDT_DIRECT3D9;break;
61 case 'b': driverType = video::EDT_DIRECT3D8;break;
62 case 'c': driverType = video::EDT_OPENGL; break;
63 case 'd': driverType = video::EDT_SOFTWARE; break;
64 case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
65 case 'f': driverType = video::EDT_NULL; break;
66 default: return 1;
67 }
68
69 // create device and exit if creation failed
70
71 IrrlichtDevice* device =
72 createDevice(driverType, core::dimension2d<s32>(640, 480));
73
74 if (device == 0)
75 return 1; // could not create selected driver.
76
77 device->setWindowCaption(L"Load .irr file example");
78
79 video::IVideoDriver* driver = device->getVideoDriver();
80 scene::ISceneManager* smgr = device->getSceneManager();
81</pre></td>
82 </tr>
83 </table>
84 <p>Now load our .irr file. .irr files can store the whole scene graph
85 including animators, materials and particle systems. And there is also
86 the possibility to store arbitrary user data for every scene node in
87 that file. To keep this example simple, we are simply loading the scene
88 here. See the documentation at ISceneManager::loadScene and ISceneManager::saveScene
89 for more information. So to load and display a complicated huge scene,
90 we only need a single call to loadScene().</p>
91 <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center">
92 <tr>
93 <td><pre>// load the scene<br>smgr-&gt;loadScene(&quot;../../media/example.irr&quot;); </pre></td>
94 </tr>
95 </table>
96 <p>That was it already. Now add a camera and draw the scene.</p>
97 <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center">
98 <tr>
99 <td> <pre> // add a user controlled camera
100
101 smgr->addCameraSceneNodeFPS();
102
103 // and draw everything.
104
105 while(device->run())
106 if (device->isWindowActive())
107 {
108 driver->beginScene(true, true, video::SColor(0,200,200,200));
109 smgr->drawAll();
110 driver->endScene();
111 }
112
113 device->drop();
114
115 return 0;
116}
117</pre> </td>
118 </tr>
119 </table>
120
121 </div>
122 <p>&nbsp;</p>
123 </td>
124 </tr>
125</table>
126<p>&nbsp;</p>
127<p>&nbsp;</p>
128</body>
129</html>