OpenGL and Vector Math Basics

CS 481 Lecture, Dr. Lawlor

C++ Libraries used with OpenGL

You can use many libraries along with OpenGL itself.  Here are a few we'll be using in this course:
Mac OS X
Basic rendering calls: triangles, vertices, textures, etc.
The OpenGL FAQ is a good place to start, or the Manual Pages. The  OpenGL 1.4 Specification is unreadable legalese.  The Red Book is dated but readable.

(note captialization, Windows people!)

(Usually have to add this to your project's linker properties...)
-framework OpenGL
Create windows, set up buffers, handle keyboard and mouse.
The original GLUT API document is readable.
glut32.lib or freeglut.lib
-framework GLUT
Dynamic interface to latest OpenGL routines.  A must for programmable shaders on Windows!
GLEW makes new OpenGL extensions work as advertised.  The only pure-GLEW routine is glewInit().

(Include first; this replaces GL/gl.h!)
(I prefer it statically linked)

Buttons, scrollbars, dropdown menus, and other widgets.
I've prepared some doxygen comments. There's also an older GLUI manual.
(I prefer it statically linked)

Orion's OpenGL utilities
Read the ogl/ header files.
(I prefer it statically linked)

Orion's scene database
Read the physics/ header files.

Calls you Should Already Know

(or else calls you need to look up right now!)

Vectors, dot, and cross products

You should know basic 2D and 3D vectors, including dot products and cross products. Vectors are basically all we ever deal with in computer graphics, so it's important to understand these pretty well.

In particular, you should know at least:
You should pick one of the thousands of "vec3" classes on the web to represent vectors in your code, or else you'll go insane writing "glSomething3f(foo_x,foo_y,foo_z); foo_x+=bar_x; foo_y+=bar_y; foo_z+=bar_z;"

With a nice vec3 class, you'll be able to say "glSomething3fv(foo); foo+=bar;"