Book Image

Irrlicht 1.7 Realtime 3D Engine Beginner's Guide

By : Johannes Stein, Aung Sithu Kyaw
Book Image

Irrlicht 1.7 Realtime 3D Engine Beginner's Guide

By: Johannes Stein, Aung Sithu Kyaw

Overview of this book

<p>The Irrlicht Engine is a cross-platform high-performance real-time 3D engine written in C++. It features a powerful high-level API for creating complete 3D and 2D applications such as games or scientific visualizations.<br /><br />Irrlicht 1.7 Realtime 3D Engine Beginner's Guide will teach you to master all that is required to create 2D and 3D applications using Irrlicht, beginning right from installation and proceeding step-by-step to deployment.<br /><br />Beginning with installation, this book guides you through creating a basic template application, followed by meshes, overlays, and UI. You will then scan through data types, nodes, scenes, camera, lights, and particle systems. Finally, you will learn about some advanced concepts such as handling data, files, and shaders, followed by the last stage – deployment.</p>
Table of Contents (21 chapters)
Irrlicht 1.7 Realtime 3D Engine
Credits
About the Authors
Acknowledgement
About the Reviewer
www.PacktPub.com
Preface

Deploying for Mac OS X platforms


If you have some experience with Mac OS X you probably already know that Mac OS X application with its *.app file extension are basically just folders. If you right-click on these application bundles and select Open Contents you can view what exactly is in one application bundle:

Any application is more or less structured like this example. Info.plist is basically an XML file that contains information about the application itself such as its name, its version, its icon, the company name, and language.

PkgInfo is a simple text file where the first four characters are APPL and the last four characters the abbreviation of your application. If no application abbreviation has been specified, the second half of the file are just question marks. When using the Xcode IDE, this file will be automatically updated if the key CFBundleSignature in Info.plist has been changed.

If you are familiar with Objective-C and Cocoa development, you might already know what *.nib files are: These files are usually created by the Xcode form designer and contain the visual components of Cocoa applications such as an application form with buttons, input boxes, or similar user input fields. In the case of an Irrlicht application, and as the name already suggests, this nib-file consists of just the main menu.

If you compiled your Irrlicht application with Xcode, the IDE takes care of keeping the application bundle up to date. Just make sure your assets such as models, icons or graphics are listed Copy Bundle Resources. If this is not the case, your application won't display your assets:

Creating universal applications and compatibility

By default, applications are compiled for the current version of the operating system. Getting this executable to work on other versions might be a hassle: While running a Leopard-compiled application on Snow Leopard is usually not an issue, it can be the other way round. To ensure that the compiled application runs on earlier versions of Mac OS X you need to do two things. First of all an earlier version of the Mac OS X SDK needs to be installed on the hard drive which you have as an option when installing Xcode. Then, open the project settings, go to the Build tab and set Base SDK to the SDK you want, for example, Mac OS X 10.4 SDK.

Since 2005, Apple computers ship with an Intel processor, before that every Mac since 1994 had a Motorola or IBM PowerPC processor. Even though Intel Macs dominate nowadays, there are still a number of PowerPC Mac users out there. To make sure PowerPC Macs can run your applications you need to create a PowerPC executable. Apple has introduced the concept of universal applications, which is basically one executable that contains executables for different architectures. To set a universal application up, go to the project settings and look for the item Architectures under the Build tab. This field takes one or more of the following values:

  • ppc (For 32-bit PowerPC Macs such as PowerMac G4, iBook, etc.)

  • ppc64 (For 64-bit PowerPC Mac such as PowerMac G5)

  • i386 (For 32-bit Intel Macs with a Core Duo, Core 2 Duo, i3, i5, i7 or Xeon processor)

  • x86_64 (For 64-bit Intel Macs with a Core 2 Duo, i3, i5, i7 or Xeon processor)

Depending on which values you picked, the resulting executable contains the binary code for those architectures. If you are working on a PowerPC Mac, you cannot compile Intel binaries.

If you plan to release your application for the Mac App Store, you have to keep in mind that universal binaries containing a PowerPC executable are not allowed, only Intel Mac-compatible applications (32-bit, 64-bit or both) will get approved.