Ive run into this issue + cant use gl.getError(); to narrow down my search of where its occuring, since it doesnt work correctly. hmm perhaps I can use glFinish();
Are there any debuggers for webGL like there is with opengl?
setup() {
// error is happening here somewhere
gl.getError(); // BUT no error gets reported here
setInterval(loop, 1000.0/60.0 );
gl.getError(); // no error
// no code after this
}
loop() {
gl.getError(); // error gets reported here
}
Having getError directly after setInterval makes no sense, because loop() will be called asyncchronously after 1000.0/60.0 miliseconds.
For debugging javascript - you can use webinspector (for webkit) or firebug (for firefox - but I’m not sure if it’s available for ff beta) - you can create breakpoint by writing