Make gl.useProgram(null) do the right thing

This commit is contained in:
Anthony Ramine 2018-07-05 09:40:22 +02:00
parent fc593c68c5
commit 15389586d9
5 changed files with 9 additions and 23 deletions

View file

@ -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() {