Chapter 6. Shaders and Programs

What You’ll Learn in This Chapter

• The fundamentals of the OpenGL shading language.

• How to find out if your shaders compiled, and what went wrong if they didn’t.

• How to retrieve and cache binaries of your compiled shaders and use them later for rendering.

So far in this book, you have read about the OpenGL pipeline, written some simple OpenGL programs, and seen some rendering. We have covered basic computer graphics fundamentals, some 3D math, and more. Modern graphics applications spend most of their time executing shaders, and graphics programmers spend a lot of their time writing shaders. Before you can write really compelling programs, you’ll need to understand shaders, the OpenGL programming model, and ...

Get OpenGL SuperBible: Comprehensive Tutorial and Reference, Seventh 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.