Page 1 of 2

How does this work?

Posted: Mon May 03, 2004 7:38 pm
by s32_weaselType
How can I run this patch thing here: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=1983

I dont get how to run it!

Posted: Mon May 03, 2004 8:32 pm
by Homer
It works, but you have to edit and then recompile the engine. Delete the lines marked with a "-" and add the lines marked with a "+" and then rebuild Irrlicht.dll.

Posted: Mon May 03, 2004 11:12 pm
by s32_weaselType
I understand that part.

But that would take forever to do all of those changes!

anyone have the modified files that they can send to me?

Posted: Tue May 04, 2004 2:36 am
by guest1
if you are on linux, you will use the command "patch"

if you are on windows, you can download a port to the patch program here: http://unxutils.sourceforge.net/

patch -p0 < yourpatch.patch

Where yourpatch.patch is the file found in the thread, and the patch is located in the same dir as the source.

patch program doesn't work

Posted: Fri May 19, 2006 11:38 pm
by Wolf Dreamer
Download:
by http: UnxUtils.zip
I get it, and I run it, and then type in patch -p0 < 32bit.patch but it doesn't work. I have the downloaded program sh.exe and the patch in the H:\irrlicht-1.0\source\Irrlicht directory where is the source code I want to patch.

Why isn't this working?

zsh command not found: patch

I googled around for that, but didn't find what it meant. Help please.

Posted: Sat May 20, 2006 9:16 am
by hybrid
Better use the win32 native port of 'patch' which does not require additional shells etc. Read the introduction on patching on my webpage (the www button right below this posting) and follow the step-by-step description. Download links for windows tools are on the page. And don't forget to add the --binary parameter for correct line end handling.

Posted: Sat May 20, 2006 10:44 am
by Wolf Dreamer
OK. The binary only download doesn't work, but the download for "binary and documents" does work.
http://gnuwin32.sourceforge.net/packages/patch.htm
• Complete package, except sources 507917 2 May 2006

I ran the program and then typed in
patch -p0 < 32bit.patch
and then hit enter. It didn't tell me anything happened.

Am I suppose to get a message saying "patch sucessful?"

Posted: Sat May 20, 2006 11:50 am
by hybrid
You should add the --binary parameter as stated on my page and in the previous post (it won't work without!)
And you will probably want to use -p1 instead of -p0 because the main directory is often differently named. So change into yur source/Irrlicht directory an issue the command 'patch -p1 --binary <32bit.patch'. There should be some output indeed.

Posted: Sat May 20, 2006 5:36 pm
by Wolf Dreamer
Does anyone else have trouble getting this particular patch to work?
http://parsys.informatik.uni-oldenburg. ... 2bit.patch

I did everything exactly as instructed, and it doesn't give me any response.

I entered in patch -p1 --binary <32bit.patch and still nothing.

Not a single file has been changed. And they are clearly in that directory.

Someone please try this and tell me if it works for you.

I'm using Windows XP. Is there something that it must access that might've been turned off in the past?

----
Since it says
diff -Nauwr Irrlicht/CAnimatedMeshMD2.cpp Irrlicht/CAnimatedMeshMD2.cpp
I moved the patch program to the H:\irrlicht-1.0\source directory and tried again. Still nothing.

Had it in H:\irrlicht-1.0\source\Irrlicht before.

Posted: Sat May 20, 2006 5:58 pm
by Wolf Dreamer
I have an idea.

Can someone just look at their finished patched file, and copy and paste it here please? I'll then copy it over whats there already, and the world will be a happy place once more.

I believe i just need the files listed in here to gain the ability to load up graphic files of any size.
http://parsys.informatik.uni-oldenburg. ... 2bit.patch

Posted: Sun May 21, 2006 12:08 am
by hybrid
I have uploaded a source version with my3d patches, planarMapping patch and 32bit patch to
http://parsys.informatik.uni-oldenburg. ... _32bit.zip
Did not test it, though.

finally,the tool I need to achieve my ultimate goal.. I hope

Posted: Sun May 21, 2006 2:03 am
by Wolf Dreamer
It compiled! Thanks a lot.
------ Build started: Project: Irrlicht, Configuration: Debug Win32 ------

Compiling...
Irrlicht.cpp
CAnimatedMeshMS3D.cpp
CAnimatedMeshMS3D.cpp(419) : warning C4018: '<' : signed/unsigned mismatch
CAnimatedMeshMS3D.cpp(442) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(442) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(442) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(444) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(467) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(467) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(467) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(468) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(472) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(472) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(472) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(473) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(475) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(476) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(478) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(479) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(481) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMS3D.cpp(482) : warning C4288: nonstandard extension used : 'i' : loop control variable declared in the for-loop is used outside the for-loop scope; it conflicts with the declaration in the outer scope
CAnimatedMeshMS3D.cpp(120) : definition of 'i' used
CAnimatedMeshMS3D.cpp(403) : definition of 'i' ignored
CAnimatedMeshMD2.cpp
Compiling...
CGUIButton.cpp
Generating Code...
Linking...

Build log was saved at "file://h:\irrlicht-1.0\source\Debug\BuildLog.htm"
Irrlicht - 0 error(s), 19 warning(s)


---------------------- Done ----------------------

Build: 1 succeeded, 0 failed, 0 skipped
Some warnings, but no errors. Good enough.

I wonder why I'm the only one that had problems. Obviously my computer is possessed by evil spirits. :twisted:

Now whats wrong? Arg!

Posted: Sun May 21, 2006 3:00 am
by Wolf Dreamer
So I built a new Irrlicht.dll, and put it in the windows/system32 directory.

I rebuild the meshviewer example, but when I try to load up a large .obj file, I still get the same error about it having more than 65535 triangles.

Anyone got any ideas? I assume some of you can load up files larger than 65535 polygons/triangles/whatever. Can you use the meshviewer example to do that?

Posted: Sun May 21, 2006 7:01 pm
by hybrid
There is a setting in NullDriver.cpp which limits the number of primitives drawn. Change it to something very large and recompile.

all 65535 replaced with 100000000

Posted: Sun May 21, 2006 8:41 pm
by Wolf Dreamer
Tried that, same error.

Used the find and replace thing to locate more than 30 places which had 65535 in it, and replace those with 100000000.

After compiling it, I stick the irrlicht.dll in windows\system32\ and then rebuild the meshviewer. Nowhere in the meshviewer is the number 65535 found by the way.

When I run meshviewer.exe, it loads up the default dwarf.x just fine. I then try to open a large .obj file, and I get the same old error, about it not being able to go past 65535 triangles.

Does Meshviewer load large files for you? Please try it out and tell me.