Compiling code from my books for Mac OS X (Intel only)

You need to download and install following libraries - zlib, libpng and jpeglib.

Unarchive these files (using commad tar zxvf archieve-name). Also you need to download fixed makesfiles makefile's for these libraries.

Create following folders b>man1, man3 and man5 in /usr/local/man (for this you'll should use sudo mkdir).

For installing zlib enter it's folder, copy makefile from makefiles.tgz and execute following commands -

make
make test
sudo make install

Next step will be installing libpng. After enetering it's folder and copying makefile execute following commands:

make
sudo make install
sudo make install-headers
sudo make install-shared
sudo make install-man
make test

Last step is installing jpeglib. Just enter its folder, copy makefile and execute commands :

./configure
make
make test
sudo make install
sudo make install-lib
sudo ranlib /usr/local/lib/libjpeg.a

After all this libraries will be installed into /usr/local download fixed code and shaders ( code for Development and Debugging of Shaders), create Code folder and place book's source code into it.

After you unarchieve source code in the Code folder you will get code grouped by chapters (Chaper-NN) and folders with used libraries.

Inside each folder Chapter-NN there is a Makefile.macosx files, which should be used for building all examples for corresponding chapter.

To build code for some chapter execute in it's folder the following command:

make -f Makefile.macosx

Here you can download minimal set of textures.

Minimal set of models with their textures can be downloaded here.

Each archieve is about 2Mb in size.

Valid HTML 4.01 Transitional

Напиши мне