Two gl questions
Phil Dykstra
phil at BRL.MIL
Thu Mar 15 17:30:47 AEST 1990
I have two questions about libgl of the form "is there a better way, and
if not it sure would be nice if there was."
1) Two sided polygons.
I am trying to draw lighted, two sided, Z buffered polygons. The key
is that the surface is not closed, but I would like to have more than
just an ambient component on the back side. The solution I have come
up with is to draw every polygon twice, once CW, once CCW. Since they
are coincident the Z buffer would yield unpredictable results, so I
have turned backface culling on.
This works pretty well, but requires sending twice as much data down
the pipe, as well as making the processing of tmeshes messier. Is
there a better way to do this? Something I would find very nice is
a MATERIAL and/or LMODEL level selection of double sided polygons.
This would simply entail flipping the normal vectors if the lighting
model dot products came up negative. The required bandwidth into the
pipe would remain the same, and the rendering time should be nowhere
near twice as long.
2) Fat points.
On high res screens, individual pixels have become so small and faint as
to be almost invisible (at least in colors less than full white). None
the less, point clouds are still a very useful way to look at data sets.
Is there some way to draw a fat (i.e. multi-pixel) point? The key is
something which is scale invariant. The linewidth control behaves in
exactly the right way, but is only thick in one dimension (so drawing
a zero length line doesn't solve the problem). A "pointwidth(n)" call
would be perfect.
===
Is support for these operations already there somewhere, or would they
require microcode changes? Any comments/suggestions are welcome.
- Phil
<phil at brl.mil>
uunet!brl!phil
More information about the Comp.sys.sgi
mailing list