Chapter 16. Buffer Objects: It's Your Video Memory; You Manage It!

by Benjamin Lipchak

WHAT YOU'LL LEARN IN THIS CHAPTER:

How To

Functions You'll Use

Create, bind to, and delete buffer objects

glGenBuffers/glBindBuffer/glDeleteBuffers

Send data into a buffer object indirectly

glBufferData/glBufferSubData

Write data into a buffer object directly

glMapBuffer/glUnmapBuffer

Graphics cards today have nearly as much memory as the rest of the system they're plugged into. The amount of graphics card memory tends to at least be within an order of magnitude, say 25%, of the amount of system memory. That's quite a resource to exploit—or to waste by not making the best use of it.

Video memory has traditionally been used for storing the following:

  • Front buffers (what ...

Get OpenGL® SuperBible, Third 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.