XGL Test Suite User's Guide
只搜尋這本書
以 PDF 格式下載這本書

Multisimple Polygon Test Descriptions

16

This chapter describes the Multisimple Polygon test programs. The following is defined for each test program:
  • Name of the test program
  • Test types (See the section, "Denizen Test Types" on page 2 for the different test types.)
  • Description of the test program
  • Attributes tested by the program
  • Operators tested by the program
  • Output from the test program

Note - Each multisimple polygon test has an equivalent polygon version that is as similar as possible. Also, when gcache primitives were added to their respective areas (pre-3.0), multi* were moved to the mspolygon directory.

· multipg_simple
Test Types:INDEX, SM
Description:Tries two solid front facing polygons with exactly the same vertex data except their normals and their facet types differ
Attributes Tested: XGL_SURF_FILL_SOLID
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             First frame, a yellow square and second frame, a red
                    square

· multipg_simple_rgb
Test Types:RGB, SM
Description:Tries two solid front facing polygons with exactly the same vertex data except their normals and their facet types differ
Attributes Tested: XGL_CTX_SURF_EDGE_FLAG
Operators Tested: xgl_object_set
Output:· multipg0First frame, a red square and second frame, a yellow square
Test Types:RGB, SM
Description:Linear depth-cueing of simple solid polygons with every polygon except the first back facing. All are coplanar, although some of the vertex data do not lie in the same z plane through the polygon.
The expected surface color is a contribution from both the surface color and the depth cue color, with the surface color contribution proportional to the distance from the maximum window z boundary and the depth cue color directly related to the z value at the vertex. Expects the surface color to be closer to the surface color set of purple when the z value for all or most of the vertex data are closest to 0 or front facing. Expects the surface color to be closer to the depth cue color when the z value is closer to the maximum window bounds of 1.0. Expects the surface color to be an interpolation (shading) among more than
one color dependent on the different z values for the individual vertex data. The depth cue color is varied through nine different variants.
Attributes Tested: XGL_3D_CTX_DEPTH_CUE_COLOR and Table 16-2, Column A at the end of this chapter
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             The first polygon list has a constant z value of 0, the sole

point list for which all polygons are front facing. Consequently, its surface color is always the surface color set with no contribution from the depth cue color; contains only one polygon, which is square; and is always solid unshaded purple.
The second polygon list contains only one polygon, has a constant z value of the maximum z window boundary, is shaped like a house rotated so that its center passes through the line x = y and by its
z-value is guaranteed to be whatever the set depth color is.
The third polygon list is composed of two polygons, a triangle and a rhombus both near the top of the window, and both with a constant z value of 0.3, which makes their surface color predominantly the surface color and unshaded.
The two last point lists have the variable z, so their polygons are shaded across their edge spans. The first point list contains only one polygon and is a triangle. The second point list contains four polygons with the following shapes: a triangle, a parallelogram, the front view of a house, and a diamond with its top and bottom pointed extensions clipped.
· multipg2
Test Types:RGB, SM
Description:XGL_ILLUM_NONE_INTERP_COLOR mode for multipolygons produces shaded polygons based on interpolation through scanlines from the different vertex colors set through point type color_f3d. Seven point lists with one polygon each with the first four polygons a square, the next a vertical bow tie, the next a horizontal bow tie, and the last a triangle with its base facing the top of the window.
Attributes Tested: XGL_3D_CTX_SURF_FRONT_ILLUMINATION
                    XGL_ILLUM_NONE_INTERP_COLOR
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
Output:             Shaded orange to white from the left to the right side of

the square. Shaded mint green to white from the top to the bottom of the square. Shaded red to white with red across the left diagonal of the square. Solid blue square. Shaded red to white vertical bow tie with the red originating from the top portion of the bow tie. Solid horizontal blue bow tie. Shaded triangle from red to purple with the red originating from the base of the triangle facing the top of the window.
· multipg3
Test Types:RGB, SM
Description:XGL_3D_CTX_SURF_GEOM_NORMAL is used for multipolygons to produce the same polygon with either the back-face color or the front-face color dependent on whether the geometry normal is set to first point or last point respectively because the z value for these points, is front and last respectively.
Attributes Tested: XGL_3D_CTX_SURF_BACK_COLOR
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             When the XGL_3D_CTX_SURF_GEOM_NORMAL is set to
                    XGL_GEOM_NORMAL_LAST_POINTS, expects the front
                    color set for the triangle, which is red. When the
                    XGL_3D_CTX_SURF_GEOM_NORMAL is set to
                    XGL_GEOM_NORMAL_FIRST_POINTS, expects the back

