Skip to content
Snippets Groups Projects
README 2.92 KiB
Newer Older
README FROM CHRIS SUMMA:

I have modified Dr. Angel's code in such a way that the same program should be compilable on either MacOS, Windows, or Linux.  I've also put all this under the control of CMake, a meta-build system that checks your environment and automatically builds your makefiles.  Here's what to do after you've installed CMake on your system:

1) make a subdirectory of graphics_angel called "build"

    mkdir build

2) cd into that directory

    cd build

3) execute CMake using the CMakfiles.txt one level below

    cmake ..

4) fix any errors or install any missing libraries

5) from within the build subdirectory issue issue the make command

    make

6) this should build your binaries and put them in graphics_angel/bin

7) add that bin diretory to your path

    export PATH=$PATH:/path/to/where/it/lives/graphics_angel/bin

8) set the environment variable ANGELDIR to point to graphics_angel

    i.e. in your .bash_profile in your home directory add the line

    export ANGELDIR=/path/to/where/it/lives/graphics_angel


SYSTEMS:

	OSX:  Should work just fine as long as XCode has been installed

	LINUX:  Should work just fine but you'll have to install extra packages.		On Ubuntu:

		sudo apt-get install freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev cmake libxmu-dev libxi-dev

		sudo yum install cmake freeglut freeglut-devel glew glew-devel mesa-libGLU mesa-libGLU-devel glx-utils libXmu libXmu-devel libXi libXi-devel


	Windoze:  Working on testing native Windoze.  I can, however, confirm that this works in a VMWare virtualized Ubuntu or Centos distribuion on Mac and Windoze.
Christopher M Summa's avatar
Christopher M Summa committed
The code in these directories is organized by chapters. There is a REAME in directory that describes the examples. All are examples from the text and include many eexamples that are not in Appendix A. Readers of previous editions will notice that most of the examples are reworked examples from the fifth edition to be compatible with OpenGL 3.1. The old code is on this website and makes an interesting comparison.

The Common directory has only the InitShader source code.

The Include directory has the usual OpenGL includes under the GL subdirectory. Note you will only need the freeglut includes if you use freeglut instead of glut. This directory has the Angel.h header files which will do most of the includes for you, assuming that you are using freeglut. It will include the vector and matrix classes in vec.h and mat.h. Note the examples all use Angel.h and the related namespace directive.

The libraries in the lib directory are for use with Windows under cygwin. We tested all the examples on cygwin (linux under Windows). The way freeglut is setup can require the its lib file to be in the same directory as the application. More on this later. 

I plan to add subdirectories under each Chapter for webgl and Mac versions of the code.