FW: pfBillboard

New Message Reply Date view Thread view Subject view Author view

From: Ran Yakir (ryakir++at++vizrt.com)
Date: 05/28/2001 06:21:13


And another thing I forgot - before drawing your rectangle you will have to
turn off writing t the depth buffer, using glDepthMask(0). so the procedure
becomes:

1. push the projection and modelview matrices
2. set the projection matrix with gluOrtho2D(-1.0, 1.0, -1.0, 1.0)
3. set the modelview matrix to identity
4. disable writing to depth buffer - glDepthMask(0)
5. draw your rectangle with texture using the corner coordinates (-1..1,
-1..1)
6. restore (pop) the matrices
7. enable depth buffer - glDepthMask(1)

Ran

> -----Original Message-----
> From: Ran Yakir
> Sent: Mon, May 28, 2001 3:18 PM
> To: 'Stephane Jaeger'; info-performer++at++sgi.com
> Subject: RE: pfBillboard
>
>
> Hi Stephane,
>
> You can force order by using pfDrawBins. Try the manpages on
> pfGeoSet::setDrawBin and pfChannel (where bins are being
> created and arranged).
> However, for your specific need, I wouldn't use a billboard
> and a geoset. In the vhannel draw callback, just before
> pfDraw(). You can
> 1. push the projection and modelview matrices
> 2. set the projection matrix with gluOrtho2D(-1.0, 1.0, -1.0, 1.0)
> 3. set the modelview matrix to identity
> 4. draw your rectangle with texture using the corner
> coordinates (-1..1, -1..1)
> 5. restore (pop) the matrices
>
> Ran
>
> > -----Original Message-----
> > From: Stephane Jaeger [mailto:stephane.jaeger++at++imag.fr]
> > Sent: Mon, May 28, 2001 1:02 PM
> > To: info-performer++at++sgi.com
> > Subject: pfBillboard
> >
> >
> > Hi,
> > I am using a pfBillboard node in my scene graph. I 'd like
> to use this
> > billboard to draw a kind of background pattern. That is the
> > reason why I
> > disable the depth buffer using a node callback on my billboard. The
> > trouble is that
> > I should force performer to draw this node first, before all
> > other nodes
> > in the scene graph - and I don't have any clue about how to do this.
> > Does anybody have an idea ?
> > Thanks a lot,
> > Stephane
> >
> > --------------------------------------------------------------
> > ---------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/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 2b29 : Mon May 28 2001 - 06:21:17 PDT

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