color set for the triangle, which is blue.
· multipg4
Test Types:INDEX, SM
Description:Linear depth-cueing of simple solid polygons with every polygon except the first back facing. All are coplanar, although some of the vertex data do not lie in the same z plane through the polygon. The expected surface color at each vertex is a portion of the surface color based on the distance of its z value from the maximum z window boundary, which is set at 1.0. When the z values for the vertex of the polygon differ, the polygon will be shaded across the edges formed by the interpolation between the vertex. Since the color table installed is a graduation from black to white in equal increments, the closer the vertex is to the z window maximum, the closer the vertex color will be to black.
Attributes Tested: See Table 16-2, Column A at the end of this chapter.
Operators Tested: xgl_object_set
Output:.....The first polygon list has a random z value for its vertexes and its shape is a shaded triangle with one vertex replaced by a vertical edge.
The second point list is front facing with a constant z value and is thus a solid colored square.
The third point list is back facing with a constant z value of the z window maximum and consequently blends into the background color.
The next point list has a constant z and two polygons, so they are a solid colored triangle and a solid colored rhombus.
The last two point lists have a variable z, so their polygons are shaded across their edge spans. The first point list contains only one polygon and is a triangle. The second point list contains three polygons with the following shapes: a triangle, the front view of a house, and a six-sided figure.
· multipg_cull
Test Types:INDEX, SM
Description:Renders two square polygons, the first is front facing and the second is back facing. Sets front color to red and back color to green. Loops through three modes of culling, off, front and back, and expect one red square and one green square, one green square and one red square respectively.
Attributes Tested: See Table 16-1, Column A at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_cull_zTwo square polygons, one red and one green. One green square polygon alone and then one red square polygon alone.
Test Types:INDEX, SM
Description:Renders two square polygons, the first front facing and the second back facing. Sets front color to red and back color to green. Loops through three modes of culling, off, front and back, and expects one red square and one green square, one green square and one red square respectively. Also sets XGL_3D_CTX_HLHSR_MODE to XGL_HLHSR_Z_BUFFER, but since none of the vertexes of the polygons lie outside the z plane of z = origin, this should not affect the same culling as portrayed by
multipg_cull because the default XGL_3D_CTX_HLHSR_DATA is the maximum depth permitted by the device attached to the context.
Attributes Tested: XGL_3D_CTX_HLHSR_MODE
                    XGL_CTX_NEW_FRAME_ACTION
                    XGL_CTX_NEW_FRAME_CLEAR
                    XGL_CTX_NEW_FRAME_HLHSR_ACTION
                    XGL_HLHSR_Z_BUFFER
                    and Table 16-1, Column A at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Two square polygons, one red and one green. One green

square polygon alone and then one red square polygon alone.
· multipg_cull_rgb
Test Types:RGB, SM
Description:Renders two square polygons, the first front facing and the second back facing. Sets front color to red and back color to green. Loops through three modes of culling, off, front and back, and expects one red square and one green square, one green square and one red square respectively.
Attributes Tested: See Table 16-1, Column A at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_cull_z_rgbTwo square polygons, one red and one green. One green square polygon alone and then one red square polygon alone.
Test Types:RGB, SM
Description:Renders two square polygons, the first front facing and the second back facing. Sets front color to red and back color to green. Loops through three modes of culling, off, front and back, and expects one red and one green square, one green square and one red square respectively.
Attributes Tested: XGL_3D_CTX_HLHSR_MODE
                    XGL_CTX_NEW_FRAME_ACTION
                    XGL_CTX_NEW_FRAME_CLEAR
                    XGL_CTX_NEW_FRAME_HLHSR_ACTION
                    XGL_HLHSR_Z_BUFFER
                    and Table 16-1, Column A at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Two square polygons, one red and one green. One green

square polygon alone and then one red square polygon alone.
· multipg_edge
Test Types:RGB, SM
Description:Loops through interior colors of a cube, setting the interior of a 2D polygon to the cube color and setting its edges to an alternate line pattern with the six dashes set to red while the alternate dash is set to white
Attributes Tested: See Table 16-1, Column B at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_edge2Simple polygon with patterned edges of six dashes with two dashes of separating white color and all interior colors.
Test Types:RGB, SM
Description:Loops through all possible flag combinations for the edges of a four-sided square for point type flag_i2d with interior color green and edge color purple
Attributes Tested: XGL_CTX_BACKGROUND_COLOR
XGL_CTX_EDGE_COLOR
XGL_CTX_SURF_EDGE_FLAG
XGL_CTX_SURF_FRONT_COLOR

Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             One huge green square with all possible combinations for
                    purple edges on and off

· multipg_edge3
Test Types:RGB, SM
Description:Loops through interior colors of a cube, setting the interior of a 3D polygon to the cube color and setting its edges to an alternate line pattern with the six dashes set to red while the alternate dash is set to white
Attributes Tested: See Table 16-1, Column B at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
                    xgl_object_create
                    xgl_context_get_pixel
Output:             Simple polygon with patterned edges of six dashes with

two dashes of separating white color and all interior colors
· multipg_edge4
Test Types:RGB, SM
Description:Renders all possible flag combinations for the edges of a four-sided square for point type flag_i2d with interior color green and edge color purple
Attributes Tested: XGL_CTX_EDGE_COLOR
                    XGL_CTX_SURF_EDGE_FLAG
                    XGL_CTX_SURF_FRONT_COLOR
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
Output:             Sixteen green squares, all with different combinations for

the rendering of up to four purple edges
· multipg_face
Test Types:INDEX, SM
Description:Renders three polygons, the first front facing and the other two back facing. Sets face distinguishing to true and normal flip to false and expects the polygons rendered normally. Sets both face distinguishing and normal flip to false and expects the polygons all to be front facing. Sets both face distinguishing and normal flip to true and expects the normally facing polygons to be reversed. The front fill style is solid while the back fill style is hollow.
Attributes Tested: See Table 16-2, Column B at the end of this chapter
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             First frame: red solid square, green-edged hollow square,

