Text archives Help
- From: Roni Choudhury <roni@cs.utah.edu>
- To: manta@sci.utah.edu
- Subject: [Manta] discussion time
- Date: Mon, 15 Oct 2007 11:53:00 -0600
So I ran into some trouble yesterday, and Abe helped me resolve the
problem, but it left some questions on my mind.
I'm embedding Manta in a Qt application (so that it can do OpenGL
rendering as well), and I'm looking at particle data that comes in
several timesteps. For each timestep I build a Group that contains
primitives representing its data. I create an acceleration structure
that controls that group, and then I have my Scene own the AS for the
first timestep. When I generate a Qt signal to "go to next timestep", I
call Scene::setObject() with the appropriate AS pointer. (Don't worry,
I do that in a transaction...more on that later).
The problem was that after the transaction posted, the rendering threads
would crash due to a null LightSet, which Abe finally helped me figure
out was happening because the timestep Group I had just switched to had
never called preprocess(). I fixed this by hacking up an appropriate
PreprocessContext and calling preprocess() explicitly on each Group
before launching the raytracer itself.
Here's my question: shouldn't things like Groups know that they haven't
been preprocessed and do it automatically before they get rendered? I
only ask this because for a long while this scene I've been describing
just worked, and last night it took me two hours of debugging, plus
another hour with Abe, to find and fix the problem. Did something
change recently? Or was I just lucky before?
My other issue is with transactions. To reduce programmer burden, I
think it would make sense if "transactable" methods were made private,
and then the few methods/functions where it makes sense to call those
methods directly were friended to the class. That way there would be
compile-time protection against committing what is essentially a fatal
error that causes byzantine failure. Is this possible from a practical
standpoint? Would it complicate the lives of millions of users/developers?
Thanks guys!
roni
- [Manta] discussion time, Roni Choudhury, 10/15/2007
Archive powered by MHonArc 2.6.16.