Skip to content

Commit

Permalink
Fallback to old extensions API if NUM_EXTENSIONS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Sep 3, 2019
1 parent 4f4e219 commit 1e3b08a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/canvas/webgl_thread.rs
Expand Up @@ -1727,6 +1727,11 @@ impl WebGLImpl {
unsafe {
gl.get_integer_v(gl::NUM_EXTENSIONS, &mut ext_count);
}
// Fall back to the depricated extensions API if that fails
if gl.get_error() != gl::NO_ERROR {
chan.send(gl.get_string(gl::EXTENSIONS)).unwrap();
return;
}
let ext_count = ext_count[0] as usize;
let mut extensions = Vec::with_capacity(ext_count);
for idx in 0..ext_count {
Expand Down

0 comments on commit 1e3b08a

Please sign in to comment.