SDLTextureLoad README

This program will be one of the first programs to accompany the book. It displays a texture map of a star field in a window. Press any key on the keyboard or close the window to quit the program.

I have been able to compile the Mac OS X version of the code using Xcode and the Windows version using CodeWarrior. 


NOTE FOR LINUX AND WINDOWS USERS

The code assumes the texture file, Background.png, resides in the current working directory. Placing the texture file in the same directory as the executable file should work.


KNOWN ISSUES

The code does not handle errors gracefully. It exits the programs when problems occur, such as NULL pointers and being unable to load the file.


WHAT YOU NEED TO DO TO COMPILE THE CODE

This program makes use of the SDL and SDL_image libraries. You must download these libraries from the SDL (http://www.libsdl.org) and SDL_image (http://www.libsdl.org/projects/SDL_image) sites and install them on your computer.

Once you install the SDL and SDL_image libraries, you can open your development environment and compile the code. For your code to compile, it will have to link against the OpenGL, GLU, SDL, and SDL_image libraries.

MAC OS X USERS

Your code must link against the OpenGL, SDL, and SDL_image frameworks. The OpenGL framework contains both the OpenGL and GLU libraries. If you're using Xcode, you should also add the texture file Background.png to your project. Doing so enables Xcode to copy the texture file to your program's application bundle.

WINDOWS USERS

You need to have the Win32 SDK installed on your computer. The Win32 SDK contains the OpenGL (opengl32.lib) and GLU libraries (glu32.lib). If you're using Visual C++ 2005 Express, the Win32 SDK does not get installed with Visual C++. You have to perform a separate installation of the Platform SDK to install the Win32 SDK.


If you have any questions or comments, feel free to email me.

Mark Szymczyk
mark@meandmark.com



