webgl: Ensure that renderbuffers have been bound before attaching to a framebuffer.

This commit is contained in:
Josh Matthews 2018-08-31 10:16:57 -04:00
parent bb8d9ba74c
commit 8ede221a83
2 changed files with 6 additions and 2 deletions

View file

@ -274,7 +274,7 @@ impl WebGLFramebuffer {
let rb_id = match rb {
Some(rb) => {
rb.attach(self);
rb.attach(self)?;
*binding.borrow_mut() = Some(WebGLFramebufferAttachment::Renderbuffer(Dom::from_ref(rb)));
Some(rb.id())
}