CS184 Framework



Download links in the versions section further down the page.

Overview

This framework is constantly being developed. It has three design goals:

  1. Give you the tools you need to complete the assignments without forcing you to waste time of programming support code.
  2. Allow us to demonstrate C++ and OpenGL programming techniques
  3. Allow the graders to easily compile and grade your assignments.

Framework Contents

As of the moment, the framework is still small enough that 10 minutes of reading the code will more than suffice to get you up and running. The core contents of the framework consists of:

Coding

Place your source code in the src directory, starting with main.cpp. You can create more files to organize your source code, even going so far as to follow the Java convention of creating a separate file for each class (in this case .h and .cpp).

What you need to implement

You are allowed to change as much as you want. There are certain parts of the framework that we have left for you to implement, and those are indicated twofold:

Minimum requirements for submission purposes

Since the framework is partially designed to make grading easier, we ask that your submissions follow the compilation instructions established by it:

Windows   Building the solution should involve only opening the project's .sln file and pressing F5 to build and run.
Mac OSX   Typing make -f makefile.osx must compile your solution.
Linux   Typing make must compile your solution.
Solaris   Typing gmake must compile your solution.

Helpful Links

You want to look at both the Red Book and Blue Book for information on OpenGL:

Versions - Downloads available here

Version 6

This version include support for loading images using FreeImage and GLSL shaders using GLEW, which stands for GL Extension Wrangler. Yes, GL has so many extensions that wrangling is required ...

It's also a bit less likely to run on your computer, especially if you don't have a reasonable graphics card. Please test it out early and make sure you can run it.

Version 5

This is the version includes a roller coaster.

Version 4

Finally, we are doing raytracing! Fun! This version has considerable expansion of algebra3 to handle colors, rays, positions with (x,y,z), (u,v) and (i,j) coordinates, and material properties. Several of the components in raytracing is already implemented (fully or partially) thus by using our Viewport, World, Lights and Primitives classes you should be able to get your raytracer up and running quickly. Be sure to look at algebra3.h and go through the aforementioned classes.

Version 3

This version includes the Scene file parser, a significant addition to our framework. The command line argument now needs to be a valid scene file. We include a simple scene file that you can use. We build the scene graph for you, you need to write the traversal code.

This version of the code expects a commands line argument to run. To provide a command line argument in Visual Studio, open the project properties menu, select Debugging under Configuration Properties, and add your desired arguments to the Command Arguments field.

Version 2

This version includes screen capture to a BMP image progression, and a basic OBJ parser. It also contains the necessary templates for building a polygon morpher.

This version of the code expects a commands line argument to run. To provide a command line argument in Visual Studio, open the project properties menu, select Debugging under Configuration Properties, and add your desired arguments to the Command Arguments field.

Version 1 (AS1)

This framework is now depreciated and should no longer be used. It was minimal, it served its purpose, and we will not refer to it again.

Submission

Using the submit as on the instructional machines preserves directory structure, thus running submit in the root directory of your submission will allow you to submit the entire project with framework and all. We recommend making a directory for your assignment in your CS184-XX account, and running yes | submit as inside that directory for quick submission.

Initial Setup and Programming Environment

There exists a plethora of tools for C++ authoring. Windows users tend to use the Visual Studio environment, which we recommend (download legally for free here or here). Vim, Emacs and Nedit are all popular text editors used for programming, while Eclipse, Xcode and KDevelop are IDE-based environments that assist greatly in programming.

Compilation

Windows   You can either install Cygwin and its associated packages (compilers and GLUT) and follow a linux-like approach, or you can download Microsoft Visual Studio (alternative link) to use for development (probably an easier option for windows users).

For Visual Studio: Open the .sln file and press F5 to Build Solution. If you are using Visual Studio Express 2005, you should either install the platform sdk (instructions) or (preferably) upgrade to Express 2008 or a full version of Visual Studio for free.
Mac OSX   You need to install the Xcode developer toolkit from Apple. Register for a free account. From here you can use your favorite editor and compile from the terminal using the same approach as Solaris. Compile with gmake -f makefile.osx
Linux   You need to install gcc (or similar compiler), the standard c++ libraries, and GLUT. On an aptitude-based system (Debian, Ubuntu), you can accomplish this by installing the build-essential and freeglut3 package. You can now follow the same instructions as on Solaris.
Solaris   Assuming you are on one of the instructional machines, you should be able to compile immediately by running gmake -f makefile