mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
webgl: Ensure that framebuffers have a color attachment before reading or writing.
This commit is contained in:
parent
80ed829241
commit
d179435eab
4 changed files with 129 additions and 4 deletions
|
@ -339,7 +339,7 @@ impl WebGLRenderingContext {
|
|||
// this: clear() and getParameter(IMPLEMENTATION_COLOR_READ_*).
|
||||
fn validate_framebuffer(&self) -> WebGLResult<()> {
|
||||
match self.bound_framebuffer.get() {
|
||||
Some(ref fb) if fb.check_status() != constants::FRAMEBUFFER_COMPLETE => {
|
||||
Some(ref fb) if fb.check_status_for_rendering() != constants::FRAMEBUFFER_COMPLETE => {
|
||||
Err(InvalidFramebufferOperation)
|
||||
},
|
||||
_ => Ok(()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue