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. ...