diff options
author | Eric Anholt <eric@anholt.net> | 2016-09-16 23:39:42 +0100 |
---|---|---|
committer | Glenn Watson <github@intuitionlibrary.com> | 2016-09-21 08:05:45 +1000 |
commit | 87c9333abddbf8fb16e2f79a09c59579d34dd49f (patch) | |
tree | f8b043cf9d023e6c637d49604c3e96d07e1492fb /components/script/dom/webglframebuffer.rs | |
parent | b2c169274ac88636ccbd9e67b10fc12faa612e4d (diff) | |
download | servo-87c9333abddbf8fb16e2f79a09c59579d34dd49f.tar.gz servo-87c9333abddbf8fb16e2f79a09c59579d34dd49f.zip |
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.
Diffstat (limited to 'components/script/dom/webglframebuffer.rs')
-rw-r--r-- | components/script/dom/webglframebuffer.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs index 6e426fa0969..cd212d644bf 100644 --- a/components/script/dom/webglframebuffer.rs +++ b/components/script/dom/webglframebuffer.rs @@ -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() } |