O'Reilly logo

Learning Windows 8 Game Development by Michael Quandt

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

Buffers

Now we need to take these vertices and indices and get them into arrays that the GPU can understand. This is done through the use of buffers, which refer to blocks of memory that the GPU can use for a variety of different tasks.

Direct3D provides a couple of different types of buffers, each with their own purpose in the pipeline. The most commonly used buffers include the following:

  • Vertex buffers
  • Index buffers
  • Constant buffers

As you may have gathered, we use vertex and index buffers to store the data we need for rendering.

Building the vertex and index buffers

To create these buffers, we need to build up an array of the data, being careful to control the layout of each vertex. Later on we'll tell the GPU how to read the data, so we can make ...

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