Re: Stencil question

New Message Reply Date view Thread view Subject view Author view

Nicolas Gauvin (nicolas++at++cae.ca)
Thu, 29 May 1997 18:49:16 -0400


On May 29, 6:30pm, Joaquin Casillas Melendez wrote:
> Subject: Stencil question
> Hi all!
> I am trying to draw an objet over a given plane, and I don't want the
> object to be drawn outside the limits of the plane. In opengl this can be
> achieved by drawing the plane (floor) and at the same time writing a
> certain value to the stencil buffer. Then, in the draw routine, the
> object will be drawn only over the pixels with that a certain value.
>
> I don't know the way to do this in Performer, so any help would be
> appreciated.
>

You can use a pfLayer node for this with mode PFDECAL_BASE_STENCIL.
The first child of a pfLayer is drawn first and acts as the base.
It sets the stencil based on the depth test result. The other children
are drawn right after and appears only where the stencil is 1.

-- 
Nicolas Gauvin              CAE Electronics Ltd., 8585 Cote De Liesse
3D Graphics Software        Saint-Laurent, Quebec, Canada, H4L-4X4
nicolas++at++cae.ca              Tel: (514) 341-2000 x2275, Fax: (514) 340-5496 
=======================================================================
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:55:19 PDT

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