on master help sign in
Add fallback to WebGL initialisation
commite4fe20b313ad984f3ae538e85ddc6b203eb2cba3 authorAlexander Foremny <aforemny@nomath.org> dateMon 25 Nov 2013, 10:53 (13 years ago) parentf53384a
1 file changed+1−1
libraries/Native/Graphics/WebGL.js+1−1
libraries/Native/Graphics/WebGL.js+1−1
@@ -139,7 +139,7 @@ Elm.Native.Graphics.WebGL.make = function(elm) {
139139
140140 function makeGL(w,h) {
141141 var node = newNode('canvas');
142− var gl = node.getContext('webgl');
142+ var gl = node.getContext('webgl') || node.getContext('experimental-webgl');
143143 var programPtr = createProgram(gl, geoVert, geoFrag);
144144 var vertexPositionAttribute = gl.getAttribLocation(programPtr,'aVertexPosition');
145145 var vertexColorAttribute = gl.getAttribLocation(programPtr,'aVertexColor');