Intro Graphics Assignment 1

OpenGL Warmup
Due: 31 August, 2006 by 11:59:59 p.m.


Overview

This assignment will be a gentle introduction to graphics programming. You will use some very basic features of the OpenGL API, as well as some simple interaction to control what is being drawn on the screen.

Your application will draw a single square in the center of a window, and the user should be able to reposition, resize, and rotate this square. Also, you should be able to toggle the look of the square.

Required Features

Getting Started

To help you get started, and to help avoid some of the pain of setting up a window, we have provided some skeleton code and a sample solution. Building the skeleton code will require you to have OpenGL and GLUT on your system. You should already have OpenGL; GLUT is available for a variety of operating systems in binary and source distributions, just search google.

You will also need to download the DevIL libraries from SourceForge. These libraries will be used in future assignments as well.

To get started, open the square.cpp file and look for the empty Square methods at the bottom of the file. The best way to begin is to print out debugging messages in each of these methods, and interact with the blank window, so you can figure out when each is called and what their arguments are.

You can download the skeleton code here.

Using the solution

To move the square, click and drag in its interior.

To scale it, click and drag one of its edges.

To rotate it, click and drag one of its corners.

To toggle the appearance of the square, press 't'.

To quit the application, press ESCAPE.

Sample solutions (get the texture bitmap here):

Visual Studio issues

If you are having problems getting the libraries working in Visual Studio, you can download this file for Visual Studio.NET, which is a self-contained and pre-configured workspace that compiles the skeleton code.  Go to the hw1 directory and double click hw1.sln. Compile and run and everything show work.  If you are using Visual Studio 2003, you should use this version.

Extra Credit

Extra credit points will be awarded for extensions to the base assignment that we think are novel and interesting. To apply for extra credit, write a one-paragraph description of what you did above and beyond the call of duty. Here are a few suggestions:

Submission

Write a web page describing what you did, including your entry for the art contest. For this assignment, no art contest credit will be given for a submission consisting of a picture of a single square. Either modify the main skeleton to draw many squares in an interesting way, or use your extra credit work to create something. Screenshots of a single square in an "interesting" position are not interesting.

Your submission will be a .zip file that contains ALL of the source code that your TA will need to build your assignment. It is your responsibility to make sure that the zip file is complete. We are not going to fix compile errors or fill in missing pieces of assignments.

The assignment will be submitted electronically -- details will follow in lecture shortly (Thursday, 9-1).

Please do NOT e-mail your .zip file or any images as attachments.  It'll just make us cranky at getting a big e-mail attachment.