Skip to content

Commit

Permalink
Fix literate
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel committed Jul 5, 2024
1 parent 1b020cb commit 6f6ff3c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions basic-3d-rendering/input-geometry/index-buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,14 @@ std::vector<uint16_t> indexData = {
0, 1, 2, // Triangle #0 connects points #0, #1 and #2
0, 2, 3 // Triangle #1 connects points #0, #2 and #3
};

int indexCount = static_cast<int>(indexData.size());
```

The index data must have type `uint16_t` or `uint32_t`. The former is more compact but limited to $2^{16} = 65 536$ vertices.

````{note}
I also keep the interleaved color attribute in this example, my point data is:
```{lit} C++, Define point data (replace, also for tangle root "Vanilla")
```{lit} C++, Define point data (also for tangle root "Vanilla")
std::vector<float> pointData = {
// x, y, r, g, b
-0.5, -0.5, 1.0, 0.0, 0.0,
Expand Down

0 comments on commit 6f6ff3c

Please sign in to comment.