Contenues dans
Trouver plus de documentation
Ressources d'assistance comprises
| Télécharger cet ouvrage au format PDF
Context Test Descriptions
12
- This chapter describes the Context 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
· context_2d_create
-
| Test Types: | INDEX, SM |
| Description: | Tests that several context objects can be created |
- Attributes Tested: XGL_CTX_MARKER
- Operators Tested: xgl_multimarker
- Output:.....2D marker displayed using the 19th context created
· context_2d_error
-
| Test Types: | RGB or INDEX, CM |
| Description: | Sets erroneous values for all 2D attributes to ensure correct error detection. |
- Attributes Tested: All 2D context attributes
- Operators Tested: None
-
| Output:· context_3d_error | Error messages |
| Test Types: | RGB or INDEX, CM |
| Description: | Sets erroneous values for all 3D attributes to ensure correct error detection. |
- Attributes Tested: All 3D context attributes
- Operators Tested: None
-
| Output:· context_2d_pat_line | Error messages |
| Test Types: | INDEX, SM |
| Description: | Creates a 2D context, attaches to a raster and draws 2D lines using different line patterns. |
- Attributes Tested: See Table 12-1, Column A at the end of this chapter.
- Operators Tested: xgl_multipolyline
-
| Output:· context_2d_pat_line_rgb | Patterned lines are drawn. |
| Test Types: | RGB, SM |
| Description: | Creates a 2D context, attaches to a raster and draws 2D lines using different line patterns. |
- Attributes Tested: See Table 12-1, Column A at the end of this chapter.
- Operators Tested: xgl_multipolyline
- Output:.....Patterned lines are drawn.
· context_2d_pp
-
| Test Types: | INDEX, SM |
| Description: | Creates contexts, attaches to a raster and draws a circle, line, and rectangle. Pushes/pops to check for memory leaks. Pushes context, destroys it, and checks the pop operation for results. |
- Attributes Tested: See Table 12-1, Column B at the end of this chapter.
- Operators Tested: xgl_multicircle
-
-
xgl_multipolyline
xgl_multirectangle
Output: A circle, line, and rectangle are drawn.
· context_2d_pp_all_attrs
-
| Test Types: | INDEX, SM |
| Description: | Context pushes/pops all pushable 2D context attributes by calling xgl_context_push() with a NULL attribute list. Makes sure all attribute values are pushed and popped correctly using xgl_object_get(). |
- Attributes Tested: See Table 12-2 at the end of this chapter.
- Operators Tested: xgl_context_pop
-
-
xgl_context_push
xgl_multiarc
xgl_multimarker
xgl_multipolyline
xgl_nu_bspline_curve
xgl_stroke_text
Output: A line, marker and arc are displayed.
· context_2d_pp_pat_line
-
| Test Types: | INDEX, SM |
| Description: | Creates contexts, attaches to a raster and draws lines. Pushes/pops/post contexts and verifies correct values recovered when popped. |
- Attributes Tested: See Table 12-1, Column C at the end of this chapter.
- Operators Tested: xgl_context_pop
-
-
xgl_context_push
xgl_multipolyline
-
| Output:· context_2d_pp_pat_line_rgb | Sets a line pattern, draws a patterned line, then pushes context. Sets another line pattern, draws another line, and then pops. Draws a line again without setting another line pattern. |
| Test Types: | RGB, SM |
| Description: | Creates contexts, attaches to an RGB raster, and draws lines. Pushes/pops/posts contexts and verifies correct values recovered when popped. |
- Attributes Tested: See Table 12-1, Column C at the end of this chapter.
- Operators Tested: xgl_context_pop
-
-
xgl_context_push
xgl_multipolyline
Output: Sets a line pattern, draws a patterned line, then pushes
- context, sets another line pattern, draws another line, and then pops. Draws a line again without setting another line pattern.
· context_2d_pp_rgb
-
| Test Types: | RGB, SM |
| Description: | Creates contexts, attaches to a raster and draws a circle, line, and rectangle. Pushes/pops to check for memory leaks. Pushes context, destroys it, and checks pop operation for results. |
- Attributes Tested: See Table 12-1, Column B at the end of this chapter.
- Operators Tested: xgl_context_pop
-
| Output:· context_2d_pu_non_null_attrs: | A circle, line and rectangle are drawn. |
| Test Types: | INDEX, SM |
- Description:...Context pushes/pops all pushable 2D context attributes by calling xgl_context_push() with a non-NULL attribute list. Makes sure all attribute values are pushed and popped correctly using xgl_object_get().
- Attributes Tested: See Table 12-2, at the end of this chapter.
- Operators Tested: xgl_multiarc
-
-
xgl_multimarker
xgl_multipolyline
xgl_nu_bspline_curve
xgl_stroke_text
Output: A line, marker and arc are displayed.
· context_2d_set_get_pixel
-
| Test Types: | INDEX, SM |
| Description: | Creates a context, sets pixels and gets them back. |
- Attributes Tested: Default
- Operators Tested: xgl_context_get_pixel
-
-
xgl_context_set_pixel
Output: A region is drawn using xgl_context_set_pixel().
· context_2d_set_get_pixel_rgb
-
| Test Types: | RGB, SM |
| Description: | Creates a context, sets pixels and gets them back. |
- Attributes Tested: Default
- Operators Tested: xgl_context_get_pixel
-
-
xgl_context_set_pixel
Output: A region is drawn using xgl_context_set_pixel().
· context_2d_simple
-
| Test Types: | INDEX, SM |
| Description: | Creates contexts, attaches one to a raster and draws rectangles. Switches a context, sets/gets a pixel value and verifies correct value. |
- Attributes Tested: See Table 12-4, Column A at the end of this chapter.
- Operators Tested: xgl_context_get_pixel
-
| Output:· context_2d_simple_env_attrs | A red rectangle is drawn. |
| Test Types: | INDEX, SM |
| Description: | Checks that environmental context attributes (deferral mode, device and threshold) can be set and retrieved properly |
- Attributes Tested: See Table 12-4, Column B at the end of this chapter.
- Operators Tested: xgl_object_get
-
-
xgl_object_set
Output: Nothing is displayed.
· context_dc_offset
-
| Test Types: | RGB, CM |
| Description: | Tests the XGL_3D_CTX_SURF_DC_OFFSET attribute. |
- Attributes Tested: XGL_3D_CTX_SURF_DC_OFFSET
- Operators Tested: xgl_quadrilateral_mesh
-
-
xgl_multipolyline
Output: Quadmeshed sphere and polylines
· context_env_attrs_rgb
-
| Test Types: | RGB, SM |
| Description: | Context pushes/pops environmental attributes. Their values should not be affected by a context pop. |
- Attributes Tested: See Table 12-4, Column C at the end of this chapter.
- Operators Tested: xgl_context_pop
-
| Output:· context_gf_attrs_rgb | Nothing is displayed. |
| Test Types: | RGB, SM |
| Description: | Context pushes/pops graphical attributes. Makes sure their values are all pushed and popped correctly. |
- Attributes Tested: See Table 12-3 at the end of this chapter.
- Operators Tested: xgl_context_pop
-
-
xgl_context_push
xgl_transform_read
xgl_transform_rotate
xgl_transform_scale
xgl_transform_translate
Output: Nothing is displayed.
· context_pp_all_attrs
-
| Test Types: | INDEX, SM |
| Description: | Context pushes/pops all pushable 3D context attributes by calling xgl_context_push() with a NULL attribute list. Makes sure all attribute values are pushed and popped correctly using xgl_object_get(). |
- Attributes Tested: See Table 12-2 at the end of this chapter.
- Operators Tested: xgl_context_pop
-
| Output:· context_pu_non_null_attrs | A line, marker, and arc are displayed. |
| Test Types: | INDEX, SM |
| Description: | Context pushes/pops all pushable 3D context attributes by calling xgl_context_push() with a non-NULL attribute list. Makes sure all attribute values are pushed and popped correctly using xgl_object_get(). |
- Attributes Tested: See Table 12-2 at the end of this chapter.
- Operators Tested: xgl_context_pop
-
-
xgl_context_push
xgl_multiarc
xgl_multimarker
xgl_multipolyline
-
-
xgl_nu_bspline_curve
xgl_object_get
xgl_object_set
xgl_stroke_text
Output: A line, marker and arc are displayed.
· context_accumulate
-
| Test Types: | SM, RGB |
| Description: | Tests xgl_context_accumulate operators |
- Attributes Tested: XGL_BUFFER_SEL_DISPLAY
- Operators Tested: xgl_context_accumulate
-
| Output:· context_zbuf_comp_method | Draws a polygon, accumulates draw buffer onto itself than clears buffer |
| Test Types: | RGB, CM |
| Description: | Tests Z_BUFFER_COMP_METHOD attributes |
- Attributes Tested: XGL_3D_CTX_Z_BUFFER_COMP_METHOD
- Operators Tested: xgl_multiarc
-
-
xgl_multirectangle
xgl_multicircle
xgl_context_new_frame
Output: A stack of red circles, blue arcs, and green rectangles
· context_zbuf_comp_method2
-
| Test Types: | RGB, CM |
| Description: | Tests Z_BUFFER_COMP_METHOD attributes |
- Attributes Tested: XGL_3D_CTX_Z_BUFFER_COMP_METHOD
- Operators Tested: xgl_multiarc
-
-
xgl_multirectangle
xgl_multicircle
xgl_context_new_frame
Output: A stack of red circles, blue arcs, and green rectangles
· edge_3d
-
| Test Types: | CM, RGB |
| Description: | Tests EDGE_CAP, EDGE_JOIN, and EDGE_MITER_LIMIT |
- Attributes Tested: XGL_CTX_EDGE_CAP
-
-
XGL_CTX_EDGE_JOIN
XGL_CTX_EDGE_MITER_LIMIT
Operators Tested: xgl_multirectangle
Output: A stack of hollow rectangles with edges on
· draw_front_buffer
-
| Test Types: | SM, RGB |
| Description: | Tests rendering to front buffer with context attribute XGL_CTX_RENDER_BUFFER |
- Attributes Tested: XGL_WIN_RAS_BUFFERS_REQUESTED
- Operators Tested: xgl_context_new_frame
-
-
xgl_multiarc
xgl_multicircle
xgl_multipolyline
xgl_multimarker
xgl_multi_simple_polygon
xgl_polygon
- Output:.....A blue background is drawn then a red background with a blue arc appears. A blue circle on a red background, a green polyline, four yellow asterisk markers, and then three consecutive blue squares are displayed.
-
Table 12-1
| Column A | Column B | Column C |
| XGL_CTX_LINE_COLOR | XGL_CTX_SURF_FRONT_COLOR | XGL_CTX_LINE_COLOR |
| XGL_LPAT_DATA_SIZE | XGL_CTX_NURBS_CURVE_APPROX
(XGL_CURVE_METRIC_VDC) | XGL_LPAT_DATA |
| XGL_LPAT_DATA | XGL_CTX_NURBS_CURVE_APPROX_VAL | XGL_CTX_LINE_PATTERN |
XGL_LPAT_COORD_SYS
(XGL_LPAT_DC) | XGL_MULTICIRCLE_I2D | XGL_CTX_LINE_STYLE
(XGL_LINE_PATTERNED) |
XGL_LPAT_DATA_TYPE
(XGL_DATA_INT)
XGL_LPAT_OFFSET
XGL_CTX_LINE_PATTERN
XGL_CTX_LINE_STYLE
XGL_PT_I2D | XGL_MULTIRECT_I2D |
-
Table 12-2
| XGL_CTX_DEFERRAL_MODE | XGL_CTX_RENDERING | XGL_CTX_VDC_ORIENTATION |
| XGL_CTX_MODEL_TRANS_STACK_ SIZE | XGL_CTX_PICK_ENABLE | XGL_CTX_PICK_APERTURE |
| XGL_CTX_PICK_SURF_STYLE | XGL_CTX_VIEW_MODEL_DATA_ TYPE | XGL_CTX_LOCAL_MODEL_TRANS |
| XGL_CTX_GLOBAL_MODEL_ TRANS | XGL_CTX_VIEW_TRANS | XGL_CTX_VIEW_CLIP_BOUNDS |
| XGL_CTX_VDC_WINDOW | XGL_CTX_CLIP_PLANES | XGL_CTX_VDC_MAP |
| XGL_CTX_THRESHOLD | XGL_CTX_PLANE_MASK | XGL_CTX_ROP |
| XGL_CTX_BACKGROUND_COLOR | XGL_CTX_RASTER_FILL_STYLE | XGL_CTX_RASTER_STIPPLE_ COLOR |
| XGL_CTX_RASTER_FPAT_POSITION | XGL_CTX_RASTER_FPAT | XGL_CTX_NEW_FRAME_ACTION |
| XGL_CTX_LINE_COLOR | XGL_CTX_LINE_CAP | XGL_CTX_LINE_JOIN |
-
Table 12-2 (Continued)
| XGL_CTX_LINE_MITER_LIMIT | XGL_CTX_LINE_STYLE | XGL_CTX_LINE_PATTERN |
| XGL_CTX_LINE_ALT_COLOR | XGL_CTX_LINE_WIDTH_SCALE_ FACTOR | XGL_CTX_LINE_COLOR_SELECTOR |
| XGL_CTX_MIN_TESSELLATION | XGL_CTX_MAX_TESSELLATION | XGL_CTX_NURBS_CURVE_APPROX |
| XGL_CTX_NURBS_CURVE_ APPROX_VAL | XGL_CTX_SURF_FRONT_COLOR | XGL_CTX_SURF_FRONT_FILL_ STYLE |
| XGL_CTX_SURF_INTERIOR_RULE | XGL_CTX_SURF_FRONT_FPAT_ POSITION | XGL_CTX_SURF_FRONT_FPAT |
| XGL_CTX_SURF_FRONT_COLOR_ SELECTOR | XGL_CTX_SURF_EDGE_FLAG | XGL_CTX_EDGE_COLOR |
| XGL_CTX_EDGE_STYLE | XGL_CTX_EDGE_PATTERN | XGL_CTX_EDGE_ALT_COLOR |
| XGL_CTX_EDGE_WIDTH_SCALE_ FACTOR | XGL_CTX_ARC_FILL_STYLE | XGL_CTX_MARKER_COLOR |
| XGL_CTX_MARKER_SCALE_ FACTOR | XGL_CTX_MARKER | XGL_CTX_MARKER_COLOR_ SELECTOR |
| XGL_CTX_SFONT_0 | XGL_CTX_SFONT_1 | XGL_CTX_SFONT_2 |
| XGL_CTX_SFONT_3 | XGL_CTX_STEXT_CHAR_ ENCODING | XGL_CTX_STEXT_CHAR_HEIGHT |
| XGL_CTX_STEXT_CHAR_SPACING | XGL_CTX_STEXT_CHAR_ EXPANSION_FACTOR | XGL_CTX_STEXT_PATH |
| XGL_CTX_STEXT_CHAR_UP_ VECTOR | XGL_CTX_STEXT_CHAR_SLANT_ ANGLE | XGL_CTX_STEXT_ALIGN_HORIZ |
| XGL_CTX_STEXT_ALIGN_VERT | XGL_CTX_STEXT_PRECISION | XGL_CTX_STEXT_COLOR |
| XGL_CTX_PICK_ID_1 | XGL_CTX_PICK_ID_2 | XGL_CTX_ATEXT_CHAR_HEIGHT |
| XGL_CTX_ATEXT_CHAR_UP_ VECTOR | XGL_CTX_ATEXT_CHAR_SLANT_ ANGLE | XGL_CTX_ATEXT_PATH |
| XGL_CTX_ATEXT_ALIGN_HORIZ | XGL_CTX_ATEXT_ALIGN_VERT | XGL_CTX_ATEXT_STYLE |
| XGL_CTX_PICK_BUFFER_SIZE | XGL_CTX_PICK_STYLE | XGL_CTX_DC_VIEWPORT |
-
Table 12-3
| XGL_3D_CTX_HLHSR_DATA | XGL_3D_CTX_HLHSR_MODE | XGL_3D_CTX_LIGHT_SWITCHES |
| XGL_3D_CTX_LINE_COLOR_ INTERP | XGL_3D_CTX_SURF_BACK_ AMBIENT | XGL_3D_CTX_SURF_BACK_COLOR |
| XGL_3D_CTX_SURF_BACK_DIFFUS E | XGL_3D_CTX_SURF_BACK_FILL_ STYLE | XGL_3D_CTX_SURF_BACK_FPAT |
| XGL_3D_CTX_SURF_BACK_FPAT_ POSITION | XGL_3D_CTX_SURF_BACK_ ILLUMINATION | XGL_3D_CTX_SURF_BACK_LIGHT_ COMPONENT |
| XGL_3D_CTX_SURF_BACK_LIGHT_ TYPE | XGL_3D_CTX_SURF_BACK_ SPECULAR | XGL_3D_CTX_SURF_BACK_ SPECULAR_COLOR |
| XGL_3D_CTX_SURF_BACK_ SPECULAR_POWER | XGL_3D_CTX_SURF_FACE_CULL | XGL_3D_CTX_SURF_FACE_ DISTINGUISH |
| XGL_3D_CTX_SURF_FRONT_ AMBIENT | XGL_3D_CTX_SURF_FRONT_ DIFFUSE | XGL_3D_CTX_SURF_FRONT_ ILLUMINATION |
| XGL_3D_CTX_SURF_FRONT_ LIGHT_COMPONENT | XGL_3D_CTX_SURF_FRONT_ LIGHT_TYPE | XGL_3D_CTX_SURF_FRONT_ SPECULAR |
| XGL_3D_CTX_SURF_FRONT_ SPECULAR_COLOR | XGL_3D_CTX_SURF_FRONT_ SPECULAR_POWER | XGL_3D_CTX_SURF_GEOM_ NORMAL |
| XGL_3D_CTX_VIEW_CLIP_PLUS_W_ ONLY | XGL_CTX_ATEXT_CHAR_HEIGHT | XGL_CTX_ATEXT_CHAR_UP_ VECTOR |
| XGL_CTX_ATEXT_STYLE | XGL_CTX_ATEXT_ALIGN_HORIZ | XGL_CTX_ATEXT_ALIGN_VERT |
| XGL_CTX_ARC_FILL_STYLE | XGL_CTX_BACKGROUND_COLOR | XGL_CTX_CLIP_PLANES |
| XGL_CTX_NURBS_CURVE_APPROX | XGL_CTX_NURBS_CURVE_ APPROX_VAL | XGL_CTX_DC_VIEWPORT |
| XGL_CTX_EDGE_ALT_COLOR | XGL_CTX_EDGE_COLOR | XGL_CTX_EDGE_PATTERN |
| XGL_CTX_EDGE_STYLE | XGL_CTX_EDGE_WIDTH_SCALE_ FACTOR | XGL_CTX_GLOBAL_MODEL_ TRANS |
| XGL_CTX_LINE_ALT_COLOR | XGL_CTX_LINE_CAP | XGL_CTX_LINE_COLOR |
| XGL_CTX_LINE_JOIN | XGL_CTX_LINE_PATTERN | XGL_CTX_LINE_STYLE |
| XGL_CTX_LINE_WIDTH_SCALE_ FACTOR | XGL_CTX_LOCAL_MODEL_TRANS | XGL_CTX_MARKER_COLOR |
-
Table 12-3 (Continued)
| XGL_CTX_MARKER | XGL_CTX_MARKER_SCALE_ FACTOR | XGL_CTX_MAX_TESSELLATION |
| XGL_CTX_LINE_MITER_LIMIT | XGL_CTX_NEW_FRAME_ACTION | XGL_CTX_PICK_ID_1 |
| XGL_CTX_PICK_ID_2 | XGL_CTX_PLANE_MASK | XGL_CTX_RASTER_FILL_STYLE |
| XGL_CTX_RASTER_FPAT | XGL_CTX_RASTER_FPAT_POSITION | XGL_CTX_RASTER_STIPPLE_ COLOR |
| XGL_CTX_ROP | XGL_CTX_STEXT_CHAR_ EXPANSION_FACTOR | XGL_CTX_STEXT_CHAR_HEIGHT |
| XGL_CTX_STEXT_CHAR_SLANT_ ANGLE | XGL_CTX_STEXT_CHAR_SPACING | XGL_CTX_STEXT_CHAR_UP_ VECTOR |
| XGL_CTX_SFONT_0 | XGL_CTX_SFONT_1 | XGL_CTX_SFONT_2 |
| XGL_CTX_SFONT_3 | XGL_CTX_STEXT_ALIGN_HORIZ | XGL_CTX_STEXT_ALIGN_VERT |
| XGL_CTX_STEXT_COLOR | XGL_CTX_STEXT_PATH | XGL_CTX_STEXT_PRECISION |
| XGL_CTX_SURF_EDGE_FLAG | XGL_CTX_SURF_FRONT_FPAT | XGL_CTX_SURF_FRONT_FPAT_ POSITION |
| XGL_CTX_SURF_FRONT_COLOR | XGL_CTX_SURF_FRONT_FILL_ STYLE | XGL_CTX_THRESHOLD |
XGL_CTX_VDC_MAP
XGL_CTX_VIEW_TRANS | XGL_CTX_VDC_WINDOW | XGL_CTX_VIEW_CLIP_BOUNDS |
-
Table 12-4
| Column A | Column B | Column C |
| XGL_CTX_SURF_FRONT_COLOR | XGL_CTX_DEFERRAL_MODE | XGL_CTX_DEFERRAL_MODE |
XGL_CTX_DEFERRAL_MODE
(XGL_DEFER_ASAP)
(XGL_DEFER_ASTI) | XGL_CTX_DEVICE | XGL_CTX_DEVICE |
| XGL_CTX_THRESHOLD | XGL_CTX_RENDERING
XGL_CTX_PICK_BUFFER_SIZE
XGL_CTX_PICK_STYLE
XGL_CTX_PICK_ENABLE |
-
Table 12-4
| Column A | Column B | Column C |
|
| XGL_CTX_PICK_APERTURE
XGL_CTX_VDC_ORIENTATION
XGL_3D_CTX_DEPTH_CUE_MODE
XGL_3D_CTX_DEPTH_CUE_COLOR
XGL_3D_CTX_LIGHT_NUM
XGL_3D_CTX_LIGHTS |
|
|