Lecture 2:
Rendering

Contents

Lecture Objectives

2-1

Rendering With OpenGL

2-2

Vertices

2-3

What Are World Coordinates?

2-4

Defining the Viewing Volume

2-5

Viewing Volume Is Mapped to Window

2-6

Specifying Vertices

2-7

Drawing Geometric Primitives

2-8

Points

2-9

Specifying an Object's Color

2-10

Lines

2-11

Modeling

2-12

Example: grid.c

2-13

Line Segments

2-14

Polygons

2-15

Constraints on Polygons

2-16

Polygon Faces

2-17

Rectangles

2-18

Example: checkerboard.c

2-19

Lab: Rendering

2-20

Triangles

2-21

Triangle Strips and Fans

2-22

Quads

2-23

Quad Strips

2-24

Shading Models

2-25

Flat Shading

2-26

Smooth Shading

2-27

Example: shadeModel.c

2-28

Hints for Fast Rendering

2-29

Lab: Rendering and the Shading Model

2-30

Lecture Summary

2-31

OpenGL C Quick Reference

2-32