acbuf(3G)

acbuf - operate on the accumulation buffer

As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.

NAME
     acbuf - operate on the accumulation buffer

FORTRAN SPECIFICATION
     subroutine acbuf(op, value)
     integer*4 op
     real value

PARAMETERS
     op      expects one of six symbolic constants:

             ACCLR:  The red, green, blue, and alpha accumulation buffer
             contents are all set to value (rounded to the nearest integer).
             value is clamped to the range of the accumulation buffer.

             ACACCU:  Pixels are taken from the current readso bank (front,
             back, or zbuffer).  If this buffer has color component
             resolutions of other than 8 bits, the components are rescaled to
             the range [0,255].  Then the red, green, blue, and alpha
             components are each scaled by value.  The resulting pixels are
             added to the pixels already present in the accumulation buffer.
             The range of value is -256 through 256.  Arguments outside this
             range are clamped to it.  Accumulated values are NOT clamped to
             the range of the accumulation buffer.  Thus overflow is avoided
             only by limiting the range of accumulation operations.

             ACCLRA:  An efficient combination command whose effect is to
             first clear the accumulation buffer contents to zero, then add as
             per ACACCU Ranges and clamping are as per ACACCU

             ACRETU:  Pixels are taken from the accumulation buffer.  Their
             red, green, blue, and alpha components are each scaled by value,
             then clamped to the range [0,255].  The resulting 8 bit per
             component pixels are then scaled to the range of the currently
             enabled drawing buffers (front, back, or zbuffer) and written to
             these buffers.  All special pixel operations (zbuffer,
             blendfunction, logicop, stencil, texture mapping, etc.) are
             ignored during this transfer.  Destination values are simply
             replaced.  The operation is limited by the current viewport and
             screenmask, however.  The range of value is 0.0 through 1.0.
             Arguments outside this range are clamped to it.

             ACMULT:  The red, green, blue, and alpha components of each
             accumulation buffer pixel are scaled by value.

             ACADD:  value is added to each red, green, blue, and alpha
             component of each pixel in the accumulation buffer.

     value   expects a float point value.  op determines how value is used.
DESCRIPTION
     The accumulation buffer is a bank of high resolution pixels, typically 12
     or more bits for each of red, green, blue, and alpha, that is mapped 1-
     to-1 with screen pixels.  (See acsize.)  Pixel images stored in the
     normal framebuffer can be added to the accumulation buffer.  These pixels
     are scaled during the transfer by a floating-point value (of limited
     range and resolution).  Later, the accumulated image can be returned to
     the normal frame buffer, again while being scaled.

     Effects such as antialiasing (of points, lines, and polygons), motion-
     blur, and depth-of-field can be created by accumulating images generated
     with different transformation matrixes.  Predictable effects are possible
     only when subpixel mode is TRUE (see subpixel).

     readso mode is shared with other pixel read operations, including lrectr
     and rectco.  rectzo however, has no effect on accumulation operation.

     All accumulation buffer operations are limited to the area of the current
     screenmask, which itself is limited to the current viewport.

     The accumulation buffer is a part of the normal framebuffer.  acbuf
     should be called only while draw mode is NORMAL, and while the normal
     framebuffer is in RGB mode.

SEE ALSO
     acsize, drawmo, subpix, scrmas

NOTES
     An error is reported, and no action is taken, if accumulate is called
     while acsize is zero.