[Tutorial] Getting started on Mac OS X

A forum to store posts deemed exceptionally wise and useful
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Zathras? You do not have to care for the mtl file if your obj file uses it. It will be loaded automatically. If it does not use the mtl file, manually writing it will be probably too tedious. Reexport the mesh with different settings instead.
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

I tried Tutorial 1 again, and tweaked it to make sure it loaded the md2 file, used opengl, and such. Thing is, As soon as I texture the model, it disappears, well not really, as some black pixels appear in the top-left corner. Without textures it works fine.

Any ideas?
hAlp!?
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

hybrid wrote:Zathras? You do not have to care for the mtl file if your obj file uses it. It will be loaded automatically. If it does not use the mtl file, manually writing it will be probably too tedious. Reexport the mesh with different settings instead.
Will try!
hAlp!?
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Just curious, but why do Carbon, Cocca, and all those frameworks have to be included? (I am new to Mac OS X programming)

Also, is it possible to set my own icon up to display in the dock? If so, how?
TheQuestion = 2B || !2B
utNero
Posts: 14
Joined: Tue Apr 10, 2007 1:13 am

Post by utNero »

Hi,

Just out of curiosity, has anyone been able to load md2 models, including texture, in Irrlicht on Mac OS X? From reading the forums and from running the latest version (1.4) as well as the current SVN trunk, I am getting the impression that this is not currently possible. Here is what I am doing and what I am seeing:

1) Compile latest Irrlicht (as of 12/25/07) using XCode 3.0 on Leopard
2) Start the MeshViewer example (incidentally, I have to do this from Terminal as the "Go" action from XCode does not allow me to select the driver).
3) Load sydney.md2

At this point, I see a completely white silhouette of the model dancing around, against the skybox backdrop.

4) Load sydney.bmp

The silhouette disappears and is instead replaced by an enormous copy of the model probably doing the same motions (though it's hard to see at that scale) and textured like some parts of the background image (sandy mountain-colored).

This behavior is consistent with our own code, where the first copy of sydney we load becomes huge (interestingly, it is still occluded and stops displaying when the intended scale's bounding box moves out of camera view, so Irrlicht *thinks* the model is normal size, but the graphics displayed are huge).

My hardware is just a standard MacBook Pro Intel Duo of about a year ago, with an install of Mac OS X Leopard on it. The symptoms are exactly the same on an Intel iMac (running Tiger).
Nancy
Posts: 1
Joined: Tue Feb 26, 2008 8:49 pm

it's not working in new versions...

Post by Nancy »

Hi,

I am a new programmer and new to Irrlicht as well. I am using Mac10.4.11, and Xcode2.5 and Irrlicht 1.4
I have followed osxus3r's tutorial on how to get Xcode started, but i got the following problem.

I don't have the libMacOSX.a file, i used the libIrrlichtMac.a instead, but it doesn't work. I got the following error message when I tried to build and run:


Building target “Test1_1” of project “Test1” with configuration “Release”


Checking Dependencies
Ld /Users/YANGQI/Documents/FYP/C++/Test1/build/Release/Test1_1.app/Contents/MacOS/Test1_1 normal ppc
cd /Users/YANGQI/Documents/FYP/C++/Test1
/Developer/usr/bin/g++-4.0 -o /Users/YANGQI/Documents/FYP/C++/Test1/build/Release/Test1_1.app/Contents/MacOS/Test1_1 -L/Users/YANGQI/Documents/FYP/C++/Test1/build/Release -L/Users/YANGQI/Documents/FYP/C++/Test1 -L/Users/YANGQI/Documents/FYP/C++/Test1 -F/Users/YANGQI/Documents/FYP/C++/Test1/build/Release -filelist /Users/YANGQI/Documents/FYP/C++/Test1/build/Test1.build/Release/Test1_1.build/Objects-normal/ppc/Test1_1.LinkFileList -lIrrlicht -framework OpenGL -framework Cocoa -framework Carbon -framework AppKit -lMacOSX -arch ppc -Wl,-Y,1455 -mmacosx-version-min=10.4 -framework Carbon -isysroot /Developer/SDKs/MacOSX10.4u.sdk
/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: archive: /Users/YANGQI/Documents/FYP/C++/Test1/libIrrlicht.a has no table of contents, add one with ranlib(1) (can't load from it)
collect2: ld returned 1 exit status
Can anybody tell me how can I fix the error?
Thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to call 'ranlib libIrrlichtMac.a' or create the .a file with -s (something like 'ar r -s ...' (try man ar)
Namek Kural
Posts: 81
Joined: Sun Sep 09, 2007 7:01 pm
Location: BW, Germany

Post by Namek Kural »

Hi there,

At linking, the compiler gives me this:

Code: Select all

ld: duplicate symbol irr::gui::CGUITexturedSkin::setSpriteBank(irr::gui::IGUISpriteBank*) in /Users/jonathan/Development/Projects/Demo1/build/Demo1.build/Release/Demo1.build/Objects-normal/i386/CGUITexturedSkin.o and /Users/jonathan/Development/Projects/Demo1/build/Demo1.build/Release/Demo1.build/Objects-normal/i386/main.o
The error includes everything that has anything to do with CGUITexturedSkin an CGUITextBox, two extensions I use.

Please, could anyone explain to me what duplicate symbol means?
I use Leopard 10.5.2 and irrlicht 1.4

I compiled this project on windows, where everything went fine. I want to port this project to mac.

Please help :(
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Seems like the headers don't have the double inclusion protection (the ifdef check at the beginning) or you include the cpps somewhere.
Namek Kural
Posts: 81
Joined: Sun Sep 09, 2007 7:01 pm
Location: BW, Germany

Post by Namek Kural »

Here are the two ifdef checks:

#ifndef C_GUI_TEXTURED_SKIN_H
#define C_GUI_TEXTURED_SKIN_H

#ifndef ___CGUITEXTBOX_H
#define ___CGUITEXTBOX_H

Are these correct?
Namek Kural
Posts: 81
Joined: Sun Sep 09, 2007 7:01 pm
Location: BW, Germany

Post by Namek Kural »

Thank you, what I did was to include the cpp files. I didn't know I shouldn't do that :)
Smoo
Posts: 4
Joined: Fri Aug 08, 2008 1:22 pm

Getting a blank gray screen

Post by Smoo »

Hi everyone,

I've gone through Zathras' tutorial as well as tutorial 1 and I'm experiencing a gray screen. My application builds without any problems and when I check the console I can see that I'm loading the model and texture for Sydney successfully.

After compiling Irrlicht I got libIrrlicht.a rather than libMacOSX.a. Is this just what's happening now and Zathras' tutorial is a bit outdated in that regard?

Also, in this pragma comment:

#pragma comment(lib, "Irrlicht.lib")

Where's Irrlicht.lib? Should this refer to the libIrrlicht.a that I built?

Thanks in advance for the guidance. I'm excited to be able to build the tutorials successfully so I can begin the daunting task of polishing my C++ skills and getting into game programming. Thanks! :D
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The libIrrlicht.a sounds reasonable, because that's the name everywehre else, too. The prgama is usually ignored on non-Windows systems, and is also sometimes ifdef'ed to be silently ignored. The location of your library should be set in the XCode project file (or in your makefile if you want ot create X11 based applications).
Smoo
Posts: 4
Joined: Fri Aug 08, 2008 1:22 pm

Post by Smoo »

Thanks for the reply. My SDK path is set, but I get the gray screen regardless. Any other ideas?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Are you using the 1.4 OSX SDK? There are precompiled binaries (IIRC), try those first. Do you use the latest XCode to build Irrlicht, former versions had some problems (usually compiles erros, though). Try starting the app from the command line, or by double-clicking, I think there were differences. If all fails, you can go to Irrlicht's IRC channel and ask Varmint, our OSX maintainer. I'm not sure if PM'ing him will be fast enough (say, I don't know how often he visits the forum).
Post Reply