and green-edged hollow parallelogram. Next frame: red solid square, red solid square, and red solid parallelogram. Final frame: hollow green square, red solid square, and red solid parallelogram.
· multipg_face_z
Test Types:INDEX, SM
Description:Renders three polygons, the first front facing and the other two back facing. Sets face distinguishing to true and normal flip to false and expects the polygons rendered normally. Sets both face distinguishing and normal flip to false and expects the polygons all to be front facing. Sets both face distinguishing and normal flip to true and expects the normally facing polygons to be reversed. HLHSR is also set with the default XGL_3D_CTX_HLHSR_DATA value, which is the maximum depth permitted by the device attached to the context. The front fill style is solid while the back fill style is hollow.
Attributes Tested: See Table 16-1, Column C at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_face_rgbFirst frame: red solid square, green-edged hollow square, and green-edged hollow parallelogram. Next frame: red solid square, red solid square, and red solid parallelogram. Final frame: hollow green square, red solid square, and red solid parallelogram.
Test Types:RGB, SM
Description:RGB version of multipg_face
Attributes Tested: See Table 16-2, Column B at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_face_z_rgbFirst frame: red solid square, green-edged hollow square, and green-edged hollow parallelogram. Next frame: red solid square, red solid square, and red solid parallelogram. Final frame: hollow green square, red solid square, and red solid parallelogram.
Test Types:RGB, SM
Description:RGB version of multipg_face_z
Attributes Tested: See Table 16-1, Column C at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             First frame: red solid square, green-edged hollow square,

and green-edged hollow parallelogram. Next frame: red solid square, red solid square, and red solid parallelogram. Final frame: hollow green square, red solid square, and red solid parallelogram.
· multipg_fill
Test Types:INDEX, SM
Description:Tests various polygon fill styles for multisimple polygons
Attributes Tested: See Table 16-2, Column C at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_fill_zSix polygon point lists displayed as hollow normal with edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole and a hole in the vertical base of the "d" (5) a square within a square, and (6) a square overlapping another square.
Test Types:INDEX, SM
Description:Tests various HLHSR polygon fill styles for multisimple polygons. Same as multipg_fill but with HLHSR on and set to the default XGL_3D_CTX_HLHSR_DATA, which is the maximum depth permitted by the device attached to the context.
Attributes Tested: XGL_3D_CTX_HLHSR_MODE
and Table 16-2, Column C at the end of this chapter
Operators Tested: xgl_object_set xgl_multi_simple_polygon
Output:· multipg_fill2Six polygon point lists displayed as hollow normal with edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
Test Types:INDEX, SM
Description:Tests pattern-filled multipolygons with/without edges. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN).
Attributes Tested: See Table 16-3, Column A at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Two squares overlapping with the smaller square

overlapping the lower right corner of the larger square filled with one of the three patterns mentioned in the Description section
· multipg_fill_rgb
Test Types:RGB, SM
Description:Tests various polygon fill styles for RGB multisimple polygons
Attributes Tested: XGL_CTX_SURF_FRONT_COLOR and Table 16-2, Column C at the end of this chapter
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Six polygon point lists displayed as hollow normal with

edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
· multipg_fill_z_rgb
Test Types:RGB, SM
Description:Tests various HLHSR polygon fill styles for multisimple polygons. Same as multipg_fill but with HLHSR on and set to the default XGL_3D_CTX_HLHSR_DATA, which is the maximum depth permitted by the device attached to the context.
Attributes Tested: XGL_3D_CTX_HLHSR_MODE

and Table 16-2, Column C at the end of this chapter
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Six polygon point lists displayed as hollow normal with

edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
· multipg_fill4
Test Types:RGB, SM
Description:Tests pattern-filled RGB multipolygons with/without edges. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN).
Attributes Tested: See Table 16-3, Column A at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Two squares overlapping with the smaller square

overlapping the lower right corner of the larger square filled with one of the three patterns mentioned in the Description section
· multipg_fill5
Test Types:RGB, SM
Description:Tests pattern-filled RGB simple polygons with opaque filling style. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN). First renders the polygon with a solid fill, then sets the fill style to opaque stipple, and re-renders it with one of the patterns mentioned above.
Attributes Tested: See Table 16-3, Column B at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Large filled square in the upper left corner alternating

with a much smaller filled square in the lower right corner of the window
· multipg_fill6
Test Types:RGB, SM
Description:Tests various polygon fill styles for RGB 2D multisimple polygons. Renders polygons solid, then with hollow fill style, no edges, and finally empty with wide edges.
Attributes Tested: XGL_CTX_SURF_FRONT_COLOR and Table 16-2, Column C at the end of this chapter
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Six polygon point lists displayed as hollow normal with

edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
· multipg_fill7
Test Types:RGB, SM
Description:Tests 3D pattern-filled RGB multipolygons with/without edges. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN).
Attributes Tested: See Table 16-3, Column A at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Two squares overlapping with the smaller square

overlapping the lower right hand of the larger square filled with one of the three patterns mentioned in the Description section
· multipg_fill8
Test Types:RGB, SM
Description:Tests 3D back pattern-filled RGB simple polygons with opaque filling style. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN). First
renders the polygon with a solid fill, then sets the fill style to opaque stipple, and re-renders it with one of the patterns mentioned above.
Attributes Tested: See Table 16-3, Column B at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Large filled square in the upper left corner alternating

with a much smaller filled square in the lower right corner of the window
· multipg_back_fill_rgb
Test Types:RGB, SM
Description:Tests various polygon back fill styles for RGB multisimple polygons. Same polygon list as multipg_fill6 but with the normals so that the polygons are back facing, that is, z component is greater than 0.0. First renders the polygons as solids, then as hollow with normal sized edge width and then as empty with wide edge width.
Attributes Tested: XGL_3D_CTX_SURF_FACE_DISTINGUISH

