mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
webgl: Re-check FBO status on binding an FBO.
When the FBO has been unbound, anything that happened to its attachments (deletion, new binding, reallocation) may have caused it to change status. This doesn't change any test results currently, because we're not checking if the attachments are deleted, the wrong size, or have appropriate formats.
This commit is contained in:
parent
dba7d5eb51
commit
71d266052b
1 changed files with 5 additions and 0 deletions
|
@ -89,6 +89,11 @@ impl WebGLFramebuffer {
|
|||
}
|
||||
|
||||
pub fn bind(&self, target: u32) {
|
||||
// Update the framebuffer status on binding. It may have
|
||||
// changed if its attachments were resized or deleted while
|
||||
// we've been unbound.
|
||||
self.update_status();
|
||||
|
||||
self.target.set(Some(target));
|
||||
let cmd = WebGLCommand::BindFramebuffer(target, WebGLFramebufferBindingRequest::Explicit(self.id));
|
||||
self.renderer.send(CanvasMsg::WebGL(cmd)).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue