API BREAKAGE: this change aims to fix multi-view support#2376
Merged
pixelflinger merged 2 commits intomasterfrom Apr 10, 2020
Merged
API BREAKAGE: this change aims to fix multi-view support#2376pixelflinger merged 2 commits intomasterfrom
pixelflinger merged 2 commits intomasterfrom
Conversation
What has changed: - View doesn't have a notion of clear color anymore - View doesn't have a notion of discard flags anymore - The clear color and color-buffer discard/clear flags are moved to Renderer - Skybox can now be set to a constant color - View have a blend-mode What does is all mean: "Clearing" (i.e.) setting its background is now handled by Skybox, by setting a constant color to the Skybox. This should take care of drawing views side by side. When a view needs to be drawn on top of another, it's BlendMode needs to be set to TRANSLUCENT and of course and, generally, it wither won't have a skybox, or will have one that sets some translucent pixels. As an optimization, a View with BlendMode::OPAQUE will have its background cleared with the color specified in Renderer. If the SwapChain already has some content, it's now possible to set the Renderer to not discard the content, together with TRANSLUCENT views, it's possible to draw on top of that content. It is NOT possible to share depth/stencil buffers between views. Fixes: #2369, #2372, #2364
romainguy
approved these changes
Apr 10, 2020
prideout
reviewed
Apr 10, 2020
...amples/sample-multi-view/src/main/java/com/google/android/filament/multiview/MainActivity.kt
Outdated
Show resolved
Hide resolved
Member
|
A couple iOS samples use the old clear API and are failing to compile: |
bejado
reviewed
Apr 10, 2020
Note: WebGL is still broken with this PR
bejado
approved these changes
Apr 10, 2020
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What has changed:
What does is all mean:
"Clearing" (i.e.) setting its background is now handled by Skybox, by
setting a constant color to the Skybox. This should take care of
drawing views side by side.
When a view needs to be drawn on top of another, it's BlendMode needs to
be set to TRANSLUCENT and of course and, generally, it wither won't have
a skybox, or will have one that sets some translucent pixels.
As an optimization, a View with BlendMode::OPAQUE will have its
background cleared with the color specified in Renderer.
If the SwapChain already has some content, it's now possible to set
the Renderer to not discard the content, together with TRANSLUCENT views,
it's possible to draw on top of that content.
It is NOT possible to share depth/stencil buffers between views.
Fixes: #2369, #2372, #2364