Chapter 9. Emulating OpenGL Fixed Functionality

The programmability of OpenGL opens many new possibilities for never-before-seen rendering effects. Programmable shaders can provide results that are superior to OpenGL fixed functionality, especially in the area of realism. Nevertheless, it can still be instructive to examine how some of OpenGL’s fixed functionality rendering steps could be implemented with OpenGL shaders. While simplistic, these code snippets may be useful as stepping stones to bigger and better things.

This chapter describes OpenGL shader code that mimics the behavior of the OpenGL fixed functionality vertex and fragment processing. The shader code snippets are derived from the Full OpenGL Pipeline and Pixel Pipeline shaders developed ...

Get OpenGL® Shading Language, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.