Here is a SPEC file for building RPM´s containing Irrlicht. The SPEC file was created for Fedora Core, but should work just fine on all RPM based Linux distributions. I suggest that the SPEC file, and the needed patch, is to be included within the Irrlicht distribution. The purpose of the patch is mainly to correct some paths in the examples and to change the names of the resulting binaries.
irrlicht-1.3.spec
Code: Select all
Summary: High performance realtime 3D engine
Name: irrlicht
Version: 1.3
Release: 0
License: The Irrlicht Engine License
Group: Development/Libraries
Source: http://prdownload.sourceforge.net/irrlicht/irrlicht-1.3.zip
BuildRequires: mesa-libGLU-devel mesa-libGL-devel libXxf86vm-devel
BuildRoot: /var/tmp/%{name}-buildroot
Requires: mesa-libGL mesa-libGLU
Provides: libIrrlicht
Patch0: irrlicht-1.3.Examples.patch
%description
The Irrlicht Engine is an open source high performance realtime 3D engine written and usable in C++ and also available for .NET languages. It is completely cross-platform, using D3D, OpenGL and its own software renderer, and has all of the state-of-the-art features which can be found in commercial 3d engines.
%package devel
Summary: Header and include files for %{name} %{version}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains the header files, include files and static libraries for %{name}
%package examples
Summary: Example binaries and media for %{name} %{version}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description examples
This package contains the Irrlicht examples and the required media
%prep
%setup -q
%patch0 -p1
%build
cd source/Irrlicht; make; make sharedlib; cd -
cd examples/01.HelloWorld; make; cd -
cd examples/02.Quake3Map; make; cd -
cd examples/03.CustomSceneNode; make; cd -
cd examples/04.Movement; make; cd -
cd examples/05.UserInterface; make; cd -
cd examples/06.2DGraphics; make; cd -
cd examples/07.Collision; make; cd -
cd examples/08.SpecialFX; make; cd -
cd examples/09.Meshviewer; make; cd -
cd examples/10.Shaders; make; cd -
cd examples/11.PerPixelLighting; make; cd -
cd examples/12.TerrainRendering; make; cd -
cd examples/13.RenderToTexture; make; cd -
# cd examples/14.Win32Window; make; cd -
cd examples/15.LoadIrrFile; make; cd -
cd examples/16.Quake3MapShader; make; cd -
cd bin/Linux; rm -f readme.txt; strip *; cd -
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/include/irrlicht
mkdir -p $RPM_BUILD_ROOT/usr/share/irrlicht/media
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 644 source/Irrlicht/libIrrlicht.a $RPM_BUILD_ROOT/usr/lib/libIrrlicht.a
install -m 644 source/Irrlicht/libIrrlicht.so.1.3.0 $RPM_BUILD_ROOT/usr/lib/libIrrlicht.so.1.3.0
ln -s libIrrlicht.so.1.3.0 $RPM_BUILD_ROOT/usr/lib/libIrrlicht.so
install -m 644 include/* $RPM_BUILD_ROOT/usr/include/irrlicht
install -m 644 media/* $RPM_BUILD_ROOT/usr/share/irrlicht/media
install -m 755 bin/Linux/* $RPM_BUILD_ROOT/usr/bin
%files
/usr/lib/libIrrlicht.so.1.3.0
/usr/lib/libIrrlicht.so
%doc doc/Irrlicht.chm
%files devel
/usr/lib/libIrrlicht.a
/usr/include/irrlicht/*
%files examples
/usr/share/irrlicht/media/*
/usr/bin/*
%changelog
* Fri Jun 08 2007 Soren Schimkat <www.mansoft.dk>
- Initial Release
irrlicht-1.3.Examples.patch
Code: Select all
diff -uNr irrlicht-1.3.orig/examples/01.HelloWorld/main.cpp irrlicht-1.3/examples/01.HelloWorld/main.cpp
--- irrlicht-1.3.orig/examples/01.HelloWorld/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/01.HelloWorld/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -145,7 +145,7 @@
By the way, that cool Quake 2 model called sydney was modelled
by Brian Collins.
*/
- IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
+ IAnimatedMesh* mesh = smgr->getMesh("/usr/share/irrlicht/media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
/*
@@ -160,7 +160,7 @@
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation ( scene::EMAT_STAND );
- node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
+ node->setMaterialTexture( 0, driver->getTexture("/usr/share/irrlicht/media/sydney.bmp") );
}
/*
diff -uNr irrlicht-1.3.orig/examples/01.HelloWorld/Makefile irrlicht-1.3/examples/01.HelloWorld/Makefile
--- irrlicht-1.3.orig/examples/01.HelloWorld/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/01.HelloWorld/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 01.HelloWorld
+Target = irrlicht.01.HelloWorld
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/02.Quake3Map/main.cpp irrlicht-1.3/examples/02.Quake3Map/main.cpp
--- irrlicht-1.3.orig/examples/02.Quake3Map/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/02.Quake3Map/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -51,7 +51,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -60,8 +60,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -92,7 +92,7 @@
we are able to read from the files in that archive as they would
directly be stored on disk.
*/
- device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");
+ device->getFileSystem()->addZipFileArchive("/usr/share/irrlicht/media/map-20kdm2.pk3");
/*
Now we can load the mesh by calling getMesh(). We get a pointer returned
diff -uNr irrlicht-1.3.orig/examples/02.Quake3Map/Makefile irrlicht-1.3/examples/02.Quake3Map/Makefile
--- irrlicht-1.3.orig/examples/02.Quake3Map/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/02.Quake3Map/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 02.Quake3Map
+Target = irrlicht.02.Quake3Map
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/03.CustomSceneNode/main.cpp irrlicht-1.3/examples/03.CustomSceneNode/main.cpp
--- irrlicht-1.3.orig/examples/03.CustomSceneNode/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/03.CustomSceneNode/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -159,7 +159,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -168,8 +168,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO; break;
diff -uNr irrlicht-1.3.orig/examples/03.CustomSceneNode/Makefile irrlicht-1.3/examples/03.CustomSceneNode/Makefile
--- irrlicht-1.3.orig/examples/03.CustomSceneNode/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/03.CustomSceneNode/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 03.CustomSceneNode
+Target = irrlicht.03.CustomSceneNode
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/04.Movement/main.cpp irrlicht-1.3/examples/04.Movement/main.cpp
--- irrlicht-1.3.orig/examples/04.Movement/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/04.Movement/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -78,7 +78,7 @@
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -87,8 +87,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -119,7 +119,7 @@
*/
node = smgr->addSphereSceneNode();
node->setPosition(core::vector3df(0,0,30));
- node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/wall.bmp"));
node->setMaterialFlag(video::EMF_LIGHTING, false);
@@ -136,7 +136,7 @@
if (n)
{
- n->setMaterialTexture(0, driver->getTexture("../../media/t351sml.jpg"));
+ n->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/t351sml.jpg"));
n->setMaterialFlag(video::EMF_LIGHTING, false);
scene::ISceneNodeAnimator* anim =
smgr->createFlyCircleAnimator(core::vector3df(0,0,30), 20.0f);
@@ -148,7 +148,7 @@
The last scene node we add to show possibilities of scene node animators is
a md2 model, which uses a 'fly straight' animator to run between to points.
*/
- scene::IAnimatedMeshSceneNode* anms = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/sydney.md2"));
+ scene::IAnimatedMeshSceneNode* anms = smgr->addAnimatedMeshSceneNode(smgr->getMesh("/usr/share/irrlicht/media/sydney.md2"));
if (anms)
{
@@ -175,7 +175,7 @@
anms->setMD2Animation(scene::EMAT_RUN);
anms->setRotation(core::vector3df(0,180.0f,0));
- anms->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));
+ anms->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/sydney.bmp"));
}
@@ -192,7 +192,7 @@
Add a colorful irrlicht logo
*/
device->getGUIEnvironment()->addImage(
- driver->getTexture("../../media/irrlichtlogoalpha2.tga"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlichtlogoalpha2.tga"),
core::position2d<s32>(10,10));
/*
diff -uNr irrlicht-1.3.orig/examples/04.Movement/Makefile irrlicht-1.3/examples/04.Movement/Makefile
--- irrlicht-1.3.orig/examples/04.Movement/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/04.Movement/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 04.Movement
+Target = irrlicht.04.Movement
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/05.UserInterface/main.cpp irrlicht-1.3/examples/05.UserInterface/main.cpp
--- irrlicht-1.3.orig/examples/05.UserInterface/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/05.UserInterface/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -145,7 +145,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -154,8 +154,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -187,7 +187,7 @@
*/
IGUISkin* skin = env->getSkin();
- IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+ IGUIFont* font = env->getFont("/usr/share/irrlicht/media/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);
@@ -222,7 +222,7 @@
env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100));
// add the engine logo
- env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+ env->addImage(driver->getTexture("/usr/share/irrlicht/media/irrlichtlogo2.png"),
position2d<int>(10,10));
diff -uNr irrlicht-1.3.orig/examples/05.UserInterface/Makefile irrlicht-1.3/examples/05.UserInterface/Makefile
--- irrlicht-1.3.orig/examples/05.UserInterface/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/05.UserInterface/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 05.UserInterface
+Target = irrlicht.05.UserInterface
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/06.2DGraphics/main.cpp irrlicht-1.3/examples/06.2DGraphics/main.cpp
--- irrlicht-1.3.orig/examples/06.2DGraphics/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/06.2DGraphics/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -27,7 +27,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -36,8 +36,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -69,7 +69,7 @@
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("/usr/share/irrlicht/media/2ddemo.bmp");
driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));
@@ -81,7 +81,7 @@
images of the red imps (little flying creatures) in the texture.
*/
gui::IGUIFont* font = device->getGUIEnvironment()->getBuiltInFont();
- gui::IGUIFont* font2 = device->getGUIEnvironment()->getFont("../../media/fonthaettenschweiler.bmp");
+ gui::IGUIFont* font2 = device->getGUIEnvironment()->getFont("/usr/share/irrlicht/media/fonthaettenschweiler.bmp");
core::rect<s32> imp1(349,15,385,78);
core::rect<s32> imp2(387,15,423,78);
diff -uNr irrlicht-1.3.orig/examples/06.2DGraphics/Makefile irrlicht-1.3/examples/06.2DGraphics/Makefile
--- irrlicht-1.3.orig/examples/06.2DGraphics/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/06.2DGraphics/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 06.2DGraphics
+Target = irrlicht.06.2DGraphics
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/07.Collision/main.cpp irrlicht-1.3/examples/07.Collision/main.cpp
--- irrlicht-1.3.orig/examples/07.Collision/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/07.Collision/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -26,7 +26,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -35,8 +35,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -56,7 +56,7 @@
scene::ISceneManager* smgr = device->getSceneManager();
- device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");
+ device->getFileSystem()->addZipFileArchive("/usr/share/irrlicht/media/map-20kdm2.pk3");
scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("20kdm2.bsp");
@@ -147,7 +147,7 @@
scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR );
- bill->setMaterialTexture(0, driver->getTexture("../../media/particle.bmp"));
+ bill->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/particle.bmp"));
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialFlag(video::EMF_ZBUFFER, false);
bill->setSize(core::dimension2d<f32>(20.0f, 20.0f));
@@ -155,11 +155,11 @@
// add 3 animated faeries.
video::SMaterial material;
- material.Textures[0] = driver->getTexture("../../media/faerie2.bmp");
+ material.Textures[0] = driver->getTexture("/usr/share/irrlicht/media/faerie2.bmp");
material.Lighting = true;
scene::IAnimatedMeshSceneNode* node = 0;
- scene::IAnimatedMesh* faerie = smgr->getMesh("../../media/faerie.md2");
+ scene::IAnimatedMesh* faerie = smgr->getMesh("/usr/share/irrlicht/media/faerie.md2");
if (faerie)
{
diff -uNr irrlicht-1.3.orig/examples/07.Collision/Makefile irrlicht-1.3/examples/07.Collision/Makefile
--- irrlicht-1.3.orig/examples/07.Collision/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/07.Collision/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 07.Collision
+Target = irrlicht.07.Collision
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/08.SpecialFX/main.cpp irrlicht-1.3/examples/08.SpecialFX/main.cpp
--- irrlicht-1.3.orig/examples/08.SpecialFX/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/08.SpecialFX/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -31,7 +31,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -39,8 +39,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -74,7 +74,7 @@
*/
scene::IAnimatedMesh* mesh = smgr->getMesh(
- "../../media/room.3ds");
+ "/usr/share/irrlicht/media/room.3ds");
smgr->getMeshManipulator()->makePlanarTextureMapping(
mesh->getMesh(0), 0.004f);
@@ -82,7 +82,7 @@
scene::ISceneNode* node = 0;
node = smgr->addAnimatedMeshSceneNode(mesh);
- node->setMaterialTexture(0, driver->getTexture("../../media/wall.jpg"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/wall.jpg"));
node->getMaterial(0).SpecularColor.set(0,0,0,0);
/*
@@ -106,8 +106,8 @@
node = smgr->addWaterSurfaceSceneNode(mesh->getMesh(0), 3.0f, 300.0f, 30.0f);
node->setPosition(core::vector3df(0,7,0));
- node->setMaterialTexture(0, driver->getTexture("../../media/stones.jpg"));
- node->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/stones.jpg"));
+ node->setMaterialTexture(1, driver->getTexture("/usr/share/irrlicht/media/water.jpg"));
node->setMaterialType(video::EMT_REFLECTION_2_LAYER);
@@ -132,7 +132,7 @@
node = smgr->addBillboardSceneNode(node, core::dimension2d<f32>(50, 50));
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
- node->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/particlewhite.bmp"));
/*
The next special effect is a lot more interesting: A particle system. The particle
@@ -187,7 +187,7 @@
paf->drop();
ps->setMaterialFlag(video::EMF_LIGHTING, false);
- ps->setMaterialTexture(0, driver->getTexture("../../media/fire.bmp"));
+ ps->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/fire.bmp"));
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
/*
@@ -206,7 +206,7 @@
// add animated character
- mesh = smgr->getMesh("../../media/dwarf.x");
+ mesh = smgr->getMesh("/usr/share/irrlicht/media/dwarf.x");
scene::IAnimatedMeshSceneNode* anode = 0;
anode = smgr->addAnimatedMeshSceneNode(mesh);
diff -uNr irrlicht-1.3.orig/examples/08.SpecialFX/Makefile irrlicht-1.3/examples/08.SpecialFX/Makefile
--- irrlicht-1.3.orig/examples/08.SpecialFX/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/08.SpecialFX/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 08.SpecialFX
+Target = irrlicht.08.SpecialFX
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/09.Meshviewer/main.cpp irrlicht-1.3/examples/09.Meshviewer/main.cpp
--- irrlicht-1.3.orig/examples/09.Meshviewer/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/09.Meshviewer/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -395,7 +395,7 @@
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D8;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -404,8 +404,8 @@
switch(key)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -435,7 +435,7 @@
smgr->addLightSceneNode();
smgr->addLightSceneNode(0, core::vector3df(50,-50,100), video::SColorf(1.0f,1.0f,1.0f),20000);
// add our media directory as "search path"
- Device->getFileSystem()->addFolderFileArchive ( "../../media/" );
+ Device->getFileSystem()->addFolderFileArchive ( "/usr/share/irrlicht/media/" );
/*
The next step is to read the configuration file. It is stored in the xml
diff -uNr irrlicht-1.3.orig/examples/09.Meshviewer/Makefile irrlicht-1.3/examples/09.Meshviewer/Makefile
--- irrlicht-1.3.orig/examples/09.Meshviewer/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/09.Meshviewer/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 09.Meshviewer
+Target = irrlicht.09.Meshviewer
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/10.Shaders/main.cpp irrlicht-1.3/examples/10.Shaders/main.cpp
--- irrlicht-1.3.orig/examples/10.Shaders/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/10.Shaders/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -116,7 +116,7 @@
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -125,8 +125,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -173,33 +173,33 @@
switch(driverType)
{
- case video::EDT_DIRECT3D8:
- psFileName = "../../media/d3d8.psh";
- vsFileName = "../../media/d3d8.vsh";
+
+ psFileName = "/usr/share/irrlicht/media/d3d8.psh";
+ vsFileName = "/usr/share/irrlicht/media/d3d8.vsh";
break;
- case video::EDT_DIRECT3D9:
+
if (UseHighLevelShaders)
{
- psFileName = "../../media/d3d9.hlsl";
+ psFileName = "/usr/share/irrlicht/media/d3d9.hlsl";
vsFileName = psFileName; // both shaders are in the same file
}
else
{
- psFileName = "../../media/d3d9.psh";
- vsFileName = "../../media/d3d9.vsh";
+ psFileName = "/usr/share/irrlicht/media/d3d9.psh";
+ vsFileName = "/usr/share/irrlicht/media/d3d9.vsh";
}
break;
case video::EDT_OPENGL:
if (UseHighLevelShaders)
{
- psFileName = "../../media/opengl.frag";
- vsFileName = "../../media/opengl.vert";
+ psFileName = "/usr/share/irrlicht/media/opengl.frag";
+ vsFileName = "/usr/share/irrlicht/media/opengl.vert";
}
else
{
- psFileName = "../../media/opengl.psh";
- vsFileName = "../../media/opengl.vsh";
+ psFileName = "/usr/share/irrlicht/media/opengl.psh";
+ vsFileName = "/usr/share/irrlicht/media/opengl.vsh";
}
break;
}
@@ -303,7 +303,7 @@
scene::ISceneNode* node = smgr->addCubeSceneNode(50);
node->setPosition(core::vector3df(0,0,0));
- node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/wall.bmp"));
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType1);
@@ -324,7 +324,7 @@
node = smgr->addCubeSceneNode(50);
node->setPosition(core::vector3df(0,-10,50));
- node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/wall.bmp"));
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setMaterialType((video::E_MATERIAL_TYPE)newMaterialType2);
@@ -345,7 +345,7 @@
node = smgr->addCubeSceneNode(50);
node->setPosition(core::vector3df(0,50,25));
- node->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
+ node->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/wall.bmp"));
node->setMaterialFlag(video::EMF_LIGHTING, false);
smgr->addTextSceneNode(gui->getBuiltInFont(), L"NO SHADER",
video::SColor(255,255,255,255), node);
@@ -361,12 +361,12 @@
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
smgr->addSkyBoxSceneNode(
- driver->getTexture("../../media/irrlicht2_up.jpg"),
- driver->getTexture("../../media/irrlicht2_dn.jpg"),
- driver->getTexture("../../media/irrlicht2_lf.jpg"),
- driver->getTexture("../../media/irrlicht2_rt.jpg"),
- driver->getTexture("../../media/irrlicht2_ft.jpg"),
- driver->getTexture("../../media/irrlicht2_bk.jpg"));
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_up.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_dn.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_lf.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_rt.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_ft.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_bk.jpg"));
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
diff -uNr irrlicht-1.3.orig/examples/10.Shaders/Makefile irrlicht-1.3/examples/10.Shaders/Makefile
--- irrlicht-1.3.orig/examples/10.Shaders/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/10.Shaders/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 10.Shaders
+Target = irrlicht.10.Shaders
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/11.PerPixelLighting/main.cpp irrlicht-1.3/examples/11.PerPixelLighting/main.cpp
--- irrlicht-1.3.orig/examples/11.PerPixelLighting/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/11.PerPixelLighting/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -36,7 +36,7 @@
// set a nicer font
gui::IGUISkin* skin = env->getSkin();
- gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+ gui::IGUIFont* font = env->getFont("/usr/share/irrlicht/media/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);
@@ -157,7 +157,7 @@
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -166,8 +166,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -200,7 +200,7 @@
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
// add irrlicht logo
- env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+ env->addImage(driver->getTexture("/usr/share/irrlicht/media/irrlichtlogo2.png"),
core::position2d<s32>(10,10));
// add camera
@@ -232,7 +232,7 @@
*/
scene::IAnimatedMesh* roomMesh = smgr->getMesh(
- "../../media/room.3ds");
+ "/usr/share/irrlicht/media/room.3ds");
scene::ISceneNode* room = 0;
if (roomMesh)
@@ -254,8 +254,8 @@
If you set it 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");
+ video::ITexture* colorMap = driver->getTexture("/usr/share/irrlicht/media/rockwall.bmp");
+ video::ITexture* normalMap = driver->getTexture("/usr/share/irrlicht/media/rockwall_height.bmp");
driver->makeNormalMapTexture(normalMap, 9.0f);
@@ -299,7 +299,7 @@
// add earth sphere
- scene::IAnimatedMesh* earthMesh = smgr->getMesh("../../media/earth.x");
+ scene::IAnimatedMesh* earthMesh = smgr->getMesh("/usr/share/irrlicht/media/earth.x");
if (earthMesh)
{
//perform various task with the mesh manipulator
@@ -322,7 +322,7 @@
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");
+ video::ITexture* earthNormalMap = driver->getTexture("/usr/share/irrlicht/media/earthbump.bmp");
driver->makeNormalMapTexture(earthNormalMap, 20.0f);
sphere->setMaterialTexture(1, earthNormalMap);
@@ -365,7 +365,7 @@
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
- bill->setMaterialTexture(0, driver->getTexture("../../media/particlered.bmp"));
+ bill->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/particlered.bmp"));
/*
Now the same again, with the second light. The difference is that we add a particle
@@ -393,7 +393,7 @@
bill = smgr->addBillboardSceneNode(light2, core::dimension2d<f32>(120, 120));
bill->setMaterialFlag(video::EMF_LIGHTING, false);
bill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
- bill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
+ bill->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/particlewhite.bmp"));
// add particle system
scene::IParticleSystemSceneNode* ps =
@@ -418,7 +418,7 @@
// adjust some material settings
ps->setMaterialFlag(video::EMF_LIGHTING, false);
- ps->setMaterialTexture(0, driver->getTexture("../../media/fireball.bmp"));
+ ps->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/fireball.bmp"));
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
diff -uNr irrlicht-1.3.orig/examples/11.PerPixelLighting/Makefile irrlicht-1.3/examples/11.PerPixelLighting/Makefile
--- irrlicht-1.3.orig/examples/11.PerPixelLighting/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/11.PerPixelLighting/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 11.PerPixelLighting
+Target = irrlicht.11.PerPixelLighting
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/12.TerrainRendering/main.cpp irrlicht-1.3/examples/12.TerrainRendering/main.cpp
--- irrlicht-1.3.orig/examples/12.TerrainRendering/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/12.TerrainRendering/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -71,7 +71,7 @@
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -80,8 +80,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -110,11 +110,11 @@
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
// add irrlicht logo
- env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
+ env->addImage(driver->getTexture("/usr/share/irrlicht/media/irrlichtlogo2.png"),
core::position2d<s32>(10,10));
//set other font
- env->getSkin()->setFont(env->getFont("../../media/fontlucida.png"));
+ env->getSkin()->setFont(env->getFont("/usr/share/irrlicht/media/fontlucida.png"));
// add some help text
gui::IGUIStaticText* text = env->addStaticText(
@@ -148,7 +148,7 @@
// add terrain scene node
scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(
- "../../media/terrain-heightmap.bmp",
+ "/usr/share/irrlicht/media/terrain-heightmap.bmp",
0, // parent node
-1, // node id
core::vector3df(0.f, 0.f, 0.f), // position
@@ -162,8 +162,8 @@
terrain->setMaterialFlag(video::EMF_LIGHTING, false);
- terrain->setMaterialTexture(0, driver->getTexture("../../media/terrain-texture.jpg"));
- terrain->setMaterialTexture(1, driver->getTexture("../../media/detailmap3.jpg"));
+ terrain->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/terrain-texture.jpg"));
+ terrain->setMaterialTexture(1, driver->getTexture("/usr/share/irrlicht/media/detailmap3.jpg"));
terrain->setMaterialType(video::EMT_DETAIL_MAP);
@@ -207,12 +207,12 @@
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, false);
smgr->addSkyBoxSceneNode(
- driver->getTexture("../../media/irrlicht2_up.jpg"),
- driver->getTexture("../../media/irrlicht2_dn.jpg"),
- driver->getTexture("../../media/irrlicht2_lf.jpg"),
- driver->getTexture("../../media/irrlicht2_rt.jpg"),
- driver->getTexture("../../media/irrlicht2_ft.jpg"),
- driver->getTexture("../../media/irrlicht2_bk.jpg"));
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_up.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_dn.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_lf.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_rt.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_ft.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_bk.jpg"));
driver->setTextureCreationFlag(video::ETCF_CREATE_MIP_MAPS, true);
diff -uNr irrlicht-1.3.orig/examples/12.TerrainRendering/Makefile irrlicht-1.3/examples/12.TerrainRendering/Makefile
--- irrlicht-1.3.orig/examples/12.TerrainRendering/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/12.TerrainRendering/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 12.TerrainRendering
+Target = irrlicht.12.TerrainRendering
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/13.RenderToTexture/main.cpp irrlicht-1.3/examples/13.RenderToTexture/main.cpp
--- irrlicht-1.3.orig/examples/13.RenderToTexture/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/13.RenderToTexture/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -21,7 +21,7 @@
video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -30,8 +30,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -63,11 +63,11 @@
// load and display animated fairy mesh
scene::IAnimatedMeshSceneNode* fairy = smgr->addAnimatedMeshSceneNode(
- smgr->getMesh("../../media/faerie.md2"));
+ smgr->getMesh("/usr/share/irrlicht/media/faerie.md2"));
if (fairy)
{
- fairy->setMaterialTexture(0, driver->getTexture("../../media/faerie2.bmp")); // set diffuse texture
+ fairy->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/faerie2.bmp")); // set diffuse texture
fairy->setMaterialFlag(video::EMF_LIGHTING, true); // enable dynamic lighting
fairy->getMaterial(0).Shininess = 20.0f; // set size of specular highlights
fairy->setPosition(core::vector3df(-10,0,-100));
@@ -143,7 +143,7 @@
{
// create problem text
gui::IGUISkin* skin = env->getSkin();
- gui::IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
+ gui::IGUIFont* font = env->getFont("/usr/share/irrlicht/media/fonthaettenschweiler.bmp");
if (font)
skin->setFont(font);
diff -uNr irrlicht-1.3.orig/examples/13.RenderToTexture/Makefile irrlicht-1.3/examples/13.RenderToTexture/Makefile
--- irrlicht-1.3.orig/examples/13.RenderToTexture/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/13.RenderToTexture/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 13.RenderToTexture
+Target = irrlicht.13.RenderToTexture
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/14.Win32Window/main.cpp irrlicht-1.3/examples/14.Win32Window/main.cpp
--- irrlicht-1.3.orig/examples/14.Win32Window/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/14.Win32Window/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -121,18 +121,18 @@
scene::ISceneNode* cube = smgr->addCubeSceneNode(20);
- cube->setMaterialTexture(0, driver->getTexture("../../media/wall.bmp"));
- cube->setMaterialTexture(1, driver->getTexture("../../media/water.jpg"));
+ cube->setMaterialTexture(0, driver->getTexture("/usr/share/irrlicht/media/wall.bmp"));
+ cube->setMaterialTexture(1, driver->getTexture("/usr/share/irrlicht/media/water.jpg"));
cube->setMaterialFlag( video::EMF_LIGHTING, false );
cube->setMaterialType( video::EMT_REFLECTION_2_LAYER );
smgr->addSkyBoxSceneNode(
- driver->getTexture("../../media/irrlicht2_up.jpg"),
- driver->getTexture("../../media/irrlicht2_dn.jpg"),
- driver->getTexture("../../media/irrlicht2_lf.jpg"),
- driver->getTexture("../../media/irrlicht2_rt.jpg"),
- driver->getTexture("../../media/irrlicht2_ft.jpg"),
- driver->getTexture("../../media/irrlicht2_bk.jpg"));
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_up.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_dn.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_lf.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_rt.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_ft.jpg"),
+ driver->getTexture("/usr/share/irrlicht/media/irrlicht2_bk.jpg"));
// show and execute dialog
diff -uNr irrlicht-1.3.orig/examples/14.Win32Window/Makefile irrlicht-1.3/examples/14.Win32Window/Makefile
--- irrlicht-1.3.orig/examples/14.Win32Window/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/14.Win32Window/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 14.Win32Window
+Target = irrlicht.14.Win32Window
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/15.LoadIrrFile/main.cpp irrlicht-1.3/examples/15.LoadIrrFile/main.cpp
--- irrlicht-1.3.orig/examples/15.LoadIrrFile/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/15.LoadIrrFile/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -22,7 +22,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -31,8 +31,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -65,7 +65,7 @@
// load the scene
- smgr->loadScene("../../media/example.irr");
+ smgr->loadScene("/usr/share/irrlicht/media/example.irr");
/*
That was it already. Now add a camera and draw the scene
diff -uNr irrlicht-1.3.orig/examples/15.LoadIrrFile/Makefile irrlicht-1.3/examples/15.LoadIrrFile/Makefile
--- irrlicht-1.3.orig/examples/15.LoadIrrFile/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/15.LoadIrrFile/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 15.LoadIrrFile
+Target = irrlicht.15.LoadIrrFile
Sources = main.cpp
# general compiler settings
diff -uNr irrlicht-1.3.orig/examples/16.Quake3MapShader/main.cpp irrlicht-1.3/examples/16.Quake3MapShader/main.cpp
--- irrlicht-1.3.orig/examples/16.Quake3MapShader/main.cpp 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/16.Quake3MapShader/main.cpp 2007-06-06 13:23:17.000000000 +0200
@@ -101,7 +101,7 @@
video::E_DRIVER_TYPE driverType;
printf("Please select the driver you want for this example:\n"\
- " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
+ " (c) OpenGL 1.5\n"\
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
" (f) NullDevice\n (otherKey) exit\n\n");
@@ -110,8 +110,8 @@
switch(i)
{
- case 'a': driverType = video::EDT_DIRECT3D9;break;
- case 'b': driverType = video::EDT_DIRECT3D8;break;
+
+
case 'c': driverType = video::EDT_OPENGL; break;
case 'd': driverType = video::EDT_SOFTWARE; break;
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
@@ -137,7 +137,7 @@
scene::ISceneManager* smgr = device->getSceneManager();
//! add our private media directory to the file system
- device->getFileSystem()->addFolderFileArchive("../../media/");
+ device->getFileSystem()->addFolderFileArchive("/usr/share/irrlicht/media/");
/*
To display the Quake 3 map, we first need to load it. Quake 3 maps
@@ -146,7 +146,7 @@
we are able to read from the files in that archive as they would
directly be stored on disk.
*/
- device->getFileSystem()->addZipFileArchive("../../media/map-20kdm2.pk3");
+ device->getFileSystem()->addZipFileArchive("/usr/share/irrlicht/media/map-20kdm2.pk3");
//device->getFileSystem()->addFolderFileArchive("/baseq3/");
/*
@@ -301,8 +301,8 @@
case video::EDT_OPENGL:
env->addImage(driver->getTexture("opengllogo.png"),pos );
break;
- case video::EDT_DIRECT3D8:
- case video::EDT_DIRECT3D9:
+
+
env->addImage(driver->getTexture("directxlogo.png"),pos );
break;
}
diff -uNr irrlicht-1.3.orig/examples/16.Quake3MapShader/Makefile irrlicht-1.3/examples/16.Quake3MapShader/Makefile
--- irrlicht-1.3.orig/examples/16.Quake3MapShader/Makefile 2007-06-06 13:23:17.000000000 +0200
+++ irrlicht-1.3/examples/16.Quake3MapShader/Makefile 2007-06-06 13:23:17.000000000 +0200
@@ -1,7 +1,7 @@
# Makefile for Irrlicht Examples
# It's usually sufficient to change just the target name and source file list
# and be sure that CXX is set to a valid compiler
-Target = 16.Quake3MapShader
+Target = irrlicht.16.Quake3MapShader
Sources = main.cpp
# general compiler settings
The patch was created using the following commands:
Code: Select all
unzip irrlicht-1.3.zip
cp -r irrlicht-1.3 irrlicht-1.3.orig
perl -i -p -e 's/(Target\s+=\s+)(\d+\..+)/$1irrlicht\.$2/g' irrlicht-1.3/examples/*/Makefile
perl -i -p -e 's/\.\.\/\.\.\/media/\/usr\/share\/irrlicht\/media/g' irrlicht-1.3/examples/*/main.cpp
perl -i -p -e 's/\(\w{1}\)\sDirect[^\\]+\\n\s{1}//g;' irrlicht-1.3/examples/*/main.cpp
perl -i -p -e 's/^.+case.+video::EDT_DIRECT3D.+$//;' irrlicht-1.3/examples/*/main.cpp
diff -uNr irrlicht-1.3.orig irrlicht-1.3 > irrlicht-1.3.Examples.patch
rm -rf irrlicht-1.3 irrlicht-1.3.orig
Regards Stickybit