Skip to content
Permalink
Browse files

Fallback to old extensions API if NUM_EXTENSIONS errors

  • Loading branch information...
asajeffrey committed Sep 3, 2019
1 parent 4f4e219 commit 1e3b08aae847915b48416f366fc755049e9ac03d
Showing with 5 additions and 0 deletions.
  1. +5 −0 components/canvas/webgl_thread.rs
@@ -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 {

0 comments on commit 1e3b08a

Please sign in to comment.
You can’t perform that action at this time.