It runs on Mac OS X!

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
SwiftCoder

It runs on Mac OS X!

Post by SwiftCoder »

Hi,

Well, like the subject says, IrrLicht compiles and runs on Mac OS X using the OpenGL Renderer and the SDL Device, with only minimal changes to the SDL Device code.

The engine performed well beyond my expectations with the custom scene node and Hello World examples.

However, OS X is Big Endian, so none of the loaders work, not even the jpeg loader, and the Texture codes conversions of textures also cause the engine to crash.

Any chance of IrrLicht being made Endian-Aware in the future?
(I endianized the MD2 Loader allready, fifteen additional lines of code, and no performance hit on little-endian systems).
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Cool :)
I planned a layer over the IReadFile interface for doing this, yes. But I'm not going to implement it the near future.
tstuefe
Posts: 40
Joined: Wed Jan 07, 2004 12:53 pm
Location: Heidelberg, Germany
Contact:

Post by tstuefe »

This is really good news. Out of curiosity, what compiler/IDE did you use?
SwiftCoder

Post by SwiftCoder »

I just used Apple's XCode IDE, which uses gcc 3.3 as the compiler, and comes free with every copy of OS X.
The only changes I had to make to the SDL Device were to fix compatibility with IrrLicht (apparently a couple of interfaces changed since it was released. The only caveat is that it seems that you must #include SDL.h in the main.cpp file when using the SDL Device.
Not to tell you how to do your coding, but wouldn't it be much easier to hand the image loading off to an image library such as Devil.SourceForge.net which would handle Endianess by itself?
SwiftCoder

Post by SwiftCoder »

Niko: How do you plan to use a class like IReadFile to perform endian-specific bit-swapping? IReadFile only performs the reading/writing of lengths of bytes, and bit-swapping has to be performed on a particular types. The usual way to handle endianess is to go through after reading the data into internal structures, and swap each int, float, double, before performing any further operations.
Sorry if I am preaching to the choir, but the only way I see to do this is in the individual loaders.
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

It would be interesting to handle the loading of files via another library, but one of the main goals of Irrlicht is to not have dependencies on any other libraries. If it is something that is possible (legally and code-illy) to integrate, Niko looks into it to see how it would fit the Irrlicht flow.

It may seem strange, but I ever since I've started C++ programming, I'm amazed at how many includes I need to put in to get something to work. One of the XML/XPath libraries I use, libxml, requires IConv, which requires zlib. This is tame compared to one that I found that ended up stringing out 6 requirements in length and 4 wide on some levels of the tree.
X-requires->Y-requires->Z-requiries->A-requires->ETC
Crud, how do I do this again?
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

that is one good thing about irrlicht, it keeps the includes under control
one package has all of the files you need there is no worrying about if you got all of the needed libraries
SanchezTheLlama

Post by SanchezTheLlama »

Hey could you send me the code you got to compile? Our game is using Irrlicht and I need to get a little bit running on OSX. halogenius@sbcglobal.net


Cheers,
CJ
SwiftCoder
Posts: 32
Joined: Thu Jan 15, 2004 7:33 pm
Location: Carribean

Post by SwiftCoder »

SanchezTheLlama wrote:Hey could you send me the code you got to compile? Our game is using Irrlicht and I need to get a little bit running on OSX. halogenius@sbcglobal.net
If you wan't I will email them to you, but so far the only loader I have modified to run on OS X is the MD2 loader (and no image loaders either, so no textures).
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

SwiftCoder wrote:Niko: How do you plan to use a class like IReadFile to perform endian-specific bit-swapping?[/color]
That's why I said I'll use a layer over IReadFile. An interface, which provides methods like ::reads32, ::readf64 and so on.
YSoVgM1w0lomriqTKYrx8Q==

Post by YSoVgM1w0lomriqTKYrx8Q== »

SwiftCoder wrote:
SanchezTheLlama wrote:Hey could you send me the code you got to compile? Our game is using Irrlicht and I need to get a little bit running on OSX. halogenius@sbcglobal.net
If you wan't I will email them to you, but so far the only loader I have modified to run on OS X is the MD2 loader (and no image loaders either, so no textures).
Ya I'd love it. Halogenius@sbcglobal.net
SwiftCoder
Posts: 32
Joined: Thu Jan 15, 2004 7:33 pm
Location: Carribean

Post by SwiftCoder »

Opps, I was busy trying to make colors work, and I seem to have broken the engine, about a zillion compiler errors, give me a couple of days to backtrack through and fix it.
Guest

Post by Guest »

pls send it to me too! Brainac[AT]gmx.de
xhrit
Posts: 140
Joined: Mon Jun 14, 2004 8:54 am
Location: earth
Contact:

...

Post by xhrit »

you can send it to me at :

luke at xhrit dot com
Core2Duo E8400 3.0ghz - 2048mb DDR2 800 - geForce 9600 - Slackware12.1

Word-image-symbol programming limits, controls, and imprisons the individual.
Smash the control images, smash the control machine.
Post Reply