diff options
author | Mátyás Mustoha <matyas.mustoha@h-lab.eu> | 2020-03-06 11:42:21 +0100 |
---|---|---|
committer | Mátyás Mustoha <matyas.mustoha@h-lab.eu> | 2020-03-09 12:59:30 +0100 |
commit | ced67af6b2519c577f7830ea76e0426ff44a9a2a (patch) | |
tree | b28247640a9879ca37a5c4a9855bb06901b3ae05 /components/script/dom/webgl2renderingcontext.rs | |
parent | e1f6dfd7165d89246b35233fffe159352884b477 (diff) | |
download | servo-ced67af6b2519c577f7830ea76e0426ff44a9a2a.tar.gz servo-ced67af6b2519c577f7830ea76e0426ff44a9a2a.zip |
Add support for WebGL2 GetFragDataLocation
Adds support for the `GetFragDataLocation` WebGL2 call.
See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.7
Diffstat (limited to 'components/script/dom/webgl2renderingcontext.rs')
-rw-r--r-- | components/script/dom/webgl2renderingcontext.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs index ec2741c44dd..d6452a88043 100644 --- a/components/script/dom/webgl2renderingcontext.rs +++ b/components/script/dom/webgl2renderingcontext.rs @@ -1467,6 +1467,12 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext { self.base.GetAttribLocation(program, name) } + /// https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.7 + fn GetFragDataLocation(&self, program: &WebGLProgram, name: DOMString) -> i32 { + handle_potential_webgl_error!(self.base, self.base.validate_ownership(program), return -1); + handle_potential_webgl_error!(self.base, program.get_frag_data_location(name), -1) + } + /// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9 fn GetProgramInfoLog(&self, program: &WebGLProgram) -> Option<DOMString> { self.base.GetProgramInfoLog(program) |