Operators Tested: xgl_object_set
Output:.....Six polygon point lists displayed as hollow normal with edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
· multipg_back_fill_z_rgb
Test Types:RGB, SM
Description:Tests various polygon back fill styles for RGB multisimple polygons. Same polygon list as multipg_fill6 but with the normals so that the polygons are back facing, that is, z component is greater than 0.0. First renders the polygons as solids, then as hollow with normal sized edge width and then as empty with wide edge width. Turns on XGL_HLHSR_Z_BUFFER assuming the default XGL_3D_CTX_HLHSR_DATA which is the maximum depth permitted by the device attached to the context.
Attributes Tested: XGL_3D_CTX_HLHSR_MODE
                    XGL_3D_CTX_SURF_BACK_COLOR
                    XGL_3D_CTX_SURF_BACK_FILL_STYLE
                    XGL_3D_CTX_SURF_FACE_DISTINGUISH
                    XGL_CTX_NEW_FRAME_ACTION
                    XGL_CTX_NEW_FRAME_CLEAR
                    XGL_CTX_NEW_FRAME_HLHSR_ACTION
                    XGL_HLHSR_Z_BUFFER
                    and Table 16-2, Column C at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
Output:             Six polygon point lists displayed as hollow normal with

edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
· multipg_fill10
Test Types:RGB, SM
Description:Tests 3D back pattern-filled RGB multipolygons with/without edges. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN).
Attributes Tested: XGL_SURF_FILL_STIPPLE
                    XGL_CTX_EDGE_COLOR
                    XGL_CTX_SURF_EDGE_FLAG
                    and Table 16-3, Column C at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Two squares overlapping with the smaller square

overlapping the lower right corner of the larger square filled with one of the three patterns mentioned in the Description section
· multipg_fill11
Test Types:RGB, SM
Description:Tests 3D back pattern-filled RGB simple polygons with opaque filling style. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN). First renders the polygon with a solid fill, then sets the fill style to opaque stipple, and re-renders it with one of the patterns mentioned above.
Attributes Tested: XGL_SURF_FILL_SOLID XGL_SURF_FILL_OPAQUE_STIPPLE and Table 16-3, Column C at the end of this chapter
Operators Tested: xgl_object_set
Output:· multipg_hlhsrLarge filled square in the upper left corner alternating with a much smaller filled square in the lower right corner of the window
Test Types:INDEX, SM
Description:Renders two polygons in a point list in which each polygon is a twin of the other except for its z values. Uses facet color normal and sets the facet colors for each twin to two different colors. Expects the polygon to appear in the facet color for the polygon in front, that is, z value
smallest for each member of vertex for the polygon. The polygons that are rendered in this manner are a square, vertical bow tie, horizontal bow tie, and one triangle.
Attributes Tested: XGL_DEV_COLOR_MAP and Table 16-4, Column A at the end of this chapter
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Polygons in either red or green, dependent on whether the

first polygon is in front of its twin or the second polygon is in front of its twin. The shapes of the polygons are those mentioned in the Description section.
· multipg_hlhsr2
Test Types:RGB, SM
Description:Same as multipg_hlhsr except RGB. Renders two polygons in a point list in which each polygon is a twin of the other except for its z values. Uses facet color normal and sets the facet colors for each twin to two different colors. Expects the polygon to appear in the facet color for the polygon in front, that is, z value smallest for each member of vertex for the polygon. The polygons that are rendered in this manner are a square, vertical bow tie, horizontal bow tie, and one triangle.
Attributes Tested: See Table 16-4, Column A at the end of this chapter.
Operators Tested: xgl_object_set
Output:· multipg_hlhsr4Polygons in either red or green, dependent on whether the first polygon is in front of its twin or the second polygon is in front of its twin. The shapes of the polygons are those mentioned in the Description section.
Test Types:RGB, SM
Description:Renders a solid planar square with hidden surface removal varying the z plane for the square and the hidden surface data for removal
Attributes Tested: XGL_3D_CTX_HLHSR_DATA
                    XGL_CTX_BACKGROUND_COLOR
                    XGL_CTX_SURF_FRONT_COLOR
                    and Table 16-4, Column A at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
Output:             Expects a solid orange square for the first four frames

because the z value for the primitive is greater than the hidden surface data set. Expects only background color for the final two frames because the z value for the primitive is behind the hidden surface data.
· multipg_intrule
Test Types:INDEX, SM
Description:Tests that xgl_multi_simple_polygon() correctly applies XGL_CTX_SURF_INTERIOR_RULE when drawing both 3D and 2D polygons. Renders a polygon in the shape of a letter "d" with two holes in it, the expected hole for the letter, and an additional donut at the upper portion of the vertical base. Renders two squares. Renders one square plus the shape of a crown rotated -90 degrees and overlapping the square so that only the two triangle vertexes appear beyond the square's boundary. The same letter "d" appears only smaller and translated to a different location on the window. Now renders the same polygons in 2D rather than 3D.
Attributes Tested: XGL_CTX_SURF_INTERIOR_RULE
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
Output:             Shapes as mentioned in the Description section in the
                    default index color map color of white

