Resources

Syllabus

The syllabus for this course is here.

Getting set up to do OpenGL programming

The officially supported platform for OpenGL programming in this course is the Microsoft Visual C++ Express Edition. You can also do OpenGL programming on other platforms using other compilers, but you will have to look up the appropriate instructions yourself. Here are the steps you will need to follow to get set up for OpenGL programming on Windows.

  1. If you do not already have it installed, download and install the Visual C++ Express Edition.
  2. Click this link to download the header file and library for the glut toolkit. Unzip the archive.
  3. Move the file named glut.h into the folder C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\gl
  4. Move the file named glut32.lib into the folder C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib.
  5. Move the glut32.dll file into C:\Windows\System32.
  6. In any projects you create you will need to tell Visual C++ to use the glut32 and OpenGL32 libraries. Do this by right-clicking on the project in the solution explorer and selecting Properties. In the project properties dialog box first select "All Configurations" from the Configurations drop-down menu. Then click on Linker/Input and type "glut32.lib OpenGL32.lib" in the Additional Dependencies section.

If you need to obtain glut for some other platform, please see the GLUT downloads site.

Text web site

The web site for the text, including source code for all examples is here.

OpenGL reference

Documentation on OpenGL functions is available here.

Daily summary

Monday, January 4

We covered sections 2.1-2.4 and 3.2 in the text. You should read these sections.

Wednesday, January 6

The Cohen-Sutherland clipping algorithm (section 3.3).

Wednesday, January 6 and Friday, January 8

Selected portions of chapter 4. Reading is all of chapter 4 with the exception of 4.5.1-4.5.4 and 4.6.1.

First Homework Set

Write C++ programs for problem 3.4-2 and Case Study 3.4. As a starting point for both of these programs you can use Listing 3.3 or Listing 3.27 from the text.

Problems 4.3.1,4.3.9,4.4.7b,4.5.9,4.7.2, and 4.7.3

These problems are due on Wednesday, January 13.

Friday, January 8 through Monday, January 11

Chapter 5: transformations. Reading is all of chapter 5.

Second Homework Set

Problems 5.2.12, 5.3.3, 5.3.11, and 5.5.1. These problems are due on Wednesday, January 20.

Wednesday, January 13 through Wednesday, January 20

Chapter 6: modeling shapes in 3 dimensions. Reading is all of chapter 6. I showed three OpenGL samples: a cylinder drawing with a quad strip, some domes drawn as parametric surfaces with both exact normals and normals computed by the Newell method, and ruled surface.

Third Homework Set

Problems 6.2.1, 6.4.2, 6.5.6, and 6.5.11

Write a program that draws the Gateway Arch. You can construct the arch by using a Frenet-frame technique. Start with equilateral triangle cross sections in the x-z plane and translate them along a catenary curve in the x-y plane. Don't forget to shrink the cross sections as you climb up the curve. The best method to draw the arch is as a set of three strips using quad strips.

Also, do case study 6.8 at the end of chapter 6.

These problems are due on Wednesday, January 27.

Friday, January 22 and Monday, January 25

Chapter 7 - viewing and perspective projections. Reading is all of chapter 7 with the exception of section 7.5.

First Midterm Exam

The first midterm exam is coming up on Monday, February 1. This exam will cover chapters 2-6. Here is a list of topics to review for the midterm.

Monday, January 25 through Wednesday, February 3

Chapter 8 - shading. Reading is all of chapter 8.

Fourth Homework Set

Problems 7.4.8, 8.6.3, 8.6.4. In addition, write an OpenGL program to wrap a texture onto a sphere. You can use code from this textured cube example to help you do this. These problems are due on Wednesday, February 10.

Friday, February 5 through Wednesday, February 10

Chapter 10 - Curve and Surface Design. Reading is all of chapter 10 with the exception of section 10.10. OpenGL uses evaluators to draw Bezier and B-spline curves and surfaces. Here is guide to using evaluators, and a couple of examples: drawing a surface with evaluators and drawing a surface with NURBs.

Fifth Homework Set

Problems 10.4.7, 10.6.3, 10.7.2, and 10.7.9. In addition, write a program for case study 10.8. These problems are due on Friday, February 19.

Monday, February 15 through Friday, February 19

Chapter 12 - Ray Tracing. Reading is all of chapter 12 except sections 12.3 and 12.4.

Sixth Homework Set

Problems 12.2.2, 12.4.1, 12.6.8, and 12.12.1. These problems are due on Friday, February 26.

Monday, February 22

I discussed two ideas from chapter 9, copying pixmap data to and from the frame buffer and alpha blending. Here is the (corrected) version of a program from the text that demonstrates pixmap operations. Reading for today is sections 9.2 and 9.3.

Wednesday, February 24

I talked about the OpenGL extensions mechanism and showed an example program that shows how to use the GLEW library to find and load an OpenGL extension. Here is a link to some official documentation that shows how to load OpenGL extensions. A full listing of available extensions along with documentation on each extension is also available. There are two libraries that are commonly used to make dealing with OpenGL extensions easier, GLEW and GLee.

Second Midterm Exam

The second midterm exam is coming up on Friday, February 26. This exam covers chapters 7, 8, and 10. Here is a list of topics to review for this exam.

Monday, March 1 and Wednesday, March 3

I talked about the OpenGL shading language, vertex shader programs, and fragment shader programs. This is a rather extensive topic covered in its own reference manual. The examples I showed all come from the 4th edition of the OpenGL SuperBible: chapter 16 - vertex shaders, and chapter 17 - fragment shaders. You can download the source code for all of the examples I showed from the book site.

Friday, March 5

I spoke about optimizing data transfer to and from video hardware using display lists, vertex arrays, and vertex buffer objects. All of the examples I showed came from chapter 11 of the OpenGL SuperBible.

Monday, March 8

I talked about game engines and graphics engines. A freely available graphics engine with good documentation and support is the Ogre graphics engine, a C++ library for implementing 3d graphics using OpenGL and DirectX.

Wednesday, March 10 and Friday, March 12

I talked about image compression, including color quantization, JPEG compression, and MPEG compression. Color quantization is covered in section 11.6 of the textbook. Here is an article that discusses the Octree quantization algorithm. You can find an excellent discussion of JPEG compression on Wikipedia.