Chapter 5. Data
What You’ll Learn in This Chapter
• How to create buffers and textures that you can use to store data that your program can access.
• How to get OpenGL to supply the values of your vertex attributes automatically.
• How to access textures and buffers from your shaders.
In the examples you’ve seen so far, either we have used hard-coded data directly in our shaders, or we have passed values to shaders one at a time. While sufficient to demonstrate the configuration of the OpenGL pipeline, this is hardly representative of modern graphics programming. Recent graphics processors are designed as streaming processors that consume and produce huge amounts of data. Passing a few values to OpenGL at a time is extremely inefficient. To allow ...
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.