· multipg_intrule_rgb
Test Types:RGB, SM
Description:Tests that xgl_multi_simple_polygon() correctly applies XGL_CTX_SURF_INTERIOR_RULE when drawing RGB 3D and 2D polygons. Same as multipg_intrule except RGB.
Attributes Tested: XGL_CTX_SURF_INTERIOR_RULE
Operators Tested: xgl_object_set
Output:· multipg_pttypesThe same shapes in the same order as mentioned in the Description section from multipg_intrule except RGB has no default color, so the front surface color is set to orange.
Test Types:INDEX, SM
Description:Renders the same three triangles in a column exercising six different point types and three different facets: XGL_PT_I2D, XGL_PT_I2H, XGL_PT_F2D, XGL_PT_F2H, XGL_PT_F3D and XGL_PT_F3H. Finally tries rendering three polygons (circles), each of which has 400 vertexes using F3D point type and three different facets.
Attributes Tested: Default attributes for xgl_multi_simple_polygon
Operators Tested: xgl_multi_simple_polygon
Output:· multipg_pttypes2Six frames of three triangles in a color with their colors from top to bottom: green, yellow, and blue. Three circles in a row with their colors from left to right: green, yellow, and blue.
Test Types:RGB, SM
Description:Exactly the same as multipg_pttypes except using RGB
Attributes Tested: Default attributes for xgl_multi_simple_polygon
Operators Tested: xgl_multi_simple_polygon
Output:· gcache_multipg_cullExactly the same output as multipg_pttypes
Test Types:INDEX, SM
Description:Renders two square polygons, the first front facing and the second back facing, all using gcache. Sets front color to red and back color to green. Loops through three modes of
culling, off, front and back, and expects one red square and one green square, one green square and one red square respectively.
Attributes Tested: XGL_CTX_NEW_FRAME_ACTION
                    XGL_CTX_NEW_FRAME_CLEAR
                    XGL_CTX_NEW_FRAME_HLHSR_ACTION
                    XGL_GCACHE
                    and Table 16-1, Column A at the end of this chapter
Operators Tested:   xgl_object_create
                    xgl_object_set
                    xgl_gcache_multi_simple_polygon
                    xgl_context_display_gcache
Output:             Two square polygons, one red and one green. One green

square polygon alone and then one red square polygon alone.
· gcache_multipg_edge4
Test Types:RGB, SM
Description:Renders all possible flag combinations for the edges of a four-sided square for point type flag_f3d with interior color green and edge color purple
Attributes Tested: XGL_CACHE_ATTR_STATE_DIFFERENT
                    XGL_CTX_EDGE_COLOR
                    XGL_CTX_SURF_EDGE_FLAG
                    XGL_CTX_SURF_FRONT_COLOR
                    XGL_GCACHE
                    XGL_GCACHE_IS_EMPTY
                    XGL_GCACHE_POLYGON_TYPE
                    XGL_GCACHE_USE_APPL_GEOM
                    XGL_POLYGON_NSI
Operators Tested:   xgl_object_create
                    xgl_object_set
                    xgl_gcache_multi_simple_polygon
                    xgl_context_display_gcache
Output:             Sixteen green squares, all with different combinations for

the rendering of up to four purple edges
· gcache_multipg_face
Test Types:INDEX, SM
Description:Renders three polygons, the first front facing and the other two back facing. Sets face distinguishing to true and normal flip to false and expects the polygons rendered normally. Sets both face distinguishing and normal flip to false and expects the polygons all to be front facing. Sets both face distinguishing and normal flip to true and expects the normally facing polygons to be reversed. The front fill style is solid while the back fill style is hollow.
Attributes Tested: XGL_GCACHE and Table 16-1, Column C at the end of this chapter
Operators Tested: xgl_object_create
Output:· gcache_multipg_face2First frame: red solid square, green edged hollow square, and green edged hollow parallelogram. Next frame: red solid square, red solid square, and red solid parallelogram. Final frame: hollow green square, red solid square, and red solid parallelogram.
Test Types:RGB, SM
Description:Renders three polygons, the first front facing and the other two back facing. Sets face distinguishing to true and normal flip to false and expects the polygons rendered normally. Sets both face distinguishing and normal flip to false and expects the polygons all to be front facing. Sets both face distinguishing and normal flip to true and expects the normally facing polygons to be reversed. The front fill style is solid while the back fill style is hollow.
Attributes Tested: XGL_GCACHE and Table 16-1, Column C at the end of this chapter
Operators Tested: xgl_object_create
xgl_object_set
xgl_gcache_multi_simple_polygon
xgl_context_display_gcache

Output:· gcache_multipg_fill1First frame: red solid square, green edged hollow square, and green edged hollow parallelogram. Next frame: red solid square, red solid square, and red solid parallelogram. Final frame: hollow green square, red solid square, and red solid parallelogram.
Test Types:RGB, SM
Description:Tests various polygon fill styles for gcache multisimple polygons
Attributes Tested: XGL_3D_CTX_HLHSR_MODE

and Table 16-2, Column C at the end of this chapter
Operators Tested: xgl_object_create
Output:· gcache_multipg_fill11Six polygon point lists displayed as hollow normal with edges, empty wide edges and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
Test Types:RGB, SM
Description:Tests 3D back pattern-filled RGB gcache simple polygons with opaque filling style. Patterns used include dots, crosshatch, and alternating on/off pixels (DSCREEN). First renders the polygon with a solid fill, then sets the fill style to opaque stipple, and re-renders it with one of the patterns mentioned above.
Attributes Tested: XGL_GCACHE
                    XGL_SURF_FILL_OPAQUE_STIPPLE
                    XGL_SURF_FILL_SOLID
                    and Table 16-3, Column C at the end of this chapter
