Replaced some graphics by smaller versions in more compact formats.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2363 dfc29bdd-3216-0410-991c-e03cc46cb475master
|
@ -192,6 +192,7 @@ int main()
|
|||
store pointers to the driver and to the gui environment. */
|
||||
|
||||
device->setWindowCaption(L"Irrlicht Engine - User Interface Demo");
|
||||
device->setResizable(true);
|
||||
|
||||
video::IVideoDriver* driver = device->getVideoDriver();
|
||||
IGUIEnvironment* env = device->getGUIEnvironment();
|
||||
|
|
|
@ -61,7 +61,7 @@ int main()
|
|||
|
||||
/*
|
||||
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
|
||||
2ddemo.png. 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.
|
||||
|
||||
|
@ -72,7 +72,7 @@ int main()
|
|||
e.g. all black pixels transparent. Please note that
|
||||
makeColorKeyTexture just creates an alpha channel based on the color.
|
||||
*/
|
||||
video::ITexture* images = driver->getTexture("../../media/2ddemo.bmp");
|
||||
video::ITexture* images = driver->getTexture("../../media/2ddemo.png");
|
||||
driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));
|
||||
|
||||
/*
|
||||
|
|
|
@ -258,12 +258,11 @@ int main()
|
|||
to a bigger value, the map will look more rocky.
|
||||
*/
|
||||
|
||||
video::ITexture* colorMap =
|
||||
driver->getTexture("../../media/rockwall.bmp");
|
||||
video::ITexture* normalMap =
|
||||
driver->getTexture("../../media/rockwall_height.bmp");
|
||||
|
||||
driver->makeNormalMapTexture(normalMap, 9.0f);
|
||||
if (normalMap)
|
||||
driver->makeNormalMapTexture(normalMap, 9.0f);
|
||||
|
||||
/*
|
||||
But just setting color and normal map is not everything. The
|
||||
|
@ -282,7 +281,8 @@ int main()
|
|||
roomMesh->getMesh(0));
|
||||
|
||||
room = smgr->addMeshSceneNode(tangentMesh);
|
||||
room->setMaterialTexture(0, colorMap);
|
||||
room->setMaterialTexture(0,
|
||||
driver->getTexture("../../media/rockwall.jpg"));
|
||||
room->setMaterialTexture(1, normalMap);
|
||||
|
||||
room->getMaterial(0).SpecularColor.set(0,0,0,0);
|
||||
|
@ -331,13 +331,16 @@ int main()
|
|||
sphere->setPosition(core::vector3df(-70,130,45));
|
||||
|
||||
// load heightmap, create normal map from it and set it
|
||||
video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.bmp");
|
||||
driver->makeNormalMapTexture(earthNormalMap, 20.0f);
|
||||
sphere->setMaterialTexture(1, earthNormalMap);
|
||||
video::ITexture* earthNormalMap = driver->getTexture("../../media/earthbump.jpg");
|
||||
if (earthNormalMap)
|
||||
{
|
||||
driver->makeNormalMapTexture(earthNormalMap, 20.0f);
|
||||
sphere->setMaterialTexture(1, earthNormalMap);
|
||||
sphere->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);
|
||||
}
|
||||
|
||||
// adjust material settings
|
||||
sphere->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
||||
sphere->setMaterialType(video::EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA);
|
||||
|
||||
// add rotation animator
|
||||
scene::ISceneNodeAnimator* anim =
|
||||
|
|
BIN
media/2ddemo.bmp
Before Width: | Height: | Size: 384 KiB |
After Width: | Height: | Size: 43 KiB |
|
@ -9764,7 +9764,7 @@ Frame base
|
|||
|
||||
MeshMaterialList
|
||||
{
|
||||
3;
|
||||
2;
|
||||
1896;
|
||||
1,
|
||||
1,
|
||||
|
@ -11689,18 +11689,6 @@ Frame base
|
|||
}
|
||||
}
|
||||
|
||||
Material Material2
|
||||
{
|
||||
0.800000;0.800000;0.800000;1.000000;;
|
||||
0.000000;
|
||||
0.000000;0.000000;0.000000;;
|
||||
0.317647;0.317647;0.317647;;
|
||||
|
||||
TextureFileName
|
||||
{
|
||||
"dwarf2.jpg";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XSkinMeshHeader
|
||||
|
|
BIN
media/earth.bmp
Before Width: | Height: | Size: 384 KiB |
After Width: | Height: | Size: 24 KiB |
2447
media/earth.x
Before Width: | Height: | Size: 384 KiB |
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 768 KiB |
After Width: | Height: | Size: 87 KiB |
BIN
media/sphere.3ds
Before Width: | Height: | Size: 192 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 711 KiB After Width: | Height: | Size: 180 KiB |
BIN
media/wall.jpg
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 87 KiB |