mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
webgl: Do validation that the framebuffer is complete for FBO operations.
Given that we can't make a complete FBO yet, just return false from the status check.
This commit is contained in:
parent
b2c169274a
commit
87c9333abd
2 changed files with 63 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use canvas_traits::CanvasMsg;
|
||||
use dom::bindings::codegen::Bindings::WebGLFramebufferBinding;
|
||||
use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
|
@ -79,6 +80,12 @@ impl WebGLFramebuffer {
|
|||
self.is_deleted.get()
|
||||
}
|
||||
|
||||
pub fn check_status(&self) -> u32 {
|
||||
// Until we build support for attaching renderbuffers or
|
||||
// textures, all user FBOs are incomplete.
|
||||
return constants::FRAMEBUFFER_UNSUPPORTED;
|
||||
}
|
||||
|
||||
pub fn target(&self) -> Option<u32> {
|
||||
self.target.get()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue