Khronos' debugging script

Hi,
I did everytnig like it’s described here: http://khronos.org/webgl/wiki/Debugging but it seems to doesn’t work.
-I added manually gl.getError function to my draw function and I noticed I had several errors but Khronos’ script didn’t log anything.
Does anybody use it (and does it work for him)?

Thanks,
gliniak (wglb)

Hi there,

the script is doing something for me, but it is not really usefull, because it doesn’t accept neccessary function calls:

“gl.createShader is not a function”

I used it on a very minimal example and without the script everything works.

Can someone please clearify?

Thank you,
Silvio.

figured it out.

It was a bad idea to try to use it this way:


 for (ii = 0; ii < names.length; ++ii) {
        try {
         //   context = canvas.getContext(names[ii], opt_attribs);
            context = WebGLDebugUtils.makeDebugContext(canvas.getContext(names[ii]));
        } catch(e) {}
        if (context) {
            break;
        }
    }

of course, I got a debugging context without a gl context this way.


    gl = WebGLDebugUtils.makeDebugContext(WebGLUtils.setupWebGL(canvas));

works.