We currently don't handle all GL errors. It might be fine for the _happy_ path, but when the browser has a bug, it will crash the all app. See comments `// TODO: Remove cast and handle the error somehow.` for places that needs to be changed.