Skip to content

Commit de3e1e0

Browse files
committed
Chapter 21 Draft
1 parent 51b28a7 commit de3e1e0

File tree

3 files changed

+416
-4
lines changed

3 files changed

+416
-4
lines changed

chapter-20/chapter-20.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ public class RenderBuffers {
456456

457457
We start by creating a VAO (which will be used for static models), and then iterate over the meshes of the models. We will use a single buffer to hold all the data, so we just iterate over those elements to get the final buffer size. We will calculate the number of position elements, normals, etc. We use that first loop to also populate the offset information that we wil store in a list that will contain `RenderBuffers.MeshDrawData` instances. After that we will create a single VBO. You will find a major difference with the one in the `Mesh` class that did a similar task, creating the VAO and VBOs. In this case, we use a single VBO for positions, normals etc. We just load all that data row by row instead of using separate VBOs. This is done in the `populateMeshBuffer` (which we will see after this). After that, we create the index VBO which will contain the indices for all the meshes of all the models.
458458

459-
The `` is defined like this:
459+
The `MeshDrawData` class is defined like this:
460460

461461
```java
462462
public class RenderBuffers {

0 commit comments

Comments
 (0)