/****
 *
 * Copyright (c) 1988 by Sun Microsystems, Inc.
 * @(#)sh_CTX.ah 22.1 89/08/10 Copyright 1988 Sun Micro
 *
 * CONTEXT class attributes
 *
 ****/
   RASTER		CTX_RASTER;		/* window */
   Unsgn8		CTX_ERROR;		/* error code */
   Unsgn8		CTX_TYPE;		/* context type */
   CTX_shade		CTX_SHADE;		/* shading */
#ifndef	NO_VDC
   CTX_vdc_map		CTX_VDC_MAP;		/* VDC mapping */
#endif
   CTX_pipeline		CTX_PIPELINE;		/* graphics pipeline */
   CTX_area_style	CTX_AREA_STYLE;		/* area properties */
   CTX_fill_style	CTX_FILL_STYLE;		/* filling styles */
   CTX_rop		CTX_ROP;		/* current raster-op */
   CTX_line_cap		CTX_LINE_CAP;           /* line cap */
   CTX_line_join        CTX_LINE_JOIN;  	/* line join */
   CTX_line_style	CTX_LINE_STYLE;		/* line style */
   CTX_plane_enable	CTX_PLANE_ENABLE;	/* raster plane enable mask */
   fract		CTX_LINE_SIZE;		/* line size (world units) */
   fract		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
#ifndef	NO_VIEW_CLIP
   POINT		CTX_CLIP_ORG;		/* origin of clip area */
   POINT		CTX_CLIP_DIM;		/* dimensions of clip area */
#endif
   RASTER		CTX_FILL_RASTER;	/* texture/stipple raster */
   POINT_B2D		CTX_FILL_ORG;		/* texture/stipple origin */
   PATH			CTX_PATH;		/* current path */
   PATH			CTX_CLIP_PATH;		/* clip path */
   POINT		CTX_RASTER_PEN;		/* pen in raster coords */
   Unsgn32		CTX_FLATNESS;		/* path flatness */
/*
 * 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_ctm;		/* current transform */
   TRANSFORM	ctx_trans_construct;	/* path construction transform */
#ifndef	NO_RTM
   TRANSFORM	ctx_trans_render;	/* path render transform */
#endif
#if	!defined(NO_MODEL) & !defined(NO_VDC)
   TRANSFORM	ctx_trans_mv;		/* model/view transform concatenated */
#endif
/*
 * Curve information
 */
   unsigned int	ctx_curve_form : 4;	/* curve form */
   unsigned int ctx_curve_order : 4;	/* curve order */
/*
 * Rendering context
 */
   Unsgn8	ctx_pipe_type;		/* pipeline type */
   Unsgn8	ctx_pipe_disp;		/* pipeline dispatch */
   Unsgn8	ctx_draw_disp;		/* general drawing selector */
   unsigned int	ctx_pipe_flags : 3;	/* pipeline flags */

#ifndef NO_VIEW_CLIP
/*
 * View clipping information
 */
   unsigned int	ctx_clip_dim  : 2;
   TRANSFORM	ctx_N;		/* view normalization transform */
   TRANSFORM	ctx_Ninv;	/* inverse view norm. transform */
   TRANSFORM	ctx_Ncat;	/* concatenation of Ninv and VDC */
   PATH_POINT	ctx_clip_org;
   PATH_POINT	ctx_clip_min;
   PATH_POINT	ctx_clip_max;
#endif	/* NO_VIEW_CLIP */

#ifndef	SH_SMALL
/*
 * 3D attributes
 */
   CTX_hidden_surf	CTX_HIDDEN_SURF;	/* hidden surface */
   CTX_clip_planes	CTX_CLIP_PLANES;	/* clip planes */
   CTX_pick_id		CTX_PICK_ID;		/* pick identifier */
   Unsgn32		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 */
   LIGHT		CTX_LIGHT;		/* light source group */

   POINT_F3D		ctx_normal;		/* current normal */
#endif	/* SH_SMALL */
