Chapter 4. Color, Pixels, and Fragments

Chapter Objectives

After reading this chapter, you’ll be able to do the following:

• Understand how OpenGL processes and represents the colors in your generated images.

• Identify the types of buffers available in OpenGL, and be able to clear and control writing to them.

• List the various tests and operations on fragments that occur after fragment shading.

• Use alpha blending to render translucent objects realistically.

• Use multisampling and antialiasing to remove aliasing artifacts.

• Employ occlusion queries and conditional rendering to optimize rendering.

• Retrieve rendered images and copy pixels from one place to another or one framebuffer to another.

The goal of computer graphics, generally speaking, ...

Get OpenGL® Programming Guide: The Official Guide to Learning OpenGL®, Version 4.5 with SPIR-V, Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.