Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 2.61 KB

vertex-and-index-buffers.md

File metadata and controls

61 lines (42 loc) · 2.61 KB
title description ms.assetid keywords ms.date ms.topic ms.localizationpriority
Vertex and index buffers
Vertex buffers are memory buffers that contain vertex data; vertices in a vertex buffer are processed to perform transformation, lighting, and clipping.
8A39CD23-85FB-4424-9AC3-37919704CD68
Vertex and index buffers
02/08/2017
article
medium

Vertex and index buffers

Vertex buffers are memory buffers that contain vertex data; vertices in a vertex buffer are processed to perform transformation, lighting, and clipping. Index buffers are memory buffers that contain index data, which are integer offsets into vertex buffers, used to render primitives.

Vertex buffers can contain any vertex type - transformed or untransformed, lit or unlit - that can be rendered. You can process the vertices in a vertex buffer to perform operations such as transformation, lighting, or generating clipping flags. Transformation is always performed.

The flexibility of vertex buffers make them ideal staging points for reusing transformed geometry. You could create a single vertex buffer, transform, light, and clip the vertices in it, and render the model in the scene as many times as needed without re-transforming it, even with interleaved render state changes. This is useful when rendering models that use multiple textures: the geometry is transformed only once, and then portions of it can be rendered as needed, interleaved with the required texture changes. Render state changes made after vertices are processed take effect the next time the vertices are processed.

In this section

Topic Description

Introduction to buffers

A buffer resource is a collection of fully typed data, grouped into elements. Buffers store data, such as texture coordinates in a vertex buffer, indexes in an index buffer, shader constants data in a constant buffer, position vectors, normal vectors, or device state.

Index buffers

Index buffers are memory buffers that contain index data, which are integer offsets into vertex buffers, used to render primitives.

 

Related topics

Direct3D Graphics Learning Guide