Skip to content

Commit

Permalink
Update vertexLife.md
Browse files Browse the repository at this point in the history
caused by mermaid-js/mermaid#3287 (comment)
wait mermaid fix this
  • Loading branch information
zomb-676 authored Apr 5, 2023
1 parent 3d5952d commit 63d951b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions render/vertexLife.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BufferBuilder {
+ building() boolean
+ begin(Mode, VertexFormat) void
+ getSortState() SortState
+ popNextBuffer() Pair~DrawState, ByteBuffer~
+ popNextBuffer() Pair~DrawStateAndByteBuffer~
+ clear() void
+ discard() void
+ end() void
Expand Down Expand Up @@ -86,6 +86,8 @@ BufferVertexConsumer --> VertexConsumer
DefaultedVertexConsumer ..> VertexConsumer
```
注意 popNextBuffer()的返回值应是Pair<DrawState, ByteBuffer>,上文的错误是由于mermaid不支持所致
在此[issue](https://github.com/mermaid-js/mermaid/issues/3287#issuecomment-1468536297)被解决后即可改善

可以发现位于继承树顶层的`VertexConsumer`定义了存放了不同功能的顶点数据
`BufferVertexConsumer`则具体定义了将具体类型的数据存放
Expand Down Expand Up @@ -598,4 +600,4 @@ private void putSortedQuadIndices(VertexFormat.IndexType pIndexType) {

}
```
没错,`index`数据与`vertex`数据写入了同一个`ByteBuffer`
没错,`index`数据与`vertex`数据写入了同一个`ByteBuffer`

0 comments on commit 63d951b

Please sign in to comment.