Implement GetActiveAttrib

This commit is contained in:
David Zbarsky 2016-04-02 20:35:04 -07:00
parent 150338503d
commit 34644401c6
3 changed files with 23 additions and 1 deletions

View file

@ -827,6 +827,17 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
})
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn GetActiveAttrib(&self, program: Option<&WebGLProgram>, index: u32) -> Option<Root<WebGLActiveInfo>> {
program.and_then(|p| match p.get_active_attrib(index) {
Ok(ret) => Some(ret),
Err(error) => {
self.webgl_error(error);
None
},
})
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
fn GetAttribLocation(&self, program: Option<&WebGLProgram>, name: DOMString) -> i32 {
if let Some(program) = program {