|
|
|
|
|
|
237
|
h = canvas.height = window.innerHeight;
|
237
|
h = canvas.height = window.innerHeight;
|
|
238
|
gl.viewport(0, 0, w, h);
|
238
|
gl.viewport(0, 0, w, h);
|
|
239
|
gl.uniform2f(iResolution, w, h);
|
239
|
gl.uniform2f(iResolution, w, h);
|
|
240
|
gl.clearColor(0.0, 0.0, 0.0, 1.0);
|
|
|
|
241
|
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
|
|
242
|
render();
|
240
|
render();
|
|
243
|
};
|
241
|
};
|
|
244
|
|
242
|
|
|
245
|
render();
|
243
|
render();
|
|
246
|
} catch (e) {
|
244
|
} catch (e) {
|
|
247
|
//alert(e);
|
|
|
|
248
|
var msg = document.createElement("pre");
|
245
|
var msg = document.createElement("pre");
|
|
249
|
msg.style = "color: red; position: absolute; right: 0; bottom: 0";
|
246
|
msg.style = "color: red; position: absolute; right: 0; bottom: 0";
|
|
250
|
msg.textContent = e;
|
247
|
msg.textContent = e;
|