O'Reilly logo

OpenGL® SuperBible: Comprehensive Tutorial and Reference, Sixth Edition by Richard S Wright, Graham Sellers, Nicholas Haemel

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 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 from your shaders for both reading and writing

In the examples you’ve seen so far, we have either 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. ...

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