Книга: DirectX 8 Programming Tutorial

How to make a cube

How to make a cube

Below are two diagrams showing how our cube is going to be made up. Here we have used three triangle strips, one for the top of the cube, one for the sides and one for the bottom. The diagram below shows the vertices and polygons for each triangle strip (Fig 3.3). The vertices are numbered from 0 to 17, this is the order that we must specify our vertices in the vertex buffer. Under that is a diagram that shows our cube (Fig 3.4). Notice where each of the vertices are in relation to each other. Also, look at how the vertices are always in a clockwise direction (except the bottom). This is because we have enabled Backface Culling (see above).


Fig 3.3


Fig 3.4

Оглавление книги

Оглавление статьи/книги

Генерация: 0.258. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз