⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hk_public.h

📁 操作系统SunOS 4.1.3版本的源码
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Sub-opcode field for lookup table instructions */#define HK_SO_POS		22#define HK_SO_BITS		2#define HK_NUM_SO		(1 << HK_SO_BITS)#define HK_SO_MASK		(HK_NUM_SO - 1)#define HK_EXTRACT_SO(inst)	(((inst) >> HK_SO_POS) & HK_SO_MASK)/* *-------------------------------------------------------------- * * Bit definitions for polyline with header. * *-------------------------------------------------------------- *//* * Bits for polyline command word. *//* Implicit current element increment for batched polylines */#define HK_LINE_IMPLICIT_CEN	0x00020000/* * Bits for polyline header words. *//* Polyline move/draw (i.e. restart) bit */#define HK_LINE_MOVE		0x00000000	/* Header for line move */#define HK_LINE_DRAW		0x08000000	/* Header for line draw *//* Increment CEN bit */#define HK_LINE_INC_CEN		0x01000000	/* Increment CEN on LINE_MOVE *//* *-------------------------------------------------------------- * * Bit definitions for generalized triangle strips * *-------------------------------------------------------------- *//* * Bits for triangle list command word. *//* Triangle list edge flag */#define HK_TRI_EDGE_ENABLE	0x00010000	/* Use tri_list edge bits */#define HK_TRI_EDGE_DISABLE	0x00000000	/* DON'T use edge bits *//* Implicit current element increment for batched triangles in a triangle list */#define HK_TRI_IMPLICIT_CEN	0x00020000/* * Bits for triangle header words. *//* Triangle replacement bits */#define HK_TRI_START		0x00000000	/* Start a triangle strip */#define HK_TRI_R1		0x08000000	/* Replace oldest vertex */#define HK_TRI_R2		0x10000000	/* Replace 2nd oldest vertex */#define HK_TRI_COUNTER_CLOCKWISE 0x80000000	/* Triangle is not clockwise */#define HK_TRI_START_CCW	(HK_TRI_START | HK_TRI_COUNTER_CLOCKWISE)#define HK_TRI_CLOCKWISE	0x00000000	/* Triangle is clockwise */#define HK_TRI_START_CW		(HK_TRI_START | HK_TRI_CLOCKWISE)#define HK_TRI_REPL_MASK	0x18000000#define HK_TRI_REPL_SHIFT	27#define HK_EXTRACT_TRI_REPL(inst) ((inst) & HK_TRI_REPL_MASK)/* Edge highlight bits */#define HK_TRI_EDGE_HILITE1	0x40000000 /* Highlight current-to-oldest edge*/#define HK_TRI_EDGE_HILITE2	0x20000000 /* Highlight current-to-2nd edge */#define HK_TRI_EDGE_MASK	0x60000000#define HK_TRI_EDGE_SHIFT	29#define HK_EXTRACT_TRI_EDGE(inst) ((inst) & HK_TRI_EDGE_MASK)/* Increment CEN bit */#define HK_TRI_INC_CEN		0x01000000	/* Increment CEN on TRI_START *//* Hollow polygon bits */#define HK_TRI_EDGE_INTER1	0x00800000 /* Internal current-to-oldest edge */#define HK_TRI_EDGE_INTER2	0x00400000 /* Internal current-to-2nd edge *//* *-------------------------------------------------------------- * * Bit definitions for Enter PHIGS Structure (EPS) instruction * word. * *-------------------------------------------------------------- */#define HK_EPS_NO_SIS		0x00400000#define HK_EPS_LEAF		0x00800000/* *-------------------------------------------------------------- * * Hawk "RISC" registers * *-------------------------------------------------------------- */#define HK_NUM_RISC_REGS	8	/* Number of RISC registers */#define HK_RISC_R0		0x0	/* NOTE: cannot be used as index reg */#define HK_RISC_R1		0x1	/* NOTE: cannot be used as index reg */#define HK_RISC_R2		0x2#define HK_RISC_R3		0x3#define HK_RISC_R4		0x4#define HK_RISC_R5		0x5#define HK_RISC_R6		0x6#define HK_RISC_R7		0x7#define HK_RISC_SP		HK_RISC_R7/* *-------------------------------------------------------------- * * Addressing modes * *-------------------------------------------------------------- */#define HK_AM_IMMEDIATE			0x0#define HK_AM_ABSOLUTE			0x1#define HK_AM_R2_INDIRECT		0x2#define HK_AM_R3_INDIRECT		0x3#define HK_AM_R4_INDIRECT		0x4#define HK_AM_R5_INDIRECT		0x5#define HK_AM_R6_INDIRECT		0x6#define HK_AM_R7_INDIRECT		0x7/* *-------------------------------------------------------------- * * State structure * *	These are the values that may be pushed onto the stack from *	the context. * * * *-------------------------------------------------------------- *//* *********************************************************************** * WARNING:  Because the Hk_state structure contains doubles, it must * be padded such that ALL embedded structures which contain doubles * start on an 8 byte (2 word) boundary.  Additionally, the * sizeof(Hk_state) must be a multiple of 8 bytes.  If ANYTHING changes * in the Hk_state structure, alignment must again be verified. * * Additionally, because the Hk_context structure includes Hk_state, * the sizeof(Hk_context) must be a multiple of 8 bytes.  If ANYTHING * changes in the Hk_context structure, alignment must again be * verified. * * The defined constants HK_STATE_PADDING and HK_CTX_PADDING are used * to specify the padding for Hk_state and Hk_context, respectively. * These values must be either 1 or 2.  Initialization code will verify * that the specified value of both HK_STATE_PADDING and HK_CTX_PADDING * are correct. * * The values HK_SZ_STATE_RES and HK_SZ_CTX_RES specify the number of * words in the state and context, respectively, which are reserved * for future expansion.  These numbers should be decremented as * appropriate when adding new fields to the context.  The value * HK_SZ_STATE_RES2 is an additional reserved area in the state which * may be used if the first area is exhausted. *********************************************************************** */#define HK_STATE_PADDING	1	/* Padding (1 or 2) */#define HK_CTX_PADDING		1	/* Padding (1 or 2) */#define HK_SZ_STATE_RES		32	/* Number of reserved words */#define HK_SZ_STATE_RES2	64	/* Number of reserved words */#define HK_SZ_CTX_RES		27	/* Number of reserved words */#ifndef LOCOREtypedef struct Hk_state Hk_state;struct Hk_state {/* *---------------------------------------------------------------------- * WARNING:  The following embedded structures contain doubles and must * be aligned on an even 8 byte (2 word) boundary.  If ANYTHING changes * prior to this point in the Hk_state structure, alignment must again * be verified. *---------------------------------------------------------------------- *//* Curve and surface approximation */    Hk_curve_approx hki_curve_approx;    Hk_curve_approx hkb_curve_approx;    int hka_curve_approx;    int padding1;			/* Align to 8-byte boundary */    Hk_surf_approx hki_surf_approx;    Hk_surf_approx hkb_surf_approx;    int hka_surf_approx;    int padding2;			/* Align to 8-byte boundary */    Hk_trim_approx hki_trim_approx;    Hk_trim_approx hkb_trim_approx;    int hka_trim_approx;    int padding3;			/* Align to 8-byte boundary *//* Transformations */    Hk_model_transform gmt;		/* Global modeling transform */    Hk_model_transform lmt;		/* Local modeling transform */    Hk_model_transform cmt;		/* Current modeling transform */    Hk_view view;/* *---------------------------------------------------------------------- * End of structures containing embedded doubles. *---------------------------------------------------------------------- *//* PHIGS_state flags */    unsigned attributes_saved[HKST_NUM_WORDS];    unsigned need_from_children[HKST_NUM_WORDS];/* Lines */    Hk_line_geom_format line_geom_format;    Hk_stroke_antialiasing hki_line_antialiasing;    Hk_stroke_antialiasing hkb_line_antialiasing;    int hka_line_antialiasing;    Hk_rgb hki_line_color;    Hk_rgb hkb_line_color;    int hka_line_color;    Hk_line_shading_method hki_line_shading_method;    Hk_line_shading_method hkb_line_shading_method;    int hka_line_shading_method;    Hk_line_style hki_line_style;    Hk_line_style hkb_line_style;    int hka_line_style;    Hk_rgb line_off_color;    Hk_pattern *hki_line_pattern;	/* Pointer to line pattern */    Hk_pattern *hkb_line_pattern;    int hka_line_pattern;    float hki_line_width;    float hkb_line_width;    int hka_line_width;    Hk_line_cap hki_line_cap;    Hk_line_cap hkb_line_cap;    int hka_line_cap;    Hk_line_join hki_line_join;    Hk_line_join hkb_line_join;    int hka_line_join;    float hki_line_miter_limit;    float hkb_line_miter_limit;    int hka_line_miter_limit;/* Surface attributes */    Hk_tri_geom_format tri_geom_format;    Hk_cull_mode face_culling_mode;    int use_back_props;    Hk_rgb hki_front_surface_color;    Hk_rgb hkb_front_surface_color;    int hka_front_surface_color;    Hk_rgb hki_back_surface_color;    Hk_rgb hkb_back_surface_color;    int hka_back_surface_color;    /* Front material properties */    Hk_material_properties hki_front_material_properties;    Hk_material_properties hkb_front_material_properties;    int hka_front_material_properties;    /* Back material properties */    Hk_material_properties hki_back_material_properties;    Hk_material_properties hkb_back_material_properties;    int hka_back_material_properties;    Hk_rgb hki_front_specular_color;    Hk_rgb hkb_front_specular_color;    int hka_front_specular_color;    Hk_rgb hki_back_specular_color;    Hk_rgb hkb_back_specular_color;    int hka_back_specular_color;    float hki_front_transparency_degree;    float hkb_front_transparency_degree;    int hka_front_transparency_degree;    float hki_back_transparency_degree;    float hkb_back_transparency_degree;    int hka_back_transparency_degree;    Hk_poly_shading_method hki_front_shading_method;    Hk_poly_shading_method hkb_front_shading_method;    int hka_front_shading_method;    Hk_poly_shading_method hki_back_shading_method;    Hk_poly_shading_method hkb_back_shading_method;    int hka_back_shading_method;    Hk_lighting_degree hki_front_lighting_degree;    Hk_lighting_degree hkb_front_lighting_degree;    int hka_front_lighting_degree;    Hk_lighting_degree hki_back_lighting_degree;    Hk_lighting_degree hkb_back_lighting_degree;    int hka_back_lighting_degree;    Hk_interior_style hki_front_interior_style;    Hk_interior_style hkb_front_interior_style;    int hka_front_interior_style;    Hk_interior_style hki_back_interior_style;    Hk_interior_style hkb_back_interior_style;    int hka_back_interior_style;    Hk_general_style hki_front_general_style;    Hk_general_style hkb_front_general_style;    int hka_front_general_style;    Hk_general_style hki_back_general_style;    Hk_general_style hkb_back_general_style;    int hka_back_general_style;    Hk_hatch_style hki_front_hatch_style;    Hk_hatch_style hkb_front_hatch_style;    int hka_front_hatch_style;    Hk_hatch_style hki_back_hatch_style;    Hk_hatch_style hkb_back_hatch_style;    int hka_back_hatch_style;    Hk_iso_curve_info hki_iso_curve_info;    Hk_iso_curve_info hkb_iso_curve_info;    int hka_iso_curve_info;    Hk_stroke_antialiasing hki_hollow_antialiasing;    Hk_stroke_antialiasing hkb_hollow_antialiasing;    int hka_hollow_antialiasing;/* Edge attributes */    int silhouette_edge;    Hk_edge_control hki_edge;    Hk_edge_control hkb_edge;    int hka_edge;    float edge_z_offset;		/* In HNPC coords */    Hk_stroke_antialiasing hki_edge_antialiasing;    Hk_stroke_antialiasing hkb_edge_antialiasing;    int hka_edge_antialiasing;    Hk_rgb hki_edge_color;    Hk_rgb hkb_edge_color;    int hka_edge_color;    Hk_line_style hki_edge_style;    Hk_line_style hkb_edge_style;    int hka_edge_style;    Hk_rgb edge_off_color;    Hk_pattern *hki_edge_pattern;	/* Pointer to edge pattern */    Hk_pattern *hkb_edge_pattern;    int hka_edge_pattern;    float hki_edge_width;    float hkb_edge_width;    int hka_edge_width;    Hk_line_cap hki_edge_cap;    Hk_line_cap hkb_edge_cap;    int hka_edge_cap;    Hk_line_join hki_edge_join;    Hk_line_join hkb_edge_join;    int hka_edge_join;    float hki_edge_miter_limit;    float hkb_edge_miter_limit;    int hka_edge_miter_limit;/* Text attributes */    Hk_stroke_antialiasing hki_text_antialiasing;    Hk_stroke_antialiasing hkb_text_antialiasing;    int hka_text_antialiasing;    Hk_rgb hki_text_color;    Hk_rgb hkb_text_color;    int hka_text_color;    float hki_text_expansion_factor;    float hkb_text_expansion_factor;    int hka_text_expansion_factor;    float hki_text_spacing;    float hkb_text_spacing;    int hka_text_spacing;    float hki_text_line_width;    float hkb_text_line_width;    int hka_t

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -