Skip to content

Commit

Permalink
Merge #3699
Browse files Browse the repository at this point in the history
3699: [WebGL] Return only RGBA swapchain formats r=kvark a=Gordon-F

WebGL doesn't supports BGRA texture formats

PR checklist:
- [ ] `make` succeeds (on *nix)
- [ ] `make reftests` succeeds
- [x] tested examples with the following backends: WebGL


Co-authored-by: Igor Shaposhnik <Gordon-F@users.noreply.github.com>
  • Loading branch information
bors[bot] and Gordon-F authored Mar 25, 2021
2 parents 4619678 + 34dc1d9 commit 52f77a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/gl/src/window/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pub struct Surface {

impl Surface {
fn swapchain_formats(&self) -> Vec<f::Format> {
vec![f::Format::Rgba8Unorm, f::Format::Bgra8Unorm]
vec![f::Format::Rgba8Srgb, f::Format::Rgba8Unorm]
}

pub(crate) unsafe fn present(
Expand Down

0 comments on commit 52f77a6

Please sign in to comment.