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-e03cc46cb475
master
hybrid 2009-05-04 15:52:15 +00:00
parent ad8579ca81
commit c655934954
18 changed files with 17 additions and 2468 deletions

View File

@ -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();

View File

@ -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));
/*

View File

@ -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 =

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

BIN
media/2ddemo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

BIN
media/earth.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

BIN
media/earthbump.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

BIN
media/rockwall.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 711 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 87 KiB