Operators Tested:   xgl_object_create
                    xgl_object_set
                    xgl_object_get
                    xgl_gcache_multi_simple_polygon
                    xgl_context_display_gcache
Output:             Large filled square in the upper left corner alternating

with a much smaller filled square in the lower right corner of the window
· gcache_multipg_fill3
Test Types:RGB, SM
Description:Tests various polygon fill styles for RGB gcache multisimple polygons
Attributes Tested: XGL_3D_CTX_HLHSR_MODE
                    XGL_CTX_NEW_FRAME_ACTION
                    XGL_CTX_NEW_FRAME_CLEAR
                    XGL_CTX_NEW_FRAME_HLHSR_ACTION
                    XGL_CTX_SURF_FRONT_COLOR
                    XGL_GCACHE
                    XGL_GCACHE_POLYGON_TYPE
                    XGL_POLYGON_COMPLEX
                    and Table 16-2, Column C at the end of this chapter
Operators Tested:   xgl_object_create
                    xgl_object_set
                    xgl_gcache_multi_simple_polygon
                    xgl_context_display_gcache
Output:             Six polygon point lists displayed as hollow normal with

edges, empty wide edges and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
· gcache_multipg_fill9
Test Types:RGB, SM
Description:Tests various polygon back fill styles for RGB gcache multisimple polygons. Same polygon list as multipg_fill6 but with the normals so that the polygons are back facing, that is, z component is greater than 0.0. First renders the polygons as solids, then as hollow with normal sized edge width, and finally as empty with wide edge width.
Attributes Tested: XGL_3D_CTX_HLHSR_MODE

and Table 16-2, Column C at the end of this chapter
Operators Tested: xgl_object_create
Output:· ms_poly_sedgeSix polygon point lists displayed as hollow normal with edges, empty wide edges, and solid. The shapes inside the polygon point lists are (1) a square, (2) a square, (3) nine triangles with three to a row, (4) a polygon in the shape of a letter "d" with two holes in it, the expected hole, and a hole in the vertical base of the "d", (5) a square within a square, and (6) a square overlapping another square.
Test Types:CM, INDEX
Description:Tests complex (3D) polygons and silhouette edges. The geometry defines a polyhedron with front- and back facing three-sided facets, then turns on XGL_3D_CTX_SURF_SILHOUETTE_EDGE_FLAG. See bug list for more information on failures.
Attributes Tested: XGL_3D_CTX_SURF_BACK_COLOR
                    XGL_3D_CTX_SURF_SILHOUETTE_EDGE_FLAG
                    XGL_3D_CTX_SURF_SILHOUETTE_EDGE_FLAG
                    XGL_CTX_EDGE_COLOR
                    XGL_CTX_SURF_FRONT_COLOR
                    XGL_CTX_VDC_MAP
                    XGL_CTX_VDC_WINDOW
                    XGL_RAS_HEIGHT
                    XGL_RAS_WIDTH
                    XGL_VDC_MAP_ASPECT
                    and Table 16-4, Column A at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_object_get
                    xgl_multi_simple_polygon
Output:             Eight triangles make up the polyhedron. Triangles 1, 2, 3,

and 4 fan out to the right from the pivot point, 200,200. Triangles 5, 6, 7, and 8 fan out to the left from the pivot point, 200,200. Triangles 6 and 7 overlap but 6 is back facing, so we see only triangle 7. We expect a silhouette edge at the borders of triangle 7 and triangle 8. Triangles 5 and 8 overlap but 5 is back facing and we see only triangle 8. Triangles 1 and 4 overlap but triangle 4 is back facing and we see only triangle 1. Triangles 2 and 3 are both front facing and overlap so we see only triangle 3. We expect a silhouette edge at the border of triangle 3. Silhouette edges are yellow and the front surface color is red.
· ms_pg_threshold
Test Types:SM, INDEX
Description:Tests convex and non-convex multisimple polygons with XGL_CTX_THRESHOLD and 2D context. It also sets the threshold and renders with null bbox (which should render all the shapes). This was adapted from pg_threshold.c.
Attributes Tested: XGL_CTX_THRESHOLD
Operators Tested: xgl_object_set
Output:· ms_pg_facet_rgbRenders twelve polygons of different sizes and bboxes with threshold values set from 0 to 100 in increments of 20. Shapes are predominantly in the upper left portion of the window raster with one star shaped object further down the center and to the right. They range from stars to parallelograms.
Test Types:SM, RGB
Description:RGB test for multisimple polygons with the different combinations of XGL_3D_CTX_SURF_FRONT_ILLUMINATION and XGL_CTX_SURF_FRONT_COLOR_SELECTOR. This test uses color facets with Xgl_pt_color_normal_f3d data. An ambient light was set in the ctx so you could see primitives when the illumination model was per vertex or per facet. This test uses RGB color model and sets the surface color to red, vertex colors to green, and facet colors to blue. Light is set to white. Two rows of polygons are rendered per combination (sixteen frames altogether); row 1 is tripointed, row 2 is quadpointed.
Attributes Tested: See Table 16-4, Column B at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Regardless of the illumination--none, none_interp, per

