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 6. More on Colors and Materials

by Richard S. Wright, Jr.

WHAT YOU'LL LEARN IN THIS CHAPTER:

How To

Functions You'll Use

Blend colors and objects together

glBlendFunc, glBlendFuncSeparate, glBlendEquation, glBlendColor

Use alpha testing to eliminate fragments

glAlphaFunc

Add depth cues with fog

glFog

Render motion-blurred animation

glAccum

In the preceding chapter, you learned that there is more to making a ball appear red than just setting the drawing color to red. Material properties and lighting parameters can go a long way toward adding realism to your graphics, but modeling the real world has a few other challenges that we will address in this chapter. For starters, many effects are accomplished by means of blending colors together. Transparent ...

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