mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
webgl: Add support for checkFramebufferStatus().
For now it's returning the default UNSUPPORTED on user FBOs. object-deletion-behaviour.html starts running a bunch more subtets.
This commit is contained in:
parent
cc0955f12d
commit
8a0ca2efba
6 changed files with 81 additions and 13 deletions
|
@ -2552,6 +2552,23 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
fn TexParameteri(&self, target: u32, name: u32, value: i32) {
|
||||
self.tex_parameter(target, name, TexParameterValue::Int(value))
|
||||
}
|
||||
|
||||
fn CheckFramebufferStatus(&self, target: u32) -> u32 {
|
||||
// From the GLES 2.0.25 spec, 4.4 ("Framebuffer Objects"):
|
||||
//
|
||||
// "If target is not FRAMEBUFFER, INVALID_ENUM is
|
||||
// generated. If CheckFramebufferStatus generates an
|
||||
// error, 0 is returned."
|
||||
if target != constants::FRAMEBUFFER {
|
||||
self.webgl_error(InvalidEnum);
|
||||
return 0;
|
||||
}
|
||||
|
||||
match self.bound_framebuffer.get() {
|
||||
Some(fb) => return fb.check_status(),
|
||||
None => return constants::FRAMEBUFFER_COMPLETE,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub trait LayoutCanvasWebGLRenderingContextHelpers {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue