Magic of unit tests (Pinning down evaluator failure)


Sat down to write a test for the evaluator code. I'd gotten it to the point where it didn't crash the program a while ago, but it was not showing up in the tests/demos. Whittled down one of the tests into a simple unittest, getting rid of textures, lighting, etceteras, but couldn't come up with a decent check to say "it's working" without trying to process the resulting image.

As I was sitting down to write that (icky) test, I noticed that there was something showing up in the briefly-flashing window... made the brief flash wait for me to check it out... and there's something visible there. There was obviously a problem in the viewpoint setup, likely from the refactoring, the original code was Togl, this was a raw PyGame context... still, it was the only geometry being rendered, so that warped fragment must be a piece of the evaluator-generated geometry.

Tried to get the test to show it to me, but it doesn't work, every time I try to move the viewpoint I'm just losing the geometry again. Rewrote the code to work in OpenGLContext (which makes the context setup a little more sane and simple (and is what I normally use)) and there's the evaluator's result!

Apparently something else in the demo/test code was preventing the display, as the cut-down version seems to work as one would expect. Probably something like the texture-coordinate rendering... will see as I narrow down the search there.

Haven't tried to get the nurbs surfaces (e.g. molehill) tested yet, who knows, maybe it's working too :) .

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.