This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Simplify render path - #1325
Merged
Merged
Simplify render path#1325
Conversation
kkaefer
force-pushed
the
1325-simplify-render-path
branch
3 times, most recently
from
April 27, 2015 16:03
dbc14eb to
dc617d4
Compare
Member
Author
|
@mapbox/gl Please review. |
Contributor
|
Is there a measurable performance improvement from wrapping all calls that modify gl state? |
Member
Author
|
This fixes #434 |
kkaefer
force-pushed
the
1325-simplify-render-path
branch
3 times, most recently
from
April 30, 2015 17:35
a5406c5 to
bc091c8
Compare
This moves all texture updates and buffer uploads to the beginning of every frame, before we issue any drawing commands. This means the GPU typically has much more time to upload the data in the background until we actually need it, and doesn't have to pause to store/load the framebuffer.
We always need to do a full upload to adjust the image buffer size when we adjust the size of our sprite atlas. This can happen when we change the pixelRatio of the map we're rendering.
- previously, we reallocated the glyph atlas on every upload. Instead, we're now using glTexSubImage2D to reuse the existing buffer - we're no longer forcing a texture upload when we remove glyphs; they won't be rendered anyway - we're now only doing a texture upload once per frame; previously, worker threads that added glyphs mid-render could trigger a texture upload while rendering is in progress
kkaefer
force-pushed
the
1325-simplify-render-path
branch
from
May 4, 2015 15:33
bc091c8 to
27d8e82
Compare
This was referenced May 5, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We're currently have a pretty complicated way of rendering a tile, going through many layers of objects and some double dispatching along the way. This makes the code hard to follow and we need to traverse the hierarchy several times, for rendering opaque and translucent objects. We also want to add an additional step before that, giving renderable objects (=buckets) an opportunity to upload data to the GPU before we kick off rendering a frame.