C++ OpenGL Sample Program
If you work in C or C++ there are a number of different platforms/languages on which you can do your development. Here are some options.
- Visual C++ on your own Windows laptop or desktop: If you have a PC running Microsoft Windows and a fairly up-to-date version of Visual C++ and a decent graphics card (which is standard on most modern machines) this is the best option. For grading purposes, avoid the use of any graphics extensions that your graphics card may support, but that we do not have.
- C or C++ on the CSIC Linux-Lab Machines: Much faster than WAM/Glue machines for graphics.
- C or C++ on the your own Linux-based or Mac-OS machine: This is also an efficient option, but we do not much experience in configuring them.
This directory contains a small sample OpenGL program along with a number of Makefiles for various systems. The entire bundle can be downloaded through the following link.
It can be opened using Winzip (on Windows) or gunzip and tar (on Unix). The sections below describe the directory's contents.
The C/C++ section contains the following files.
- The C++ source code sample1.cpp for a simple sample program.
- The C++ source code sample2.cpp for a somewhat fancier sample program.
- Readme files for the various platforms:
- Makefile: Makefile for the CSIC linux machines.
- The directory VisualCPP contains, the file ReadmeForVisualC++.txt, which contains information on how to compile and run the program under Microsoft Visual C++ 2003.
- The directory VisualStudioNET contains, the file ReadmeForVisualStudio.NET.txt, which contains analogous information for Microsoft Visual Studio.NET.
We have experimented with OpenGL in Java (through JOGL and AWT). However, the JOGL API has changed since last semester, and our sample program no longer compiles. If you are interested in trying JOGL, please let me know. I can point you towards the relevant web page for downloading the latest version.
Please report any errors or send comments to Dave Mount
Last updated: Sun, Jan 29, 2006.