webgl: Check shader compilation status on use_program.

This commit is contained in:
Emilio Cobos Álvarez 2016-01-04 14:17:10 +01:00
parent cf479a2b4f
commit 4092ffd245
3 changed files with 20 additions and 3 deletions

View file

@ -147,6 +147,10 @@ impl WebGLShader {
pub fn set_source(&self, source: DOMString) {
*self.source.borrow_mut() = Some(source);
}
pub fn successfully_compiled(&self) -> bool {
self.compilation_status.get() == ShaderCompilationStatus::Succeeded
}
}
impl Drop for WebGLShader {