mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make gl.useProgram(null) do the right thing
This commit is contained in:
parent
fc593c68c5
commit
15389586d9
5 changed files with 9 additions and 23 deletions
|
@ -130,19 +130,6 @@ impl WebGLProgram {
|
|||
Ref::map(self.active_attribs.borrow(), |attribs| &**attribs)
|
||||
}
|
||||
|
||||
/// glUseProgram
|
||||
pub fn use_program(&self) -> WebGLResult<()> {
|
||||
if self.is_deleted() {
|
||||
return Err(WebGLError::InvalidOperation);
|
||||
}
|
||||
if !self.linked.get() {
|
||||
return Err(WebGLError::InvalidOperation);
|
||||
}
|
||||
|
||||
self.renderer.send(WebGLCommand::UseProgram(self.id)).unwrap();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// glValidateProgram
|
||||
pub fn validate(&self) -> WebGLResult<()> {
|
||||
if self.is_deleted() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue