System Recommendations and Installation Instructions

System Recommendations

You will need to use a unix-based operating system for this class. You may simply use the CMS cluster computers if you wish, but be aware that they disallow graphics output over SSH. For your convenience, you may want to set up a unix-based partition or virtual machine (VM) on your own computer if you don’t already run Mac OS or Linux. If you aren’t too familiar with VM software and wish to use one, then we recommend using VirtualBox, which is free and has many internet resources for set-up help.

We have prepared a virtual machine for use in VirtualBox (or other virtualization software) here. (Username: cs171, password: password). If you use this virtual machine, make sure to type "startx" to start the graphical environment after logging in. To those of you who wish to set up a partition or VM on your own, we recommend choosing a Debian-based Linux distribution such as Ubuntu 14.04, because we have instructions on hand for installing OpenGL on those distributions.

Even if you already run Mac OS or Linux, you may want to set up a Debian-based Linux distribution anyway if you end up having trouble setting up OpenGL on your normal system.

Installing g++

You will need to install g++, the GNU C++ compiler, on your machine if your machine does not already have it. Those of you who are using a Debian-based Linux operating system like Ubuntu can install g++ as follows:

sudo apt-get update  
sudo apt-get install build-essential

Those of you who use Mac OS or other distributions of Linux will have to look up the installation process online.

Installing OpenGL

OpenGL (Open Graphics Library) is a cross-language, multi-platform API for rendering 2D and 3D graphics. We will be using OpenGL extensively to write our programs starting in Assignment 3. In preparation for the future assignments, we ask you to make sure that you have a working OpenGL development environment by running one of our template OpenGL programs.

The CMS cluster computers all come pre-installed with the OpenGL development utilities. However, we recommend that you also set up the environment on your own machine.

For those of you who use a Debian-based Linux operating system like Ubuntu, all you need to do is install the following packages below. Note that the installations will at times prompt you for a yes or no input. In addition, some of the later packages on this list are actually included in the first few listed packages; so some of these installation commands may be redundant.

sudo apt-get install freeglut3  
sudo apt-get install freeglut3-dev  
sudo apt-get install libglew1.5  
sudo apt-get install libglew1.5-dev  
sudo apt-get install libglu1-mesa  
sudo apt-get install libglu1-mesa-dev  
sudo apt-get install libgl1-mesa-dev

Those of you who use Mac OS or other distributions of Linux will have to look up the installation process online.

One last note about this OpenGL installation: this process does not install the latest version of OpenGL. Instead, we are asking you to install an older, but stable version of OpenGL that is sufficient for the purposes of an introductory graphics class.

Testing Your OpenGL Installation

To make sure that your OpenGL installation was successful, make sure that you can compile and run our OpenGL demo program, which we have included in this zip. Inside the zip file is a folder containing a file named opengl_demo.cpp and a Makefile.

Those of you who are using a Debian-based Linux operating system should be able to just type Make in the command-line window to compile our OpenGL demo program. Those of you who use Mac OS or other distributions of Linux may have to first change some settings in the Makefile before the code will compile.

Execute the program once the code compiles successfully. Those of you who are using a virtual machine may need to disable 3D acceleration first. A window should pop up on your screen showing the following scene:

pict

The program should be able to register mouse and keyboard interaction. Test out the following:

pict

If all of the above works, then congratulations; you have successfully installed the OpenGL development tools. If you are having trouble running our program successfully, then feel free to contact us or come to office hours for assistance.


Written by Kevin (Kevli) Li (Class of 2016).
Links: Home Assignments Contacts Policies Resources