diff options
author | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
commit | 959831f4ef5a3e797f576c3de08cd65032c997ad (patch) | |
tree | e7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html | |
parent | Add info about changes to Irrlicht. (diff) | |
download | SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2 SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz |
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html')
-rw-r--r-- | libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html | 258 |
1 files changed, 129 insertions, 129 deletions
diff --git a/libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html b/libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html index e3e4a6b..fb13d48 100644 --- a/libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html +++ b/libraries/irrlicht-1.8/examples/15.LoadIrrFile/tutorial.html | |||
@@ -1,129 +1,129 @@ | |||
1 | <html> | 1 | <html> |
2 | <head> | 2 | <head> |
3 | <title>Irrlicht Engine Tutorial</title> | 3 | <title>Irrlicht Engine Tutorial</title> |
4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
5 | </head> | 5 | </head> |
6 | 6 | ||
7 | <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> | 7 | <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> |
8 | <br> | 8 | <br> |
9 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> | 9 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> |
10 | <tr> | 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> | 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> | 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> | 13 | <b><font color="#FFFFFF">Tutorial 15. Load .irr File</font></b></td> |
14 | </tr> | 14 | </tr> |
15 | <tr bgcolor="#eeeeff"> | 15 | <tr bgcolor="#eeeeff"> |
16 | <td height="90" colspan="2"> <div align="left"> | 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 | 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 | 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>, | 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 | 20 | which can also be used as world and particle editor. This tutorial shows |
21 | how to use .irr files.</p> | 21 | how to use .irr files.</p> |
22 | <p align="center"><img src="../../media/015shot.jpg" width="256" height="200"><br> | 22 | <p align="center"><img src="../../media/015shot.jpg" width="256" height="200"><br> |
23 | </p> | 23 | </p> |
24 | </div></td> | 24 | </div></td> |
25 | </tr> | 25 | </tr> |
26 | </table> | 26 | </table> |
27 | <br> | 27 | <br> |
28 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> | 28 | <table width="95%" border="0" cellspacing="0" cellpadding="2" align="center"> |
29 | <tr> | 29 | <tr> |
30 | <td bgcolor="#666699"> <div align="center"><b><font color="#000000"></font></b></div> | 30 | <td bgcolor="#666699"> <div align="center"><b><font color="#000000"></font></b></div> |
31 | <font color="#FFFFFF"><b>Lets start!</b></font></td> | 31 | <font color="#FFFFFF"><b>Lets start!</b></font></td> |
32 | </tr> | 32 | </tr> |
33 | <tr> | 33 | <tr> |
34 | <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left"> | 34 | <td height="90" bgcolor="#eeeeff" valign="top"> <div align="left"> |
35 | <p>Lets start: Create an Irrlicht device and setup the window.</p> | 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"> | 36 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
37 | <tr> | 37 | <tr> |
38 | <td> <pre>#include <irrlicht.h> | 38 | <td> <pre>#include <irrlicht.h> |
39 | #include <iostream> | 39 | #include <iostream> |
40 | using namespace irr; | 40 | using namespace irr; |
41 | 41 | ||
42 | #pragma comment(lib, "Irrlicht.lib") | 42 | #pragma comment(lib, "Irrlicht.lib") |
43 | 43 | ||
44 | int main() | 44 | int main() |
45 | { | 45 | { |
46 | // ask user for driver | 46 | // ask user for driver |
47 | 47 | ||
48 | video::E_DRIVER_TYPE driverType; | 48 | video::E_DRIVER_TYPE driverType; |
49 | 49 | ||
50 | printf("Please select the driver you want for this example:\n"\ | 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"\ | 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"\ | 52 | " (d) Software Renderer\n (e) Apfelbaum Software Renderer\n"\ |
53 | " (f) NullDevice\n (otherKey) exit\n\n"); | 53 | " (f) NullDevice\n (otherKey) exit\n\n"); |
54 | 54 | ||
55 | char i; | 55 | char i; |
56 | std::cin >> i; | 56 | std::cin >> i; |
57 | 57 | ||
58 | switch(i) | 58 | switch(i) |
59 | { | 59 | { |
60 | case 'a': driverType = video::EDT_DIRECT3D9;break; | 60 | case 'a': driverType = video::EDT_DIRECT3D9;break; |
61 | case 'b': driverType = video::EDT_DIRECT3D8;break; | 61 | case 'b': driverType = video::EDT_DIRECT3D8;break; |
62 | case 'c': driverType = video::EDT_OPENGL; break; | 62 | case 'c': driverType = video::EDT_OPENGL; break; |
63 | case 'd': driverType = video::EDT_SOFTWARE; break; | 63 | case 'd': driverType = video::EDT_SOFTWARE; break; |
64 | case 'e': driverType = video::EDT_BURNINGSVIDEO;break; | 64 | case 'e': driverType = video::EDT_BURNINGSVIDEO;break; |
65 | case 'f': driverType = video::EDT_NULL; break; | 65 | case 'f': driverType = video::EDT_NULL; break; |
66 | default: return 1; | 66 | default: return 1; |
67 | } | 67 | } |
68 | 68 | ||
69 | // create device and exit if creation failed | 69 | // create device and exit if creation failed |
70 | 70 | ||
71 | IrrlichtDevice* device = | 71 | IrrlichtDevice* device = |
72 | createDevice(driverType, core::dimension2d<s32>(640, 480)); | 72 | createDevice(driverType, core::dimension2d<s32>(640, 480)); |
73 | 73 | ||
74 | if (device == 0) | 74 | if (device == 0) |
75 | return 1; // could not create selected driver. | 75 | return 1; // could not create selected driver. |
76 | 76 | ||
77 | device->setWindowCaption(L"Load .irr file example"); | 77 | device->setWindowCaption(L"Load .irr file example"); |
78 | 78 | ||
79 | video::IVideoDriver* driver = device->getVideoDriver(); | 79 | video::IVideoDriver* driver = device->getVideoDriver(); |
80 | scene::ISceneManager* smgr = device->getSceneManager(); | 80 | scene::ISceneManager* smgr = device->getSceneManager(); |
81 | </pre></td> | 81 | </pre></td> |
82 | </tr> | 82 | </tr> |
83 | </table> | 83 | </table> |
84 | <p>Now load our .irr file. .irr files can store the whole scene graph | 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 | 85 | including animators, materials and particle systems. And there is also |
86 | the possibility to store arbitrary user data for every scene node in | 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 | 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 | 88 | here. See the documentation at ISceneManager::loadScene and ISceneManager::saveScene |
89 | for more information. So to load and display a complicated huge scene, | 89 | for more information. So to load and display a complicated huge scene, |
90 | we only need a single call to loadScene().</p> | 90 | we only need a single call to loadScene().</p> |
91 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> | 91 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
92 | <tr> | 92 | <tr> |
93 | <td><pre>// load the scene<br>smgr->loadScene("../../media/example.irr"); </pre></td> | 93 | <td><pre>// load the scene<br>smgr->loadScene("../../media/example.irr"); </pre></td> |
94 | </tr> | 94 | </tr> |
95 | </table> | 95 | </table> |
96 | <p>That was it already. Now add a camera and draw the scene.</p> | 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"> | 97 | <table width="95%" border="0" cellspacing="2" cellpadding="0" bgcolor="#CCCCCC" align="center"> |
98 | <tr> | 98 | <tr> |
99 | <td> <pre> // add a user controlled camera | 99 | <td> <pre> // add a user controlled camera |
100 | 100 | ||
101 | smgr->addCameraSceneNodeFPS(); | 101 | smgr->addCameraSceneNodeFPS(); |
102 | 102 | ||
103 | // and draw everything. | 103 | // and draw everything. |
104 | 104 | ||
105 | while(device->run()) | 105 | while(device->run()) |
106 | if (device->isWindowActive()) | 106 | if (device->isWindowActive()) |
107 | { | 107 | { |
108 | driver->beginScene(true, true, video::SColor(0,200,200,200)); | 108 | driver->beginScene(true, true, video::SColor(0,200,200,200)); |
109 | smgr->drawAll(); | 109 | smgr->drawAll(); |
110 | driver->endScene(); | 110 | driver->endScene(); |
111 | } | 111 | } |
112 | 112 | ||
113 | device->drop(); | 113 | device->drop(); |
114 | 114 | ||
115 | return 0; | 115 | return 0; |
116 | } | 116 | } |
117 | </pre> </td> | 117 | </pre> </td> |
118 | </tr> | 118 | </tr> |
119 | </table> | 119 | </table> |
120 | 120 | ||
121 | </div> | 121 | </div> |
122 | <p> </p> | 122 | <p> </p> |
123 | </td> | 123 | </td> |
124 | </tr> | 124 | </tr> |
125 | </table> | 125 | </table> |
126 | <p> </p> | 126 | <p> </p> |
127 | <p> </p> | 127 | <p> </p> |
128 | </body> | 128 | </body> |
129 | </html> | 129 | </html> |