###############################################################################
# #
# Copyright © 1989-1991 by Artificial Horizons®, Inc. All rights reserved. #
# #
# This material constitutes the trade secrets and confidential, #
# proprietary information of Bruce Factor and Curtis Priem, and is #
# under license to Artificial Horizons, Inc. The material is not #
# to be disclosed, reproduced, copied, or used in any manner not #
# permitted under license from Artificial Horizons, Inc. For more #
# information email "ahi-interest@ahi.com". #
# #
###############################################################################
FBPUTA(3G) AVIATOR GRAPHICS INTERFACE FUNCTIONS FBPUTA(3G)
NAME
fbputa, fbgeta - get or put frame buffer's attribute
SYNOPSIS
#include <agi.h>
void fbputa(fbp, type, value)
register Fbuffer fbp;
register int type, value;
int fbgeta(fbp, type)
register Fbuffer fbp;
register int type;
DESCRIPTION
fbputa() sets the attribute type to value in the frame buffer fbp.
fbgeta() gets the attribute type from the frame buffer fbp.
ATTRIBUTES
type may be one of the following when using fbputa() or fbgeta():
FB_ATTR__BG_COLOR Puts or gets background color. Bit 0
corresponds to plane 0 in the frame buffer.
Initial value: 0xfe
FB_ATTR__FG_COLOR Puts or gets foreground color. Bit 0
corresponds to plane 0 in the frame buffer.
Initial value: 0xff
FB_ATTR__PIXEL_MASK Puts or gets pixel write mask. Bit 31
corresponds to the left most pixel of the 32
bit repeating pixel write mask in the frame
buffer. A bit set to 1 allows the pixel to be
written.
Initial value: 0xffffffff
FB_ATTR__PLANE_MASK Puts or gets plane write mask. Bit 0
corresponds to plane 0 in the frame buffer. A
bit set to 1 allows the plane to be written.
Initial value: 0xff
FB_ATTR__ROP Puts or gets the current boolean raster
operation. For each plane n, the new bit n of
the destination pixel is the ROP attribute's
bit m which matches the the foreground color,
background color, source pixel, and
destination pixel of the following table.
Initial value: 0xfc30
ROP[m] FCOLOR[n] BCOLOR[n] SOURCE[n] DESTIN[n]
------ --------- --------- --------- ---------
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
FB_ATTR__ROP_LINEAR Puts or gets the raster operation type. A
value of 0 causes all ROPs to be boolean and a
value of 1 causes all ROPs to be linear.
Initial value: 0
FB_ATTR__ROP_SUBTRACT Puts or gets the linear raster operation plot
mode. A value of 0 causes linear ROPs to be
done with addition (plot) and a value of 1
causes linear ROPs to be done with subtraction
(unplot).
Initial value: 0
FB_ATTR__ANTIALIASING Puts or gets the anti-aliasing mode. A value
of 0 causes normal rendering to be done and a
value of 1 causes rendering to be done with
high resolution antialiasing. Anti-aliasing
is normally used with FB_ATTR__ROP_LINEAR
attribute and does not work with blits or 8
bit rasters.
Initial value: 0
FB_ATTR__GRAB_OFFSCREEN Puts or gets the frame buffer's offscreen
memory grab status. If the offscreen memory
of the frame buffer is not grabbed, OW3 will
use it for save behinds and retained rasters.
A value of 0 causes the windowing system to
use the offscreen memory and a value of 1
causes agi to grab the offscreen memory from
the server. Grabs occur during fblock().
Ungrabs occur during fbunlock() and fbclose().
Initial value: 0
FB_ATTR__FAST_BOWTIES Puts of gets the fast bowtie mode. A value of
0 causes all bowties to be rendered by
software with pixel perfection. A value of 1
causes all bowties to be rendered by hardware
but will not be pixel perfect.
Initial value: 0
type may be one of the following when using fbgeta():
FB_ATTR__SCAN_LINE Gets the line number where the scanning beam
is. The top line of the screen is 0,
increasing downward. The scan line may be
negative indicating the beam is in vertical
blanking.
FB_ATTR__VERTICAL_BLANK Gets the vertical blank status bit. If the
the scan line is in vertical blanking a 1 is
returned, if it is not it returns a 0.
FB_ATTR__BUSY Gets the busy (currently rendering) status
from the frame buffer.
FB_ATTR__FLIPPING Gets the flipping (switching double buffer
display buffer) status from the frame buffer.
FB_ATTR__VERSION_HW Gets the version of the frame buffer hardware.
FB_ATTR__VERSION_SW Gets the version of AGI software.
ERRORS
If type is an illegal, the internal fberrno is set. fberrno can be
read using fberror(3G) and fbperror(3G).
SEE ALSO
fbclose(3G), fberror(3G), fblock(3G), fbunlock(3G), fbperror(3G)
NOTES
For legal boolean ROP values, see Specifying a RasterOp Function in
4.1 Pixrect Reference Manual.
For detailed information on how to use boolean ROPs, refer to US
Patent #4,958,146, "Multiplexor Implementation for Raster Operations
Including Foreground and Background Colors".
For detailed information on how to use linear ROPs, plot/unplot modes,
and setup the color map for use with linear ROPs, refer to US Patent
#4,908,780, "Anti-aliasing Raster Operations Utilizing Sub-pixel
Crossing Information to Control Pixel Shading".
PERFORMANCE
fbp should be declared a register.
type should be a constant.
fbgeta() should be used as little as possible.
FB_ATTR__FCOLOR is the fastest of the attributes, it produces inline
code while the other attributes produce a subroutine call.
FB_ATTR_ROP also produces inline code.
AGI Release 1.8 Last change: 25 December 1991