facet or per vertex--using the color selector of SURF_COLOR_CONTEXT yields the row of triangles and the row of squares in the surface color, which is red. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of SURF_COLOR_FACET yields the row of triangles and the row of squares in the facet color, which is blue. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of VERTEX_ILLUM_INDEP yields the row of triangles and the row of squares in the vertex color, which is green. Using the color selector of VERTEX_ILLUM_DEP yields the facet color, which is blue
for illumination NONE and PER_FACET and the vertex color, which is green for illumination NONE_INTERP and PER_VERTEX.
· ms_pg_facet_in
Test Types:CM, INDEX
Description:Tests the index for multisimple polygons with the different combinations of
XGL_3D_CTX_SURF_FRONT_ILLUMINATION and
XGL_CTX_SURF_FRONT_COLOR_SELECTOR. Uses color

facets with Xgl_pt_color_normal_f3d data. An ambient light is set in the ctx so you can see primitives when the illumination model is per vertex or per facet. Uses color ramps and sets the surface color to red, vertex colors to green, and facet colors to blue. Light color is set to white (lightest gray).
Attributes Tested: XGL_CMAP_RAMP_LIST XGL_CMAP_RAMP_NUM and Table 16-4, Column B at the end of this chapter
Operators Tested: xgl_object_set
Output:.....Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of SURF_COLOR_CONTEXT yields the row of triangles and the row of squares in the surface color, which is red. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of SURF_COLOR_FACET yields the row of triangles and the row of squares in the facet color, which is blue. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of VERTEX_ILLUM_INDEP yields the row of triangles and the row of squares in the vertex color, which is green. Using the color selector of VERTEX_ILLUM_DEP yields the facet color, which is blue for illumination NONE and PER_FACET and the vertex color, which is green for illumination NONE_INTERP and PER_VERTEX.
· ms_pg_fac_in_norm
Test Types:CM, RGB
Description:Uses color_normal facets with Xgl_pt_color_normal_f3d data. An ambient light is set in the ctx so you could see primitives when the illumination model is per vertex or per facet. This is derived from ms_pg_fac_in.c, which uses facet_color facets instead of facet_normal_color. Uses color ramps and sets the surface color to red, vertex colors to green, and facet colors to blue. Light color is set to white (lightest gray). When the illumination mode is set to per_facet or per_vertex, colors are obtained from the bottom of the ramp of the color that is set.
Attributes Tested: XGL_CMAP_RAMP_LIST
                    XGL_CMAP_RAMP_NUM
                    and Table 16-4, Column B at the end of this chapter
Operators Tested:   xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Regardless of the illumination--none, none_interp, per

facet or per vertex--using the color selector of SURF_COLOR_CONTEXT yields the row of triangles and the row of squares in the surface color, which appears lime green. Regardless of the illumination--none, none_interp, per facet or per vertex -- using the color selector of SURF_COLOR_FACET yields the row of triangles and the row of squares in the facet color, which appears olive green. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of VERTEX_ILLUM_INDEP yields the row of triangles and the row of squares in the vertex color, which appears orange. Using the color selector of VERTEX_ILLUM_DEP yields the facet color, which appears olive green for illumination NONE and PER_FACET, and the vertex color, which appears orange for illumination NONE_INTERP and PER_VERTEX. The background color is red.
· ms_pg_fac_rgb_norm
Test Types:SM, RGB
Description:RGB test for multisimple polygons with the different combinations of
XGL_3D_CTX_SURF_FRONT_ILLUMINATION and
XGL_CTX_SURF_FRONT_COLOR_SELECTOR. Uses color
normal facets with Xgl_pt_color_normal_f3d data. An
ambient light is set in the ctx so you could see primitives
when the illumination model is per vertex or per facet.
This is derived from ms_pg_facet_rgb.c, which uses
facet_color facets instead of facet_normal_color.

Uses RGB color model and sets the surface color to red, vertex colors to green, facet colors to blue, and the light to white.
Attributes Tested: See Table 16-4, Column B at the end of this chapter.
Operators Tested: xgl_object_set
                    xgl_multi_simple_polygon
                    xgl_object_get
Output:             Regardless of the illumination--none, none_interp, per

