mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fallback to old extensions API if NUM_EXTENSIONS errors
This commit is contained in:
parent
4f4e219e54
commit
1e3b08aae8
1 changed files with 5 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue