pntsmooth(3G) pntsmooth(3G)
pntsmooth - specify antialiasing of points
void pntsmooth(mode)
unsigned long mode;
mode expects one of two values:
SMP_OFF defeats antialiasing of points (default).
SMP_ON enables antialiasing of points. It can be modified by an
optional symbolic constant:
SMP_SMOOTHER indicates that a higher quality filter should be used
during point drawing. This filter typically requires that more
pixels be modified, and therefore potentially reduces the rate at
which antialiased points are rendered.
The constant SMP_SMOOTHER is specified by bitwise ORing it, or by adding
it, to SMP_ON. For example:
pntsmooth(SMP_ON + SMP_SMOOTHER);
enables antialiased point drawing with the highest quality, and
potentially lowest performance, algorithm. The modifier is a hint, not a
directive, and is therefore ignored by systems that do not support the
requested feature.
pntsmooth controls the capability to draw antialiased points. You can
draw antialiased points in either color map mode or RGB mode.
For color map antialiased points to draw correctly, you must initialize a
16-entry colormap block (whose lowest entry location is a multiple of 16)
to a ramp between the background color (lowest index) and the point color
(highest index). Before drawing points, clear the area to the background
color.
The pntsmooth hardware replaces the least significant 4 bits of the
current color index with bits that represent pixel coverage. Therefore,
by changing the current color index (only the upper 8 bits are
significant) you can select among many 16-entry color ramps, representing
different colors and intensities. You can draw depthcued antialiased
points in this manner.
The z-buffer hardware can be used to improve the quality of color map
antialiased point images. Enabled in the standard depth-comparison mode,
it ensures that points nearer the viewer obscure more distant points.
Alternately, the z-buffer hardware can be used to compare color values by
Page 1
pntsmooth(3G) pntsmooth(3G)
issuing:
zbuffer(TRUE);
zsource(ZSRC_COLOR);
zfunction(ZF_GREATER);
Pixels are then replaced only by 'brighter' values, resulting in better
intersections between points drawn using the same ramp.
RGB antialiased points can be drawn only on machines that support
blending. For these points to draw correctly, the blendfunction must be
set to merge new pixel color components into the framebuffer using the
incoming (source) alpha values. Incoming color components should always
be multiplied by the source alpha (BF_SA). Current (destination) color
components can be multiplied either by one minus the source alpha
(BF_MSA), resulting in a weighted average blend, or by one (BF_ONE),
resulting in color accumulation to saturation; issue:
blendfunction(BF_SA, BF_MSA); /* weighted average */
or
blendfunction(BF_SA, BF_ONE); /* saturation */
The pntsmooth hardware scales incoming alpha components by an 8-bit
computed coverage value. Therefore reducing the incoming source alpha
results in transparent, antialiased points.
RGB antialiased points draw correctly over any background image. It is
not necessary to clear the area in which they are to be drawn.
Both color map and RGB mode points are antialiased effectively only when
subpixel mode is enabled; issue:
subpixel(TRUE);
The size of antialiased points is controlled by pntsize and pntsizef.
Although point size can be arbitrarily specified, only a small, hardware
specific number of point sizes is actually supported. (Refer to the
pntsize manpage.)
The modifier SMP_SMOOTHER can be ORed or ADDed to the symbolic constant
SMP_ON when antialiased points are enabled. When this is done, a higher
quality and potentially lower performance filter is used to scan convert
antialiased points. SMP_SMOOTHER is a hint, not a directive. Thus a
higher quality filter is used only if it is available.
Page 2
pntsmooth(3G) pntsmooth(3G)
bgnpoint, blendfunction, endpoint, gversion, pntsize, linesmooth,
subpixel, v, zbuffer, zfunction, zsource
This routine does not function on IRIS-4D B or G models, or on the
Personal Iris. Use gversion to determine which type you have.
IRIS-4D GT and GTX models, as well as the Personal Iris, Iris Entry,
Indy, XL, XS, XS24, XZ, Elan and Extreme systems do not support
SMP_SMOOTHER. These systems ignore this hint.
Iris Entry pntsmooth support is only valid for color index mode.
Color-comparison z-buffering is not supported on the IRIS-4D GT or GTX
models.
PPPPaaaaggggeeee 3333 [ Back ]
|