forked from Mirrorlandia_minetest/irrlicht
Update tutorial.html's in example folders
Add some for newer examples which didn't have those so far. Only updating this once now as some were broken. Next time on release. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6204 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
d1e3905f42
commit
c481179825
@ -195,37 +195,34 @@ tr.heading h2 {
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><div class="image">
|
||||
<img src="../../media/001shot.jpg" alt="001shot.jpg"/>
|
||||
<img src="../../media/example_screenshots/001shot.jpg" alt="001shot.jpg"/>
|
||||
</div>
|
||||
<p>This Tutorial shows how to set up the IDE for using the Irrlicht Engine and how to write a simple HelloWorld program with it. The program will show how to use the basics of the VideoDriver, the GUIEnvironment, and the SceneManager. Microsoft Visual Studio is used as an IDE, but you will also be able to understand everything if you are using a different one or even another operating system than windows.</p>
|
||||
<p>You have to include the header file <irrlicht.h> in order to use the engine. The header file can be found in the Irrlicht Engine SDK directory <code>include</code>. To let the compiler find this header file, the directory where it is located has to be specified. This is different for every IDE and compiler you use. Let's explain shortly how to do this in Microsoft Visual Studio:</p>
|
||||
<p>This tutorial shows how to set up the IDE for using the Irrlicht Engine and how to write a simple HelloWorld program with it. The program will show how to use the basics of the VideoDriver, the GUIEnvironment, and the SceneManager. Microsoft Visual Studio is used as an IDE, but you will also be able to understand everything if you are using a different one or even another operating system than Windows.</p>
|
||||
<p>You have to include the header file <irrlicht.h> in order to use the engine. The header file can be found in the Irrlicht Engine SDK directory <code>include</code>. To let the compiler find this header file, the directory where it is located has to be added in your project as include path. This is different for every IDE and compiler you use. Let's explain shortly how to do this in Visual Studio 2010:</p>
|
||||
<ul>
|
||||
<li>If you use Version 6.0, select the Menu Extras -> Options. Select the directories tab, and select the 'Include' Item in the combo box. Add the <code>include</code> directory of the irrlicht engine folder to the list of directories. Now the compiler will find the Irrlicht.h header file. We also need the irrlicht.lib to be found, so stay in that dialog, select 'Libraries' in the combo box and add the <code>lib/VisualStudio</code> directory. <div class="image">
|
||||
<img src="../../media/vc6optionsdir.jpg" alt="vc6optionsdir.jpg"/>
|
||||
</div>
|
||||
<div class="image">
|
||||
<img src="../../media/vc6include.jpg" alt="vc6include.jpg"/>
|
||||
</div>
|
||||
</li>
|
||||
<li>If your IDE is Visual Studio .NET, select Tools -> Options. Select the projects entry and then select VC++ directories. Select 'show directories for include files' in the combo box, and add the <code>include</code> directory of the irrlicht engine folder to the list of directories. Now the compiler will find the Irrlicht.h header file. We also need the irrlicht.lib to be found, so stay in that dialog, select 'show directories for Library files' and add the <code>lib/VisualStudio</code> directory. <div class="image">
|
||||
<img src="../../media/vcnetinclude.jpg" alt="vcnetinclude.jpg"/>
|
||||
</div>
|
||||
</li>
|
||||
<li>In Visual Studio 2010 select the Menu Project -> Properties. Select the "C/C++" - "General" option, and select the "Additional Include Directories". Add the <code>include</code> directory of the Irrlicht engine folder to the list of directories. Now the compiler will find the irrlicht.h header file. We also need the irrlicht.lib to be found, so select "Linker" - "General" and add the <code>lib/Win64-visualStudio</code> or <code>lib/Win32-visualStudio</code> directory to "Additional Library Directories". Which of the 2 Irrlicht versions you chose depends on the target platform for your application (win32 or x64). In your project properties you can see what your active solution platform is, you can use the same one for Irrlicht.</li>
|
||||
</ul>
|
||||
<p>That's it. With your IDE set up like this, you will now be able to develop applications with the Irrlicht Engine.</p>
|
||||
<p>To be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. In most IDE's you have to add irrlicht.lib (or irrlicht.a or irrlicht.so on Linux) to your Linker input files.</p>
|
||||
<p>For VisualStudio we can be lazy and use the pragma comment lib. We also want to get rid of the console window, which pops up when starting a program with main() (instead of WinMain). This is done by the second pragma. We could also use the WinMain method, though losing platform independence then. </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> That's it. With your IDE set up like this, you will now be able to develop applications with the Irrlicht Engine.</p>
|
||||
<p>Lets start!</p>
|
||||
<p>After we have set up the IDE, the compiler will know where to find the Irrlicht Engine header files so we can include it now in our code. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div></div><!-- fragment --><p> In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if you want to use a class of the engine, you have to write irr:: before the name of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write irr:: anymore. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> There are 5 sub namespaces in the Irrlicht Engine. Take a look at them, you can read a detailed description of them in the documentation by clicking on the top menu item 'Namespace List' or by using this link: <a href="http://irrlicht.sourceforge.net/docu/namespaces.html">http://irrlicht.sourceforge.net/docu/namespaces.html</a> Like the irr namespace, we do not want these 5 sub namespaces now, to keep this example simple. Hence, we tell the compiler again that we do not want always to write their names. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div></div><!-- fragment --><p> To be able to use the Irrlicht.DLL file, we need to link with the Irrlicht.lib. We could set this option in the project settings, but to make it easy, we use a pragma comment lib for VisualStudio. On Windows platforms, we have to get rid of the console window, which pops up when starting a program with main(). This is done by the second pragma. We could also use the WinMain method, though losing platform independence then. </p><div class="fragment"><div class="line"><span class="preprocessor">#ifdef _IRR_WINDOWS_</span></div><div class="line"><span class="preprocessor">#pragma comment(lib, "Irrlicht.lib")</span></div><div class="line"><span class="preprocessor">#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")</span></div><div class="line"><span class="preprocessor">#endif</span></div></div><!-- fragment --><p> This is the main method. We can now use main() on every platform. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div></div><!-- fragment --><p> The most important function of the engine is the createDevice() function. The IrrlichtDevice is created by it, which is the root object for doing anything with the engine. createDevice() has 7 parameters:</p>
|
||||
<p>After we have set up the IDE, the compiler will know where to find the Irrlicht Engine header files so we can include it now in our code. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <irrlicht.h></span></div></div><!-- fragment --><p> That header just adds the getExampleMediaPath tool-functions to help locating the media we need. More about that later below. </p><div class="fragment"><div class="line"><span class="preprocessor">#include "exampleHelper.h"</span></div></div><!-- fragment --><p> In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if you want to use a class of the engine, you have to write irr:: before the name of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice. To get rid of the irr:: in front of the name of every class, we tell the compiler that we use that namespace from now on, and we will not have to write irr:: anymore. Note that you never should do that in headers - otherwise you will pollute the namespace of every file including such a header. So in headers always write out the full names including all namespaces. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>irr;</div></div><!-- fragment --><p> There are 5 sub namespaces in the Irrlicht Engine. Take a look at them, you can read a detailed description of them in the documentation by clicking on the top menu item 'Namespace List' or by using this link: <a href="http://irrlicht.sourceforge.net/docu/namespaces.html">http://irrlicht.sourceforge.net/docu/namespaces.html</a> Like the irr namespace, we do not want these 5 sub namespaces now, to keep this example simple. Hence, we tell the compiler again that we do not want always to write their names. </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span>core;</div><div class="line"><span class="keyword">using namespace </span>scene;</div><div class="line"><span class="keyword">using namespace </span>video;</div><div class="line"><span class="keyword">using namespace </span>io;</div><div class="line"><span class="keyword">using namespace </span>gui;</div></div><!-- fragment --><p> This is the main method. We can now use main() on every platform. </p><div class="fragment"><div class="line"><span class="keywordtype">int</span> main()</div><div class="line">{</div></div><!-- fragment --><p> The most important function of the engine is the createDevice() function. The IrrlichtDevice is created by it, which is the root object for doing anything with the engine. createDevice() has the following parameters:</p>
|
||||
<ul>
|
||||
<li>deviceType: Type of the device. This can currently be the Null-device, one of the two software renderers, D3D8, D3D9, or OpenGL. In this example we use EDT_SOFTWARE, but to try out, you might want to change it to EDT_BURNINGSVIDEO, EDT_NULL, EDT_DIRECT3D8, EDT_DIRECT3D9, or EDT_OPENGL.</li>
|
||||
<li>driverType: Type of the video driver. This can currently be the Null-device, one of the two software renderers, D3D9, or OpenGL. In this example we use EDT_BURNINGSVIDEO, but to try out, you might want to change it to EDT_SOFTWARE, EDT_NULL, EDT_DIRECT3D9, or EDT_OPENGL. Generally you will want to use OpenGL or Direct3D as they are using your graphic card for calculations instead of the CPU and are way faster (and usually better looking). We just use one of the software renderers here as it even works when your graphic card driver isn't set up for 3d support.</li>
|
||||
<li>windowSize: Size of the Window or screen in FullScreenMode to be created. In this example we use 640x480.</li>
|
||||
<li>bits: Amount of color bits per pixel. This should be 16 or 32. The parameter is often ignored when running in windowed mode.</li>
|
||||
<li>fullscreen: Specifies if we want the device to run in fullscreen mode or not.</li>
|
||||
<li>stencilbuffer: Specifies if we want to use the stencil buffer (for drawing shadows).</li>
|
||||
<li>bits: Amount of color bits per pixel. This should be 16 or 32. The parameter is often ignored when running in windowed mode. More commonly you would chose 32 bit, again we're just playing it safe.</li>
|
||||
<li>fullscreen: Specifies if we want the device to run in fullscreen mode or windowed.</li>
|
||||
<li>stencilbuffer: Specifies if we want to use the stencil buffer (you need it for drawing shadows).</li>
|
||||
<li>vsync: Specifies if we want to have vsync enabled, this is only useful in fullscreen mode.</li>
|
||||
<li>eventReceiver: An object to receive events. We do not want to use this parameter here, and set it to 0.</li>
|
||||
</ul>
|
||||
<p>Always check the return value to cope with unsupported drivers, dimensions, etc. </p><div class="fragment"><div class="line">IrrlichtDevice *device =</div><div class="line"> createDevice( video::EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,</div><div class="line"> <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, 0);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span> 1;</div></div><!-- fragment --><p> Set the caption of the window to some nice text. Note that there is an 'L' in front of the string. The Irrlicht Engine uses wide character strings when displaying text. </p><div class="fragment"><div class="line">device->setWindowCaption(L<span class="stringliteral">"Hello World! - Irrlicht Engine Demo"</span>);</div></div><!-- fragment --><p> Get a pointer to the VideoDriver, the SceneManager and the graphical user interface environment, so that we do not always have to write device->getVideoDriver(), device->getSceneManager(), or device->getGUIEnvironment(). </p><div class="fragment"><div class="line">IVideoDriver* driver = device->getVideoDriver();</div><div class="line">ISceneManager* smgr = device->getSceneManager();</div><div class="line">IGUIEnvironment* guienv = device->getGUIEnvironment();</div></div><!-- fragment --><p> We add a hello world label to the window, using the GUI environment. The text is placed at the position (10,10) as top left corner and (260,22) as lower right corner. </p><div class="fragment"><div class="line">guienv->addStaticText(L<span class="stringliteral">"Hello World! This is the Irrlicht Software renderer!"</span>,</div><div class="line"> rect<s32>(10,10,260,22), <span class="keyword">true</span>);</div></div><!-- fragment --><p> To show something interesting, we load a Quake 2 model and display it. We only have to get the Mesh from the Scene Manager with getMesh() and add a SceneNode to display the mesh with addAnimatedMeshSceneNode(). We check the return value of getMesh() to become aware of loading problems and other errors.</p>
|
||||
<p>Instead of writing the filename sydney.md2, it would also be possible to load a Maya object file (.obj), a complete Quake3 map (.bsp) or any other supported file format. By the way, that cool Quake 2 model called sydney was modelled by Brian Collins. </p><div class="fragment"><div class="line">IAnimatedMesh* mesh = smgr->getMesh(<span class="stringliteral">"../../media/sydney.md2"</span>);</div><div class="line"><span class="keywordflow">if</span> (!mesh)</div><div class="line">{</div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line">}</div><div class="line">IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );</div></div><!-- fragment --><p> To let the mesh look a little bit nicer, we change its material. We disable lighting because we do not have a dynamic light in here, and the mesh would be totally black otherwise. Then we set the frame loop, such that the predefined STAND animation is used. And last, we apply a texture to the mesh. Without it the mesh would be drawn using only a color. </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> node->setMD2Animation(scene::EMAT_STAND);</div><div class="line"> node->setMaterialTexture( 0, driver->getTexture(<span class="stringliteral">"../../media/sydney.bmp"</span>) );</div><div class="line">}</div></div><!-- fragment --><p> To look at the mesh, we place a camera into 3d space at the position (0, 30, -40). The camera looks from there to (0,5,0), which is approximately the place where our md2 model is. </p><div class="fragment"><div class="line">smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));</div></div><!-- fragment --><p> Ok, now we have set up the scene, lets draw everything: We run the device in a while() loop, until the device does not want to run any more. This would be when the user closes the window or presses ALT+F4 (or whatever keycode closes a window). </p><div class="fragment"><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div></div><!-- fragment --><p> Anything can be drawn between a beginScene() and an endScene() call. The beginScene() call clears the screen with a color and the depth buffer, if desired. Then we let the Scene Manager and the GUI Environment draw their content. With the endScene() call everything is presented on the screen. </p><div class="fragment"><div class="line"> driver->beginScene(<span class="keyword">true</span>, <span class="keyword">true</span>, SColor(255,100,101,140));</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> guienv->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> After we are done with the render loop, we have to delete the Irrlicht Device created before with createDevice(). In the Irrlicht Engine, you have to delete all objects you created with a method or function which starts with 'create'. The object is simply deleted by calling ->drop(). See the documentation at irr::IReferenceCounted::drop() for more information. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and run. </p>
|
||||
<p>Always check the return value to cope with unsupported drivers, dimensions, etc. </p><div class="fragment"><div class="line">IrrlichtDevice *device =</div><div class="line"> createDevice( video::EDT_BURNINGSVIDEO, dimension2d<u32>(640, 480), 16,</div><div class="line"> <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>, 0);</div><div class="line"></div><div class="line"><span class="keywordflow">if</span> (!device)</div><div class="line"> <span class="keywordflow">return</span> 1;</div></div><!-- fragment --><p> Set the caption of the window to some nice text. Note that there is an 'L' in front of the string. The Irrlicht Engine uses wide character strings when displaying text. </p><div class="fragment"><div class="line">device->setWindowCaption(L<span class="stringliteral">"Hello World! - Irrlicht Engine Demo"</span>);</div></div><!-- fragment --><p> Get a pointer to the VideoDriver, the SceneManager and the graphical user interface environment, so that we do not always have to write device->getVideoDriver(), device->getSceneManager(), or device->getGUIEnvironment(). </p><div class="fragment"><div class="line">IVideoDriver* driver = device->getVideoDriver();</div><div class="line">ISceneManager* smgr = device->getSceneManager();</div><div class="line">IGUIEnvironment* guienv = device->getGUIEnvironment();</div></div><!-- fragment --><p> We add a hello world label to the window, using the GUI environment. The text is placed at the position (10,10) as top left corner and (260,22) as lower right corner. </p><div class="fragment"><div class="line">guienv->addStaticText(L<span class="stringliteral">"Hello World! This is Irrlicht with the burnings software renderer!"</span>,</div><div class="line"> rect<s32>(10,10,260,22), <span class="keyword">true</span>);</div></div><!-- fragment --><p> Get a media path dedicated for your platform. Finding media files for your applications can be tricky. First you have 2 options - working with relative paths or working with absolute paths.</p>
|
||||
<p>On Windows a common solution is that your installer will write a key into the registry with the absolute path of wherever the user installed the media. And in your application you read out that key from the registry. On Linux a common solution is to use config file which is placed in some fixed location (for example in a . file/folder in the user home).</p>
|
||||
<p>But you can also work with relative paths - which is what we do here. There is a slight complication with relative paths as they are relative to your current working directory. And that depends on the way your application is started and it might change inside your application. But mostly it will be set to your executable on start so you can ignore that problem while developing.</p>
|
||||
<p>When inside VisualStudio the current working directory is set to your project files location unless you overwrite Project properties - Debugging</p><ul>
|
||||
<li>Working Directory. In Irrlicht examples the media folder is on most platforms ../../media which works for the examples as it's relative to our project files as well as to the binary (.exe) files.</li>
|
||||
</ul>
|
||||
<p>Whatever you chose to find your base-folder for media - wrap it with some function and then you can improve the code to locate the media later on. </p><div class="fragment"><div class="line"><span class="keyword">const</span> io::path mediaPath = getExampleMediaPath();</div></div><!-- fragment --><p> To show something interesting, we load a Quake 2 model and display it. We get the Mesh from the Scene Manager with getMesh() and add a SceneNode to display the mesh with addAnimatedMeshSceneNode(). Check the return value of getMesh() to become aware of loading problems and other errors.</p>
|
||||
<p>Instead of writing the filename sydney.md2, it would also be possible to load a Maya object file (.obj), a complete Quake3 map (.bsp) or any other supported file format. By the way, that cool Quake 2 model called sydney was modeled by Brian Collins. </p><div class="fragment"><div class="line">IAnimatedMesh* mesh = smgr->getMesh(mediaPath + <span class="stringliteral">"sydney.md2"</span>);</div><div class="line"><span class="keywordflow">if</span> (!mesh)</div><div class="line">{</div><div class="line"> device->drop();</div><div class="line"> <span class="keywordflow">return</span> 1;</div><div class="line">}</div><div class="line">IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );</div></div><!-- fragment --><p> To let the mesh look a little bit nicer, we change its material. We disable lighting because we do not have a dynamic light in here, and the mesh would be totally black otherwise. Then we set the frame loop, such that the predefined STAND animation is used. And last, we apply a texture to the mesh. Without it the mesh would be drawn using only a color. </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (node)</div><div class="line">{</div><div class="line"> node->setMaterialFlag(EMF_LIGHTING, <span class="keyword">false</span>);</div><div class="line"> node->setMD2Animation(scene::EMAT_STAND);</div><div class="line"> node->setMaterialTexture( 0, driver->getTexture(mediaPath + <span class="stringliteral">"sydney.bmp"</span>) );</div><div class="line">}</div></div><!-- fragment --><p> To look at the mesh, we place a camera into 3d space at the position (0, 30, -40). The camera looks from there to (0,5,0), which is approximately the place where our md2 model is. </p><div class="fragment"><div class="line">smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));</div></div><!-- fragment --><p> OK, now we have set up the scene, lets draw everything: We run the device in a while() loop, until the device does not want to run any more. This would be when the user closes the window or presses ALT+F4 (or whatever keycode closes a window on your OS). </p><div class="fragment"><div class="line"><span class="keywordflow">while</span>(device->run())</div><div class="line">{</div></div><!-- fragment --><p> Anything can be drawn between a beginScene() and an endScene() call. The beginScene() call clears the screen with a color and the depth buffer, if desired. Then we let the Scene Manager and the GUI Environment draw their content. With the endScene() call everything is presented on the screen. </p><div class="fragment"><div class="line"> driver->beginScene(ECBF_COLOR | ECBF_DEPTH, SColor(255,100,101,140));</div><div class="line"></div><div class="line"> smgr->drawAll();</div><div class="line"> guienv->drawAll();</div><div class="line"></div><div class="line"> driver->endScene();</div><div class="line">}</div></div><!-- fragment --><p> After we are done with the render loop, we have to delete the Irrlicht Device created before with createDevice(). In the Irrlicht Engine, you have to delete all objects you created with a method or function which starts with 'create'. The object is simply deleted by calling ->drop(). See the documentation at irr::IReferenceCounted::drop() for more information. </p><div class="fragment"><div class="line"> device->drop();</div><div class="line"></div><div class="line"> <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><p> That's it. Compile and run. </p>
|
||||
</div></div><!-- contents -->
|
||||
<!-- HTML footer for doxygen 1.8.13-->
|
||||
<!-- start footer part -->
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,8 +1,9 @@
|
||||
/** Deprecated. This was Example 017 Helloworld mobile for WinCE 6.
|
||||
But WinCE6 support has been removed for Irrlicht 1.9.
|
||||
/** Example 017 Helloworld mobile for WinCE 6. DEPRECATED
|
||||
This was Example 017 Helloworld mobile for WinCE 6.
|
||||
But WinCE6 support has been removed for Irrlicht 1.9.
|
||||
If you still need that please use Irrlicht 1.8 or svn revision 5045 which was the last one to include it.
|
||||
|
||||
Sources still kept for now as it compiles on other platform too. And we might use this example again
|
||||
Sources still kept for now as it compiles on other platform too. And we might use this example again
|
||||
once we support Windows RT.
|
||||
*/
|
||||
|
||||
@ -101,7 +102,7 @@ public:
|
||||
virtual SMaterial& getMaterial(u32 i)
|
||||
{
|
||||
return Material;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
@ -186,7 +187,7 @@ int example_customscenenode()
|
||||
// create engine and camera
|
||||
EventReceiver_basic receiver(device);
|
||||
device->setEventReceiver(&receiver);
|
||||
|
||||
|
||||
IVideoDriver* driver = device->getVideoDriver();
|
||||
ISceneManager* smgr = device->getSceneManager();
|
||||
IGUIEnvironment* guienv = device->getGUIEnvironment();
|
||||
@ -194,10 +195,10 @@ int example_customscenenode()
|
||||
|
||||
smgr->addCameraSceneNode(0, vector3df(0,-40,0), vector3df(0,0,0));
|
||||
|
||||
CSampleSceneNode *myNode =
|
||||
CSampleSceneNode *myNode =
|
||||
new CSampleSceneNode(smgr->getRootSceneNode(), smgr, 666);
|
||||
|
||||
ISceneNodeAnimator* anim =
|
||||
ISceneNodeAnimator* anim =
|
||||
smgr->createRotationAnimator(vector3df(0.8f, 0, 0.8f));
|
||||
|
||||
if(anim)
|
||||
@ -293,7 +294,7 @@ int example_terrain()
|
||||
IrrlichtDevice *device = startup();
|
||||
if (device == 0)
|
||||
return 1; // could not create selected driver.
|
||||
|
||||
|
||||
/*
|
||||
First, we add standard stuff to the scene: A nice irrlicht engine
|
||||
logo, a small help text, a user controlled camera, and we disable
|
||||
@ -363,7 +364,7 @@ int example_terrain()
|
||||
driver->getTexture("../../media/terrain-texture.jpg"));
|
||||
terrain->setMaterialTexture(1,
|
||||
driver->getTexture("../../media/detailmap3.jpg"));
|
||||
|
||||
|
||||
terrain->setMaterialType(video::EMT_DETAIL_MAP);
|
||||
|
||||
terrain->scaleTexture(1.0f, 20.0f);
|
||||
@ -378,7 +379,7 @@ int example_terrain()
|
||||
through the terrain.
|
||||
*/
|
||||
|
||||
// create triangle selector for the terrain
|
||||
// create triangle selector for the terrain
|
||||
scene::ITriangleSelector* selector
|
||||
= smgr->createTerrainTriangleSelector(terrain, 0);
|
||||
terrain->setTriangleSelector(selector);
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
209
examples/27.PostProcessing/tutorial.html
Normal file
209
examples/27.PostProcessing/tutorial.html
Normal file
File diff suppressed because one or more lines are too long
213
examples/28.CubeMapping/tutorial.html
Normal file
213
examples/28.CubeMapping/tutorial.html
Normal file
File diff suppressed because one or more lines are too long
209
examples/30.Profiling/tutorial.html
Normal file
209
examples/30.Profiling/tutorial.html
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user