Fix render issues, re-enable buffer compaction #6358
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Symbol
with no instances. We had logic to callcontext.draw_arrays
(non-instanced) ifinstance_scope().size() == 0
. This was incorrect: AllSymbol
s are instanced symbols, and should only be drawn if at least one instance exists. This didn't cause a problem before because it was unreachable: We never instantiated aSymbol
without creating at least one instance, and without buffer compaction it was not possible for instance count to decrease. Fixed by skipping all draw-related GL calls if there are no instances (this might also improve performance in some conditions).OptVec
iteration pattern (would cause a crash in conditions not currently reachable).Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
The documentation has been updated, if necessary.Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
Unit tests have been written where possible../run ide build
.