Re: 2-D Overlay

New Message Reply Date view Thread view Subject view Author view

Allan Schaffer (aschaffe)
Tue, 14 Jun 1994 13:30:22 -0700


On Jun 14, 9:09am, William Briggs wrote:
> I am using IRIX 4.0.5 and Performer 1.0 on a SkyWriter (no RE...yet :^)
>
> Is it possible to do a two-dimensional overlay in a channel? Up until
> now, I have drawn a crosshair with a draw callback. I transform to the
> viewpoint and then in front of it. However, roundoff error causes the
> crosshair lines to wiggle, forcing me to put them farther away. With
> them farther away, they interact with the terrain, dissapearing behind
> it when the viewpoint is too close.

You might try changing the Z buffer state right before and after you
draw the crosshairs. This will force them to always be drawn "over"
the scene.

        pfDraw();
        ...
        zfunction(ZF_ALWAYS);
        zwritemask(0x0);
        draw crosshairs
        zfunction(ZF_LEQUAL);
        zwritemask(0xffffffff);

Allan

-- 
Allan Schaffer
Silicon Graphics
aschaffe++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:50:20 PDT

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