PDA

View Full Version : Khronos' debugging script



wglb
10-09-2010, 01:56 PM
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)

einSelbst
01-19-2011, 09:44 AM
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.

einSelbst
01-20-2011, 07:47 PM
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.setupW ebGL(canvas));


works.