In
function init() { canvas.removeEventListener(‘mousemove’, mouseMoveHandler, false); ... mouseUniformLocation = gl.getUniformLocation(program, “uMouse”); ... function mouseMoveHandler(event) { gl.uniform2f(mouseIniformLocation, event.x, event.y); } canvas.addEventListener(‘mousemove’, mouseMoveHandler, false); ...
do you really need the first line? Since the handler is no longer
an anonymous function, it should use the current value of
mouseUniformLocation when called.
I think this is a very useful document. Thanks for preparing it.
Regards
-Mark
I just got through updating all the demos on the Khronos WebGL SDK to handle context lost
I wrote up some of the issues I ran into and their solutions and put them on the WebGL Wiki here
I hope that's useful.
-gregg