Re: Multiple calls to pfDraw()

New Message Reply Date view Thread view Subject view Author view

Mario Veraart (rioj7++at++fel.tno.nl)
Thu, 4 Jun 1998 12:33:52 +0200 (MET DST)


>
>
> Hi friends,
>
> I have a question for the experts out there. Sorry if this is an already
> thrashed issue on this group. I couldn't find any references to this
> issue in the FAQ.
>
> I am trying to write a driver for a stereo display device that takes the
> odd video lines as left-eye input and the even ones as right-eye input.
> I modified the perfly Draw callback to set the channel view to the left
> eye location first, call pfDraw(). This is immediately followed by a
> change of channel view to the right eye location/angle and a second
> call to pfDraw(). {OpenGL stencil bits are used with appropriate stencil
> function to make sure the first call writes only the odd lines and
> vice versa).
>
> This scheme, unfortunately, doesn't work well. Both pfDraw() calls seem
> to draw it to the right eye, strangely. I am sure I am missing something
> and would appreciate to be enlightened. Thank you.
>
> Is there any relevant sample code out there that makes multiple calls
> to pfDraw() within the Draw callback, as in multisample antialiasing?
> On a related note, are there examples of drivers for this style of
> stereo and/or the standard SGI style of stereo for the Performer?
>

A call to pfDraw() does not cull the scene it merely sends the
commands to the graphics pipeline that cull has determined and sorted.
The problem is that you need to cull the scene two times. One for every eye.
You should define two channels that overlap w.r.t. the viewport but
that have different settings for the viewpoint (left-right).
In the drawcallback you setup the stencil operation depending on the
channel that is to be drawn or you define two separate draw callback
functions, one for each channel. You only call pfDraw ones in the draw
callback.

Mario

> Thanks in advance!
>
> PJN
>
> ---
> Centre for Artificial Intelligence and Robotics +91 80 226 5609 (Phone)
> Raj Bhavan Circle, High Grounds +91 80 225 5615 (Fax)
> Bangalore 560 001, INDIA
> URL: http://www.cair.res.in/~pjn pjn++at++cair.res.in
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:30 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.