facet or per vertex--using the color selector of SURF_COLOR_CONTEXT yields the row of triangles and the row of squares in the surface color, which is red. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of SURF_COLOR_FACET yields the row of triangles and the row of squares in the facet color, which is blue. Regardless of the illumination--none, none_interp, per facet or per vertex--using the color selector of VERTEX_ILLUM_INDEP yields the row of triangles and the row of squares in the vertex color, which is green. Using the color selector of VERTEX_ILLUM_DEP yields the facet color, which is blue for illumination NONE and PER_FACET, and the vertex color, which is green for illumination NONE_INTERP and PER_VERTEX.
Table 16-1
Column AColumn BColumn C
XGL_3D_CTX_SURF_BACK_COLORXGL_CMAP_COLOR_CUBE_SIZEXGL_3D_CTX_HLHSR_MODE
XGL_3D_CTX_SURF_FACE_CULLXGL_CTX_EDGE_ALT_COLORXGL_3D_CTX_SURF_BACK_COLOR
XGL_3D_CTX_SURF_BACK_FILL_ STYLEXGL_CTX_EDGE_COLORXGL_3D_CTX_SURF_BACK_FILL_ STYLE
XGL_3D_CTX_SURF_BACK_ ILLUMINATIONXGL_CTX_EDGE_PATTERNXGL_3D_CTX_SURF_FACE_ DISTINGUISH
XGL_3D_CTX_SURF_FACE_ DISTINGUISHXGL_CTX_EDGE_STYLEXGL_3D_CTX_SURF_NORMAL_FLIP
XGL_3D_CTX_SURF_FRONT_ ILLUMINATIONXGL_CTX_SURF_EDGE_FLAGXGL_CTX_NEW_FRAME_ACTION
XGL_CTX_BACKGROUND_COLORXGL_CTX_SURF_FRONT_COLORXGL_CTX_NEW_FRAME_CLEAR
XGL_CTX_SURF_FRONT_COLORXGL_LINE_ALT_PATTERNEDXGL_CTX_NEW_FRAME_HLHSR_ ACTION
XGL_CULL_OFFXGL_LPATXGL_CTX_SURF_FRONT_COLOR
XGL_CTX_SURF_FRONT_FILL_ STYLEXGL_LPAT_DATAXGL_CTX_SURF_FRONT_FILL_ STYLE
XGL_CULL_BACKXGL_LPAT_DATA_SIZEXGL_HLHSR_Z_BUFFER
XGL_CULL_FRONTXGL_DEV_COLOR_MAPXGL_SURF_FILL_HOLLOW
XGL_ILLUM_NONE
XGL_SURF_FILL_SOLID
XGL_RAS_DEPTHXGL_SURF_FILL_SOLID
Table 16-2
Column AColumn BColumn C
XGL_3D_CTX_DEPTH_CUE_MODEXGL_3D_CTX_SURF_BACK_COLORXGL_CTX_EDGE_COLOR
XGL_3D_CTX_SURF_BACK_COLORXGL_CTX_SURF_FRONT_COLORXGL_CTX_EDGE_WIDTH_SCALE_ FACTOR
XGL_CTX_SURF_FRONT_COLORXGL_3D_CTX_SURF_BACK_FILL_ STYLEXGL_CTX_SURF_EDGE_FLAG
XGL_CTX_VDC_MAPXGL_3D_CTX_SURF_FACE_ DISTINGUISHXGL_CTX_SURF_FRONT_FILL_ STYLE
XGL_CTX_VDC_WINDOWXGL_3D_CTX_SURF_NORMAL_FLIPXGL_SURF_FILL_EMPTY
XGL_DEPTH_CUE_LINEARXGL_CTX_SURF_FRONT_FILL_ STYLEXGL_SURF_FILL_HOLLOW
XGL_RAS_HEIGHTXGL_SURF_FILL_HOLLOWXGL_SURF_FILL_SOLID
XGL_RAS_WIDTH
XGL_VDC_MAP_ASPECT
XGL_SURF_FILL_SOLID
Table 16-3
Column AColumn BColumn C
XGL_CTX_BACKGROUND_COLORXGL_CTX_BACKGROUND_COLORXGL_3D_CTX_SURF_BACK_COLOR
XGL_CTX_EDGE_COLORXGL_CTX_SURF_FPATXGL_3D_CTX_SURF_BACK_FILL_ STYLE
XGL_CTX_SURF_EDGE_FLAGXGL_CTX_SURF_FPAT_POSITIONXGL_3D_CTX_SURF_BACK_FPAT
XGL_CTX_SURF_FPATXGL_CTX_SURF_FRONT_COLORXGL_3D_CTX_SURF_BACK_FPAT_ POSITION
XGL_CTX_SURF_FPAT_POSITIONXGL_SURF_FILL_SOLIDXGL_3D_CTX_SURF_FACE_ DISTINGUISH
XGL_CTX_SURF_FRONT_COLORXGL_CTX_SURF_FRONT_FILL_ STYLEXGL_CTX_BACKGROUND_COLOR
XGL_CTX_SURF_FRONT_FILL_ STYLE

XGL_SURF_FILL_STIPPLE

XGL_SURF_FILL_OPAQUE_STIPPLE
Table 16-4
Column AColumn B
XGL_3D_CTX_HLHSR_MODEXGL_3D_CTX_LIGHTS
XGL_3D_CTX_SURF_FRONT_ILLUMINATIONXGL_3D_CTX_LIGHT_NUM
XGL_CTX_NEW_FRAME_ACTIONXGL_3D_CTX_LIGHT_SWITCHES
XGL_CTX_NEW_FRAME_CLEARXGL_3D_CTX_SURF_FRONT_AMBIENT
XGL_ILLUM_NONEXGL_3D_CTX_SURF_FRONT_ILLUMINATION
XGL_CTX_NEW_FRAME_HLHSR_ACTIONXGL_CTX_SURF_FRONT_COLOR
XGL_CTX_SURF_FRONT_FILL_STYLEXGL_3D_CTX_SURF_FRONT_LIGHT_COMPONENT
XGL_HLHSR_Z_BUFFERXGL_CTX_SURF_FRONT_COLOR_SELECTOR
XGL_DEV_COLOR_MAPXGL_ILLUM_NONE
XGL_SURF_FILL_SOLIDXGL_ILLUM_NONE_INTERP_COLOR
XGL_ILLUM_PER_FACET
XGL_ILLUM_PER_VERTEX
XGL_LIGHT_AMBIENT
XGL_LIGHT_COLOR
XGL_LIGHT_ENABLE_COMP_AMBIENT
XGL_LIGHT_TYPE
XGL_SURF_COLOR_CONTEXT
XGL_SURF_COLOR_FACET
XGL_SURF_COLOR_VERTEX_ILLUM_DEP
XGL_SURF_COLOR_VERTEX_ILLUM_INDEP