O'Reilly logo

OpenGL® SuperBible, Third Edition by Benjamin Lipchak, Richard S. Wright

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Color, Materials, and Lighting: The Basics

By Richard S. Wright, Jr.

WHAT YOU'LL LEARN IN THIS CHAPTER:

How To

Functions You'll Use

Specify a color in terms of RGB components

glColor

Set the shading model

glShadeModel

Set the lighting model

glLightModel

Set lighting parameters

glLight

Set material reflective properties

glColorMaterial/glMaterial

Use surface normals

glNormal

This is the chapter where 3D graphics really start to look interesting (unless you really dig wireframe models!), and it only gets better from here. You've been learning OpenGL from the ground up—how to put programs together and then how to assemble objects from primitives and manipulate them in 3D space. Until now, we've been laying the foundation, and you still can't tell what ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required