Alpha blending ...
Robert Skinner
robert at texas.esd.sgi.com
Thu Sep 6 03:10:56 AEST 1990
In article <1990Sep5.151623.12906 at ux1.cso.uiuc.edu>,
gautamm at kandinsky.ncsa.uiuc.edu (Gautam Mehrotra) writes:
|> Is there any way I can use the alpha blending hardware to display
|> a possibly intersecting set of polygons ?? Since the polygons
|> can intersect, I have no way of properly ordering them in z ...
|>
|>
|> thanks,
|> gautam
I can only assume from the phrase "no way of properly ordering them in z",
that you are doing hidden surface elimination with the painter's algorithm,
where you paint every polygon from the farthest to the nearest.
You should use Z-buffering instead. The Z buffer does hidden surface
elimination at each individual pixel, so intersecting primitives are
no problem. Its a snap to use, just do this
zbuffer( TRUE );
gconfig();
after you open the window, and call zclear() after clear().
The GT does z-buffering as fast as regular polygons, and there is no
need to sort your primitives by depth, so your program should run
faster.
Hope this helps,
Robert Skinner
robert at sgi.com
They are your parent's worst nightmare --
because they ARE your parents.
- Radio add about the Jefferson Airplane
reunion concert, Berkeley, Sept '89
More information about the Comp.sys.sgi
mailing list