Lecture 4:
Viewports

Contents

Lecture Objectives

4-1

Defining Where You Can Draw

4-2

Changing the Viewport

4-3

Finding the Size of a Window

4-4

Mapping From Viewing Volume to Viewport

4-5

Example: viewport.c

4-6

Aspect Ratio

4-7

Handling Changes In the Window Size

4-8

Registering a Window Reshape Callback

4-9

Resetting the Viewing Volume

4-10

Example: aspect.c

4-11

Lab: Viewports

4-12

Lecture Summary

4-13

OpenGL C Quick Reference

4-14