Lecture: Graphics pipeline and animation


The graphics pipeline in a fundamental concept in computer graphics and refers to a series of interconnected stages through which data and commands describing a scene go through when being rendered. The term rendering pipeline is also used, sometimes synonymously, but often to refer to non-rasterisation based rendering approaches.

OpenGL has included the notion of a graphics pipeline from the outset. The following image is from the first, OpenGL 1.0 specification

opengl 1.0 figure 2.1

A similar diagram is in the first version of "Redbook", describing OpenGL 1.1. Note that the pipeline includes pathways for both vertex and pixel data.


Associated with the first OpenGL specification is a diagram showing the full state machine with the pipeline in detail.

A simplified version of the pipeline for vertices only is shown below, along with the corresponding data from each stage ( from the Cg tutorial)



We also looked at the graphics pipeline in Interactive 3D Graphics and Animation

Fixed versus Programmable Pipeline

One of the key developments in computer graphics has been the evolution of the GPU from a fixed pipeline to a programmable pipeline. The means various stages of the pipeline can be programmed, using programs called shaders.

In OpenGL 2 vertex and fragment shaders were introduced. More recently in OpenGL 3 and 4 further programmable processor stages have been introduced, in particular geometry shaders to perform tesselation.

the latest OpenGL 4.2 specification has an updated simplified version of the pipeline showing the programmable/shader stages

opengl 4.2 figure 2.1

The following diagram, from the OpenGL Shading Language book (aka "The Orange Book") has a more elaborate diagram showing the programmable OpenGL pipeline with the vertex and fragment processors


A recent diagram of the OpenGL pipeline was made available as part of the OpenGL Insights book.

Graphics Architecture

OpenGL was designed with the idea of being able to design and use special purpose hardware, i.e. GPUs, to accelerate performance. An early paper discusses the design of OpenGL

Early graphics hardware accelerators, in the form of multiple circuit boards, were available from various companies, including Silicon Graphics, where OpenGL originated. Two seminal SIGGRAPH papers discuss them: High-performance polygon rendering, from 1988 and RealityEngine Graphics, from 1993

The first GPU - a single chip graphics accelerator - was the GeForce 256 by Nvidia in 1999. Since then GPUs have dramatically increased performance, transistor count and programmability. The just released Nvidia GTX 460 has close to 2 billion transistors. Performance has gone from 10s-100s of thousands of triangles/second to 10s-100s of millions.

Graphics Performance and Benchmarking

In computer graphics we are always interested in performance, or perhaps more elaborately, picture quality versus performance tradeoffs.

In computer graphics performance is usually measured by benchmarking. Benchmarking is a broad topic in itself, and can be controversial.

There are two general approaches to graphics benchmarking:

The Standard Performance Evaluation Corporation, or just SPEC is a vendor neutral non-profit organisation which develops benchmarks. Originally it focussed on CPU peformance, but now has a range of benchmarks.

For graphics/GPU performance it has a benchmark called viewperf, orginally developed by IBM. Viewperf is an application style benchmark

Graphics Performance Optimisation

Optimizing graphics performance in applications relates directly to the graphics pipeline. Any stage of the pipeline may be a bottleneck, including the CPU.

Identifying bottlenecks and optimising performance is a deep technical topic. Further, bottlenecks and approaches to improving performance change with evolving hardware and rendering techniques. For example, in modern GPUs the programmable stages might be the bottle neck.

A good overview of performance optimisation is given in this presentation from Nvidia.

Another good discussion is this paper from GPU Gems.

There are many others.