Homework 1

Short Description:

Establish your OpenGL programming environment.

This assignment is worth 5 points.

Goals

When you finish this homework, you should

Formal Description

Set up your OpenGL environment for this class. I plan on using the following packages

Set up your environment

If you wish, you should be able to work in the lab on the linux machines. I believe that they have all libraries required for this class. If something is missing, please let me know and I will have Chris fix it.

If you wish to work on your machine, you will need to install the proper graphics drivers, as well as the glew and glut packages.

On Mirkwood (my linux box) I needed to

yum install glew-devel freeglut-devel 
You may need to do other things as well. Your author has provided some guidance on his web page.

Please be advised that I will be testing your program on my linux machine, mirkwood, and they must compile and execute in this environment. You should use a linux machine in the lab to assure your code will compile and run.

In any case, you should establish your OpenGL programming environment.

Compile and Run square.cpp

The book contains a number of example programs. It is expected that you will compile and play with these programs. I will make sure that these programs compile in the local environment for each chapter as we begin that chapter. I have done this for chapter 2. The programs are located in ~dbennett/360/book/

For this homework, copy the file square.cpp from ~dbennett/360/book/ch2. (Do this with the command cp ~dbennett/360/book/ch2/square.cpp . .)

Modify this code as follows

Your final program should produce a screen that resembles this:

You should create a Makefile which will compile this program. This file should be called Makefile and contain the following lines:

LDLIBS = -lGL -lglut -lGLEW
OBJS = square

all: ${OBJS}

clean:
	rm *.o ${OBJS}
NOTE: the last line must begin with a tab.

Submission

You should email tar file as an attachment to a message to danbennett360@gmail.com. This tar file should contain all of the source code required to generate your project, a Makefile, and the README file.

The tar file should not contain object code or executable. Clean the directory BEFORE you make the tar file.

To create a tar file, you should place all of the files you want to submit into a single directory, for example hw1. One level above this directory type the command:

tar cvzf hw1.tgz hw1
This will create the file hw1.tgz in the current working directory. To check the contents of this file, type :
tar tzf hw1.tgz
To extract the contents of this file, type:
tar xvzf hw1.tgz

Tar is the Tape Ar hive utility for unix. This utility was originally intended to copy a file system to the tape device, but has now become a standard for distributing source code.