/****
 *
 * Copyright (c) 1988 by Sun Microsystems, Inc.
 * @(#)sh_FBCTX.ah 1.9 88/11/07 Copyright 1988 Sun Micro
 *
 * CONTEXT class attributes (common to all devices)
 *
 ****/
   OBJ_KEY		ctx_KEY;		/* general context key */
   RASTER		CTX_RASTER;		/* window */
   char			CTX_ERROR;		/* error code */
   char			CTX_TYPE;		/* context type */
   CTX_shade		CTX_SHADE : 8;		/* shading */
#ifndef	NO_VDC
   CTX_vdc_map		CTX_VDC_MAP : 8;	/* VDC mapping */
#endif
   CTX_path_render	CTX_PATH_CONSTRUCT;	/* path construction options */
   CTX_path_render	CTX_PATH_RENDER;	/* path rendering options */
   CTX_area_style	CTX_AREA_STYLE;		/* area properties */
   CTX_fill_style	CTX_FILL_STYLE;		/* filling styles */
   CTX_rop		CTX_ROP;		/* current raster-op */
   CTX_plane_enable	CTX_PLANE_ENABLE;	/* raster plane enable mask */
   CTX_line_cap		CTX_LINE_CAP;           /* line cap */
   CTX_line_join        CTX_LINE_JOIN;  	/* line join */
   CTX_line_style	CTX_LINE_STYLE;		/* line style */
   float		CTX_LINE_SIZE;		/* line size (world units) */
   float		CTX_MITER_LIMIT;	/* miter limit */
   PATTERN		CTX_LINE_PATTERN;	/* line pattern */

   COLOR		CTX_COLOR;		/* current color */
   COLOR		CTX_BACK_COLOR;		/* background color */
   TRANSFORM		CTX_VIEW_TRANSFORM;	/* view transformation */
#ifndef	NO_MODEL
   TRANSFORM		CTX_MODEL_TRANSFORM;	/* model transformation */
#endif
#ifndef	NO_VDC
   TRANSFORM		CTX_VDC_TRANSFORM;	/* VDC transformation */
#endif
   RASTER		CTX_FILL_RASTER;	/* texture/stipple raster */
   POINT		CTX_FILL_ORG;		/* texture/stipple origin */
   PATH			CTX_PATH;		/* current path */
   PATH			CTX_CLIP_PATH;		/* clip path */
   POINT		CTX_PATH_RASTER_PEN;	/* last path point (raster) */
   POINT		CTX_PATH_PEN;		/* last path point (user) */
   POINT		CTX_PEN;		/* pen in user coords */
   POINT		CTX_RASTER_PEN;		/* pen in raster coords */
   POINT		CTX_CLIP_ORG;		/* origin of clip area */
   POINT		CTX_CLIP_DIM;		/* dimensions of clip area */
/*
 * Keys
 * context clip key updated when the following attributes change:
 *   CTX_CLIP_ORG, CTX_CLIP_DIM, CTX_VDC_MAP,
 *   CTX_VDC_TRANSFORM, CTX_CLIP_PATH
 */
   OBJ_KEY	ctx_clip_key;		/* context clip attributes */
/*
 * Path Construction Information
 */
   PATH_POINT	*ctx_buf_top;		/* -> top of buffer */
   PATH_POINT	*ctx_buf_ptr;		/* -> current buffer position */
   PATH_POINT	*ctx_buf_end;		/* -> end of buffer */
/*
 * Transforms
 */
   TRANSFORM	ctx_trans_construct;	/* path construction transform */
#ifndef	NO_RTM
   TRANSFORM	ctx_trans_render;	/* rendering transform */
#endif	/* NO_RTM */
   TRANSFORM	ctx_trans_mv;		/* model/view transform concatenated */
   TRANSFORM	ctx_trans_crtm;		/* construct/render concatenated */
/*
 * Curve information
 */
   char		ctx_curve_form;		/* curve form */
   char		ctx_curve_order;	/* curve order */
/*
 * Rendering context
 */
   unsigned char	ctx_pipe_type;		/* pipeline type */
   unsigned char	ctx_pipe_disp;		/* pipeline dispatch */
   unsigned char	ctx_draw_disp;		/* drawing set selector */
   unsigned char	ctx_flags;		/* assorted flags */

#ifndef	SH_SMALL
/*
 * 3D attributes
 */
   char			CTX_FRAME;		/* frame buffer selected */
   CTX_hidden_surf	CTX_HIDDEN_SURF : 8;	/* hidden surface */
   CTX_dbuf_stat	CTX_DBUF_STAT : 8;	/* double buffering mode */
   CTX_clip_planes	CTX_CLIP_PLANES;	/* clip planes */
   CTX_pick_id		CTX_PICK_ID;		/* pick identifier */
   int			CTX_PICK_COUNT;		/* pick count */
   POINT		CTX_PICK_ORG;		/* pick area origin */
   POINT		CTX_PICK_DIM;		/* pick area dimensions */
   float		CTX_AMBIENT;		/* ambient light */
   float		CTX_DIFFUSE;		/* diffuse reflection */
   float		CTX_SPECULAR;		/* specular reflection */
   float		CTX_TRANSPARENCY;	/* transparency */
   float		CTX_SPEC_POWER;		/* specular power */
   LIGHTS		CTX_LIGHTS;		/* light source group */

   POINT_F3D		ctx_vtx_normal;		/* current vertex normal */
   POINT_F3D		ctx_poly_normal;	/* current polygon normal */
#endif	/* SH_SMALL */
