From 959831f4ef5a3e797f576c3de08cd65032c997ad Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 13 Jan 2013 18:54:10 +1000 Subject: Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard. --- .../examples/06.2DGraphics/tutorial.html | 326 ++++++++++----------- 1 file changed, 163 insertions(+), 163 deletions(-) (limited to 'libraries/irrlicht-1.8/examples/06.2DGraphics/tutorial.html') diff --git a/libraries/irrlicht-1.8/examples/06.2DGraphics/tutorial.html b/libraries/irrlicht-1.8/examples/06.2DGraphics/tutorial.html index ea6291a..c8acea0 100644 --- a/libraries/irrlicht-1.8/examples/06.2DGraphics/tutorial.html +++ b/libraries/irrlicht-1.8/examples/06.2DGraphics/tutorial.html @@ -1,163 +1,163 @@ - -
-
- Lets start! |
- |||||||||
-
- As always, I include the header files, use the irr namespace, and tell - the linker to link with the .lib file. -
At first, we let the user select the driver type, then start up the - engine, set a caption, and get a pointer to the video driver. -
All 2d graphics in this example are put together into one texture, - 2ddemo.bmp. Because we want to draw colorkey based sprites, we need - to load this texture and tell the engine, which part of it should be - transparent based on a colorkey. In this example, we don't tell it the - color directly, we just say "Hey Irrlicht Engine, you'll find the - color I want at position (0,0) on the texture.". Instead, it would - be also possible to call driver->makeColorKeyTexture(images, - video::SColor(0,0,0,0)), to make e.g. all black pixels transparent. - Please note, that makeColorKeyTexture just creates an alpha channel - based on the color. -
To be able to draw some text with two different fonts, we load them.
- Ok, we load just one, as first font we just use the default font which
- is built into the engine.
Everything is prepared, now we can draw everything in the draw loop, - between the begin scene and end scene calls. In this example, we are - just doing 2d graphics, but it would be no problem to mix them with - 3d graphics. Just try it out, and draw some 3d vertices or set up a - scene with the scene manager and draw it. -
First, we draw 3 sprites, using the alpha channel we created with makeColorKeyTexture. - The last parameter specifiys that the drawing method should use thiw alpha - channel. The parameter before the last one specifies a color, with wich - the sprite should be colored. (255,255,255,255) is full white, so the - sprite will look like the original. The third sprite is drawed colored - based on the time. -
Drawing text is really simple. The code should be self explanatory. -
At last, we draw the Irrlicht Engine logo (without using a color or an - alpha channel) and a transparent 2d Rectangle at the position of the mouse - cursor. -
That's all, it was not really difficult, I hope. -
|
-
- - + + +
+ Lets start! |
+ |||||||||
+
+ As always, I include the header files, use the irr namespace, and tell + the linker to link with the .lib file. +
At first, we let the user select the driver type, then start up the + engine, set a caption, and get a pointer to the video driver. +
All 2d graphics in this example are put together into one texture, + 2ddemo.bmp. Because we want to draw colorkey based sprites, we need + to load this texture and tell the engine, which part of it should be + transparent based on a colorkey. In this example, we don't tell it the + color directly, we just say "Hey Irrlicht Engine, you'll find the + color I want at position (0,0) on the texture.". Instead, it would + be also possible to call driver->makeColorKeyTexture(images, + video::SColor(0,0,0,0)), to make e.g. all black pixels transparent. + Please note, that makeColorKeyTexture just creates an alpha channel + based on the color. +
To be able to draw some text with two different fonts, we load them.
+ Ok, we load just one, as first font we just use the default font which
+ is built into the engine.
Everything is prepared, now we can draw everything in the draw loop, + between the begin scene and end scene calls. In this example, we are + just doing 2d graphics, but it would be no problem to mix them with + 3d graphics. Just try it out, and draw some 3d vertices or set up a + scene with the scene manager and draw it. +
First, we draw 3 sprites, using the alpha channel we created with makeColorKeyTexture. + The last parameter specifiys that the drawing method should use thiw alpha + channel. The parameter before the last one specifies a color, with wich + the sprite should be colored. (255,255,255,255) is full white, so the + sprite will look like the original. The third sprite is drawed colored + based on the time. +
Drawing text is really simple. The code should be self explanatory. +
At last, we draw the Irrlicht Engine logo (without using a color or an + alpha channel) and a transparent 2d Rectangle at the position of the mouse + cursor. +
That's all, it was not really difficult, I hope. +
|
+
+ + -- cgit v1.1