mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement GetActiveAttrib
This commit is contained in:
parent
150338503d
commit
34644401c6
3 changed files with 23 additions and 1 deletions
|
@ -167,6 +167,17 @@ impl WebGLProgram {
|
|||
WebGLActiveInfo::new(self.global().r(), size, ty, DOMString::from(name)))
|
||||
}
|
||||
|
||||
/// glGetActiveAttrib
|
||||
pub fn get_active_attrib(&self, index: u32) -> WebGLResult<Root<WebGLActiveInfo>> {
|
||||
let (sender, receiver) = ipc::channel().unwrap();
|
||||
self.renderer
|
||||
.send(CanvasMsg::WebGL(WebGLCommand::GetActiveAttrib(self.id, index, sender)))
|
||||
.unwrap();
|
||||
|
||||
receiver.recv().unwrap().map(|(size, ty, name)|
|
||||
WebGLActiveInfo::new(self.global().r(), size, ty, DOMString::from(name)))
|
||||
}
|
||||
|
||||
/// glGetAttribLocation
|
||||
pub fn get_attrib_location(&self, name: DOMString) -> WebGLResult<Option<i32>> {
|
||||
if name.len() > MAX_UNIFORM_AND_ATTRIBUTE_LEN {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue