Chapter 3. Rendering Meshes

In this chapter, we will cover the following topics:

  • Rendering a cube and sphere
  • Preparing the vertex and constant buffers for materials and lighting
  • Adding material and lighting
  • Using a right-handed coordinate system
  • Loading a static mesh from a file

Introduction

A mesh is technically just a vertex and index buffer that represents a 3D object, and if we look at what we have already covered, we can easily understand this. However, these objects nearly always require a number of additional properties, such as material (surface and lighting properties), textures, submeshes, bones, and animations. This is what Microsoft has done in the past with their ID3DX10Mesh interface; however, this is not available for Direct3D 11 (along ...

Get Direct3D Rendering Cookbook 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.