Hi all,
I have this code:
canvas2 = mCreateCanvas(m4.windowWidth, m4.windowHeight, m4.WEBGL);
m4.setAttributes('antialias', true);
glCanvas = document.getElementById('defaultCanvas0').getContext('webgl');
glCanvas.disable(glCanvas.DEPTH_TEST);
which sometimes fails at that line:
glCanvas.disable(glCanvas.DEPTH_TEST);
because glCanvas is not defined. How can I wait until Canvas2 is defined in the DOM?