Topic: MacOS X support

I assume that the wrapper doesn't support MacOS X. I'm currently having Irrlicht running on MacOS X using Xcode and on Windows using Dev-C++. Being able to develop in BlitzMax for both platforms simultaneously woulde be so much nicer. Any idea how hard it would be?

Irrlicht 1.1 doesn't compile on MacOS X (unless you download it from SVN). Besides that there is also no DLL on OSX (i.e. framework), the "libMacOSX.a" is compiled directly into the app. I'm not sure how much of a problem that is in BMX. I'm ready to help out.

Re: MacOS X support

greetings jonas smile  any and all help is much appreciated.  i wont be able to get to trying it out again until after i get the 1.1 compatible mods released (looks like i might be on target for late wednesday night).  as for assistance, i need a libIrrlicht.a for Mac OSX and Mac Intel OSX.  the caveat is the compiler used to build them needs to be GCC3.3 in order for BMAX to be able to link in the binary (at least thats the theory anyways).  i have a mac intel, but i couldnt get the GCC 3.3 compiler to work in xcode.

Re: MacOS X support

gman wrote:

greetings jonas smile  any and all help is much appreciated.  i wont be able to get to trying it out again until after i get the 1.1 compatible mods released (looks like i might be on target for late wednesday night).  as for assistance, i need a libIrrlicht.a for Mac OSX and Mac Intel OSX.  the caveat is the compiler used to build them needs to be GCC3.3 in order for BMAX to be able to link in the binary (at least thats the theory anyways).  i have a mac intel, but i couldnt get the GCC 3.3 compiler to work in xcode.

I can take a swing at compiling a MacOS X universal binary. I have just downloaded the latest rev from svn. However I'm under the impression that universal bins require GCC 4.0. Also, in Xcode 2.4 it seems like you can't select any other version!

Re: MacOS X support

heres a question...  can MacOSX build a dynlib and does LoadLibrary work on MacOSX?  it might be easier to dynamically link.

Re: MacOS X support

gman wrote:

heres a question...  can MacOSX build a dynlib and does LoadLibrary work on MacOSX?  it might be easier to dynamically link.

The proper way to implement Irrlicht on OSX is to compile it as a Framework. For some reason the devel team went with a Static Library. You can change "Mach-O Type" to Dynamic Library. It is linked at build time and loaded automatically when needed.

However, there are a number of odd things with Irrlicht for OSX. First, it is not just a library, it includes Cocoa classes that implement a skeleton application. Second, you need the MainMenu.nib, which is related to those classes. I love Irrlicht, but would have preferred a much cleaner design here. I don't want to have to recompile the Irrlicht lib (which takes forever) whenever I have to change something that logically belongs to my app.

Re: MacOS X support

It is linked at build time

that is via a ".a" file correct?  Windows has a loadlibrary function that bypasses the need for a ".a" file for a DLL.  does MacOSX have anything similar?  if so, we could build a dynlib and forego the need for linking at all.  i can then bind to the functions at runtime.  this would hopefully avert any linking issues between BMAX and the lib.

i think the cocoa stuff is for the windowing system.

Re: MacOS X support

gman wrote:

that is via a ".a" file correct?  Windows has a loadlibrary function that bypasses the need for a ".a" file for a DLL.  does MacOSX have anything similar?

I would say that what you are looking for is a Framework. You don't need any ".a" file if you link to a Framework. SDL for OSX was implemented that way. However, compiling Irrlicht as a Frameowork seems to require some major refactoring.

gman wrote:

i think the cocoa stuff is for the windowing system.

Yes, it is for window, menus etc. I would have preferred to have that as stand-alone code in a template Xcode project. Perhaps, there is a reason for this, but I fail to see it.

Re: MacOS X support

greetings jonasled smile  by chance do you have a ".a" universal file that i can try out?  i tried compiling the 1.1 source direct and it came up with errors.

Re: MacOS X support

gman wrote:

greetings jonasled smile  by chance do you have a ".a" universal file that i can try out?  i tried compiling the 1.1 source direct and it came up with errors.

Sure, I have checked out and compiled Irrlicht 1.1 SVN revision 200. The 1.1 SDK doesn't compile on MacOS X. However, it is no good. I can't get any of my 3D models (.x, .b3d, .3ds) to load properly on my PPC. There is a lot of endian issues left in 1.1. Unfortunately not very many people seems to care about PPC nowadays. I can't release a game that only runs on Intel. Too many PPC Macs still out there.

