Re: point in bounding volume test
John Rohlf (jrohlf++at++tubes)
Mon, 7 Mar 94 12:11:01 PST
> 2. We are working on a stereo-application using quad buffers.
> There are two channels attached to a pipe which are linked together as
> a channel group. The draw callback switches left- and rightbuffers.
>
> The left and right eye view are set using
>
> pfChanViewMat(chanLeft, LeftEyeView);
> pfChanViewMat(chanRight, RightEyeView);
>
> and the frustum by
>
> pfMakePerspFrust( chanLeft, xminl, xmaxl, yminl, ymaxl );
> pfFrustAspect(chanLeft, PFFRUST_CALC_VERT, TableAspect);
> pfFrustNearFar( chanLeft, Z_Near, Z_Far );
>
> pfMakePerspFrust( chanRight, xminr, xmaxr, yminr, ymaxr );
> pfFrustAspect(chanRight, PFFRUST_CALC_VERT, TableAspect);
> pfFrustNearFar( chanRight, Z_Near, Z_Far );
>
> The view matrices and frustra are updated for every frame and this
> seems to be a problem.
>
> Everything works fine if pfMultiprocess(PFMP_APPCULLDRAW) or
> pfMultiprocess(PFMP_APP_CULLDRAW) is set, but using
> pfMultiprocess(PFMP_DEFAULT) causes a flickering view.
> The objects are moving correctly only the view is flickering.
> We kept the view matrices constant which doesn't help.
> Then we kept the frustra constant, only changing the view matrices
> which also doesn't help.
> Only if you keep the viewing matrices and the frustra constant
> then it works. Seems that the viewing information is not mp safe?
>
> It would be possible to keep the viewing matrices constant and to
> transform the objects into a fixed viewing coordinate system, but the
> viewing frustra have to be changed for each frame in our application.
>
> I had already a short discussion with Michael Jones and he wrote:
>
> >This is a multiprocessing problem. Use "passthrough" data and you
> >will be ok. Look and the pfPassChanData() man page for details on
> >this. Your data is changing before you use it.
>
> Shouldn't be the viewing information automatically copied
> into passthrough-buffers if I call pfFrame? So is it a bug or not?
> What should I put into passthrough data? I can't put the
> pfChannel itself into passthrough data. It is possible to do
> the stuff with GL-calls and pass-through data inside the
> draw callback but this is not the way it should be.
I had a flickering problem with my own stereo application.
It turned out to be an MP-related bug with caused only the
left buffer to be updated. Barring an unlikely bug,
Performer's viewing parameters are MP-safe so I would concentrate
on your application. First characterize the flickering:
- close each eye and see if only 1 of the left/right buffers is
being updated.
- close each eye and see if both buffers are being updated but
1 of the buffers has a bogus viewing transform.
- put printf's in your draw callback and print out the viewing
and projection matrices and the current left/right buffer to
make sure you are toggling them.
You can also send me your code and I will check it out.
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:50:11 PDT