Shader-Based OpenGL Overview

OpenGL has been the leading 2D and 3D graphics API for many years. It is a library of functions that helps you create interactive applications that render high-quality color images composed of 2D and 3D geometric objects and images. It runs on every major operating system, including Windows, Mac OS and Unix.

While OpenGL has been around for over 20 years, a lot of changes have occurred since it was created. Until OpenGL 3.0, features have only been added (but never removed) from OpenGL, providing a lot of application backwards compatibility. OpenGL version 3.0 introduced the mechanisms for removing features from OpenGL, called the deprecation model. This was necessary so that OpenGL could keep up with the rapid developments of the graphics cards (GPUs).

OpenGL version 3.1 was the first version to remove deprecated features, and break backwards compatibility with previous versions of OpenGL. This course concentrates on the modern versions of OpenGL (3.1 and above), which are entirely shader based. Shaders are little programs, made from GLSL (OpenGL Shading Language) code, that run on the GPU instead of the CPU. In older version of OpenGL, shaders were optional. In modern OpenGL, shaders are required in order to get anything to show on the screen.

OpenGL Resources

We will be using the Modern OpenGL tutorial series developed by Tom Dalling. Each tutorial is accompanied by a complete standalone program that you can run, study and extend with new features. The project includes all dependencies, so you shouldn't' have to install or configure any extra libraries. The series introduces increasingly sophisticated OpenGL concepts that should give you a solid background on modern OpenGL.

To Do

  1. Install on your laptops Visual Studio Express 2013 (which is available for free).

  2. Download Tom Dalling's modern OpenGL code as a zip from here: Extract all files in a folder whose location you will remember. In the root folder, identify opengl-series.sln (opengl-series.xcodeproj if you are a Mac user) and double-click to load it in Visual Studio 2013 (Xcode for Mac users). Build the target 01_project_skeleton and run it. If you see a white triangle in a black window, you are done for now -- your software has been set up correctly.

  3. Make a copy of your entire opengl-series directory. We will modify one copy during the course of the semester, and use the original copy as a reference.