This is the download link (it should be universal, but I don't have any Intel Mac to test on)

http://www.aescapia.com/download/libIrrlicht.a.zip

Jonas

Re: MacOS X support

well i have some really fantastic news to report and some really crappy news to report. 

i have successfully compiled and ran the HelloWorld Irrlicht sample on my Intel Mac Mini.  that is simply fantastic. 

the bad news is that is the only example i could get to run and even then the texture did not work...  that is really, really crappy.  some of the things that were causing crashes i know how to fix.  essentially anywhere a wchar was used it crashed.  thats easy.  many of the other crashes were on direct calls to Irrlicht.  now its entirely possible that the Irrlicht interface has changed enough between straight Irrlicht v1.1 that the mod was built on and the version jonasled had to compile.  if the interfaces are different even slightly, crashes will occur.

@jonasled - thank you very much.  i would like to rely upon you to compile v1.2 when it comes out if you are willing?  also, how many of the demos have you successfully run?

i will work out as many kinks as i can in the meantime...

11 (edited by jonasled 2006-09-15 16:18:33)

Re: MacOS X support

gman wrote:

@jonasled - thank you very much.  i would like to rely upon you to compile v1.2 when it comes out if you are willing?  also, how many of the demos have you successfully run?

You can count on me to do that. I have downloaded SVN revision 202. It reportedly has solved a lot of endian issues, but in my tests .b3d loader still crashes, many .x files doesn't load at all and .3ds files are loaded and also displayed incorrectly. I love the Irrlicht engine, but the Mac PPC support is very poor at the moment. I check revisions out daily. The devel team is very active, so I expect things to improve soon. I will post new builds in this thread if it seems like they improve Mac support in any way.

This and also the above link now points to 1.1 revision 202:

http://www.aescapia.com/download/libIrrlicht.a.zip

EDIT: I compiled SpecialFX today using revision 205. It runs just fine. Have not tested the others lately.

Jonas

Re: MacOS X support

I have downloaded your wrapper for 1.1. Interestingly I get mostly the same problems as on Mac. I made one discovery. The .ms3d format seems to work best. Unfortunately there is still endian issues with that loader on PPC Macs, so it doesn't solve my problem. I'm not sure I can recommend 1.1 yet. It still seems to be work in progress on both Mac and Win.

Great work by the way, with the wrapper. BlitzMax is a productivity tool and with Irrlicht it is getting even better.

Re: MacOS X support

i would agree.  the loaders have been significantly changed and are really in sad shape in v1.1.  there are confirmed problems with both OBJ and 3DS formats.  with all the fixes, i think v1.1 has more problems than v1.0 did.  looking forward to v1.2.

on a side note, the problems you mentioned...  are they crashes or just problems with the engine iteself?  i would like to investigate any crashes as they may be related to the redesign of the mod.

Re: MacOS X support

gman wrote:

on a side note, the problems you mentioned...  are they crashes or just problems with the engine iteself?  i would like to investigate any crashes as they may be related to the redesign of the mod.

Some .b3d models that I loaded crashes (memory exception). The one that loaded had the textures all wrong. I also think there is some issue when creating an FPS camera. When I supply arguments to that function (speed etc.) I get an error message at compile-time that I suspect has to do with the mod.

The other issues are not crashes. I'm rather sure it is Irrlicht 1.1. The models either just doesn't load at all or they load incorrectly. As you mention there are lots of bug reports about all of this in the Irrlicht forums. I don't mind that they release quickly so that we can help them find the bugs, but it is too soon to release 1.1 as final. All in all, 1.1 is still better than 1.0.

I'm coding the scenario editor for my CRPG (Darkwynd) in BlitzMax, now using your Irrlicht mod, so I can send more feedback as or if I encounter any issues. wink

Re: MacOS X support

jonasled wrote:

Some .b3d models that I loaded crashes (memory exception). The one that loaded had the textures all wrong.

Luke gave us a heads up (which im sure you probably read) that there are problems in 1.1 with the B3D loader.  sounds like he has most of them worked out though for the next version.  very cool stuff and a big thank you to Luke smile

jonasled wrote:

I also think there is some issue when creating an FPS camera. When I supply arguments to that function (speed etc.) I get an error message at compile-time that I suspect has to do with the mod.

what params were you passing?

jonasled wrote:

The other issues are not crashes.  I'm rather sure it is Irrlicht 1.1.

groovy smile

jonasled wrote:

I'm coding the scenario editor for my CRPG (Darkwynd) in BlitzMax, now using your Irrlicht mod, so I can send more feedback as or if I encounter any issues. wink

thats excellent!  please do send me any feedback.  i want the Irrlicht mod to be the best it can be smile

thank you again for all your help it is very much appreciated smile

Re: MacOS X support

gman wrote:

Luke gave us a heads up (which im sure you probably read) that there are problems in 1.1 with the B3D loader.  sounds like he has most of them worked out though for the next version.

Sweet!

gman wrote:

what params were you passing?

I'm passing parent, rotationSpeed and moveSpeed. Looks like this in C++

smgr->addCameraSceneNodeFPS(0, 100.0f, 300.0f);