separate webgl capability detector in main.js, keep track