Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WebGL always presenting latest bound FBO #2895

Merged
merged 1 commit into from Jul 9, 2019

Conversation

hecrj
Copy link
Contributor

@hecrj hecrj commented Jul 9, 2019

When working on #2892, I noticed that when using WebGL with the GL backend, the latest bound FBO was being blitted to the default framebuffer, instead of the correct swapchain FBO.

The changes in this PR fix this issue while:

  • Unifying swapchain creation and presentation
  • Removing related unused code
  • Removing a related unnecessary unsafe block

PR checklist:

  • make succeeds (on *nix)
  • make reftests succeeds
  • tested examples with the following backends:
  • rustfmt run on changed code

_ => unimplemented!(),
};

let channel = config.format.base_format().1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code wasn't actually being used...

@hecrj hecrj force-pushed the fix/webgl-present-latest-fbo branch from 67363b5 to 1788c8a Compare July 9, 2019 02:17
@hecrj hecrj mentioned this pull request Jul 9, 2019
26 tasks
  - Unified swapchain creation and presentation.
  - Removed unused code.
  - Remove unnecessary unsafe block.
@hecrj hecrj force-pushed the fix/webgl-present-latest-fbo branch from 1788c8a to 1474d0b Compare July 9, 2019 02:56
@kvark kvark requested a review from grovesNL July 9, 2019 13:03
@kvark
Copy link
Member

kvark commented Jul 9, 2019

bors r=msiglreith

bors bot added a commit that referenced this pull request Jul 9, 2019
2895: Fix WebGL always presenting latest bound FBO r=msiglreith a=hecrj

When working on #2892, I noticed that when using WebGL with the GL backend, the latest bound FBO was being blitted to the default framebuffer, instead of the correct swapchain FBO.

The changes in this PR fix this issue while:
  - Unifying swapchain creation and presentation
  - Removing related unused code
  - Removing a related unnecessary unsafe block

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


Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
@bors
Copy link
Contributor

bors bot commented Jul 9, 2019

Build succeeded

@bors bors bot merged commit 1474d0b into gfx-rs:master Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants