[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

pntsmooth Subroutine

Purpose

Turns point antialiasing on and off.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void pntsmooth(Int32 mode )

FORTRAN Syntax

SUBROUTINE PNTSMO(mode)
INTEGER*4 mode

Description

The pntsmooth subroutine allows the drawing of antialiased points in color map and RGB modes.

In RGB mode, the current color is blended with the contents of the frame buffer in a read-modify-write operation. That is, the new pixel color is a calculated blend of the old pixel color and the current color, based on the percentage of overlap of the point with the pixel.

In color map mode, the low-order 4 bits of the current color index are replaced with a value representing the pixel coverage. Therefore, a color ramp must be loaded, with the low-order 4 bits of the color ramp blending between the foreground and background colors.

Note: In order for antialiased lines and points to appear visually smooth, gamma correction MUST be performed. A gamma correction factor in the range of 2.4 to 2.7 is suggested. If gamma correction is not performed, lines do not appear smooth, but exhibit a roping or braiding effect, as if the line were composed of separate, intertwining strands. For more information on gamma-correcting antialiased lines, see "Smoothing Jagged Lines with Antialiasing" in GL3.2 Version 4 for AIX: Programming Concepts.

Parameter

mode Sets point-drawing mode as follows:
Mode Constants
C FORTRAN Description
SMP_ON SMPON Turns on point-antialiasing capabilities.
SMP_OFF SMPOFF Turns off point-antialiasing capabilities.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Notes:
  1. The 3-D Color Graphics Processor supports antialiased points only in color map mode. On this adapter, the value 0xf represents maximum pixel coverage, and 0x0 represents minimum pixel coverage. That is, the following color ramp should be loaded:
    3-D Color Graphics Processor Color Ramp
    Low-Order 4 Bits Ramp
    0000 (1/16) * foreground color + (15/16) * background color
    0001 (2/16) * foreground color + (14/16) * background color
    0010 (3/16) * foreground color + (13/16) * background color
    . . . . . . . . .
    1111 (16/16) * foreground color + (0/16) * background color
    For the 3-D Color Graphics Processor, the appearance of the intersections of color-index-mode antialiased lines and points can be significantly improved by setting the value of the  zsource subroutine to ZSRC_COLOR and the value of the zfunction subroutine to ZF_GREATER. Refer to the subsection on improving intersections within "Smoothing Jagged Lines with Antialiasing" in GL3.2 Version 4 for AIX: Programming Concepts for more details.
  2. The Supergraphics Processor supports antialiased points in RGB mode only.
  3. The POWER Gt4 and POWER Gt4x adapters do not support antialiased point rendering.
  4. When anti-aliased lines and points are drawn in RGB mode, a coverage factor (alpha value) for pixels on and near the anti-aliased objects is computed. This coverage factor is used to blend the color of the anti-aliased point or line with the contents of the frame buffer. The way in which the blending occurs is controlled by the blendfunction subroutine. When rendering anti-aliased objects in RGB mode, set the blendfunction to an appropriate value.
  5. The POWERgraphics GXT1000 supports anti-aliased point rendering in both color-index and RGB rendering modes.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Drawing vertex-based points with the bgnpoint subroutine.

Specifying the alpha blending ratio with the blendfunction subroutine.

Ending a series of vertex-based points with the endpoint subroutine.

Drawing a point with the pnt subroutine.

Controlling the placement of point, line, and polygon vertices with the subpixel subroutine.

Transferring a vertex to the graphics pipe with the v subroutine.

Smoothing Jagged Lines with Antialiasing, Understanding the Hardware Used by GL, Working in Color Map and RGB Modes, Performing Depth-Cueing, Reading and Writing Pixels.


[ Previous | Next | Contents | Glossary | Home | Search ]