Skip to content

Commit

Permalink
check for webgl support by creating a context
Browse files Browse the repository at this point in the history
fix #677
  • Loading branch information
ansis committed Aug 8, 2014
1 parent 5efd3a1 commit 152c058
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/util/browser/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ exports.supported = function() {
if ('supportsContext' in canvas) {
return canvas.supportsContext('webgl') || canvas.supportsContext('experimental-webgl');
}
return !!window.WebGLRenderingContext;
return !!window.WebGLRenderingContext &&
(!!canvas.getContext('webgl') || !!canvas.getContext('experimental-webgl'));
},

function() { return 'Worker' in window; }
Expand Down

0 comments on commit 152c058

Please sign in to comment.