XGL Test Suite User's Guide
  Rechercher uniquement dans ce livre
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_errorError 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_lineError 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_rgbPatterned 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_rgbSets 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_attrsA 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_rgbNothing 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_attrsA 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_methodDraws 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 AColumn BColumn C
XGL_CTX_LINE_COLORXGL_CTX_SURF_FRONT_COLORXGL_CTX_LINE_COLOR
XGL_LPAT_DATA_SIZEXGL_CTX_NURBS_CURVE_APPROX
(XGL_CURVE_METRIC_VDC)
XGL_LPAT_DATA
XGL_LPAT_DATAXGL_CTX_NURBS_CURVE_APPROX_VALXGL_CTX_LINE_PATTERN
XGL_LPAT_COORD_SYS
(XGL_LPAT_DC)
XGL_MULTICIRCLE_I2DXGL_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_MODEXGL_CTX_RENDERINGXGL_CTX_VDC_ORIENTATION
XGL_CTX_MODEL_TRANS_STACK_ SIZEXGL_CTX_PICK_ENABLEXGL_CTX_PICK_APERTURE
XGL_CTX_PICK_SURF_STYLEXGL_CTX_VIEW_MODEL_DATA_ TYPEXGL_CTX_LOCAL_MODEL_TRANS
XGL_CTX_GLOBAL_MODEL_ TRANSXGL_CTX_VIEW_TRANSXGL_CTX_VIEW_CLIP_BOUNDS
XGL_CTX_VDC_WINDOWXGL_CTX_CLIP_PLANESXGL_CTX_VDC_MAP
XGL_CTX_THRESHOLDXGL_CTX_PLANE_MASKXGL_CTX_ROP
XGL_CTX_BACKGROUND_COLORXGL_CTX_RASTER_FILL_STYLEXGL_CTX_RASTER_STIPPLE_ COLOR
XGL_CTX_RASTER_FPAT_POSITIONXGL_CTX_RASTER_FPATXGL_CTX_NEW_FRAME_ACTION
XGL_CTX_LINE_COLORXGL_CTX_LINE_CAPXGL_CTX_LINE_JOIN
Table 12-2 (Continued)
XGL_CTX_LINE_MITER_LIMITXGL_CTX_LINE_STYLEXGL_CTX_LINE_PATTERN
XGL_CTX_LINE_ALT_COLORXGL_CTX_LINE_WIDTH_SCALE_ FACTORXGL_CTX_LINE_COLOR_SELECTOR
XGL_CTX_MIN_TESSELLATIONXGL_CTX_MAX_TESSELLATIONXGL_CTX_NURBS_CURVE_APPROX
XGL_CTX_NURBS_CURVE_ APPROX_VALXGL_CTX_SURF_FRONT_COLORXGL_CTX_SURF_FRONT_FILL_ STYLE
XGL_CTX_SURF_INTERIOR_RULEXGL_CTX_SURF_FRONT_FPAT_ POSITIONXGL_CTX_SURF_FRONT_FPAT
XGL_CTX_SURF_FRONT_COLOR_ SELECTORXGL_CTX_SURF_EDGE_FLAGXGL_CTX_EDGE_COLOR
XGL_CTX_EDGE_STYLEXGL_CTX_EDGE_PATTERNXGL_CTX_EDGE_ALT_COLOR
XGL_CTX_EDGE_WIDTH_SCALE_ FACTORXGL_CTX_ARC_FILL_STYLEXGL_CTX_MARKER_COLOR
XGL_CTX_MARKER_SCALE_ FACTORXGL_CTX_MARKERXGL_CTX_MARKER_COLOR_ SELECTOR
XGL_CTX_SFONT_0XGL_CTX_SFONT_1XGL_CTX_SFONT_2
XGL_CTX_SFONT_3XGL_CTX_STEXT_CHAR_ ENCODINGXGL_CTX_STEXT_CHAR_HEIGHT
XGL_CTX_STEXT_CHAR_SPACINGXGL_CTX_STEXT_CHAR_ EXPANSION_FACTORXGL_CTX_STEXT_PATH
XGL_CTX_STEXT_CHAR_UP_ VECTORXGL_CTX_STEXT_CHAR_SLANT_ ANGLEXGL_CTX_STEXT_ALIGN_HORIZ
XGL_CTX_STEXT_ALIGN_VERTXGL_CTX_STEXT_PRECISIONXGL_CTX_STEXT_COLOR
XGL_CTX_PICK_ID_1XGL_CTX_PICK_ID_2XGL_CTX_ATEXT_CHAR_HEIGHT
XGL_CTX_ATEXT_CHAR_UP_ VECTORXGL_CTX_ATEXT_CHAR_SLANT_ ANGLEXGL_CTX_ATEXT_PATH
XGL_CTX_ATEXT_ALIGN_HORIZXGL_CTX_ATEXT_ALIGN_VERTXGL_CTX_ATEXT_STYLE
XGL_CTX_PICK_BUFFER_SIZEXGL_CTX_PICK_STYLEXGL_CTX_DC_VIEWPORT
Table 12-3
XGL_3D_CTX_HLHSR_DATAXGL_3D_CTX_HLHSR_MODEXGL_3D_CTX_LIGHT_SWITCHES
XGL_3D_CTX_LINE_COLOR_ INTERPXGL_3D_CTX_SURF_BACK_ AMBIENTXGL_3D_CTX_SURF_BACK_COLOR
XGL_3D_CTX_SURF_BACK_DIFFUS EXGL_3D_CTX_SURF_BACK_FILL_ STYLEXGL_3D_CTX_SURF_BACK_FPAT
XGL_3D_CTX_SURF_BACK_FPAT_ POSITIONXGL_3D_CTX_SURF_BACK_ ILLUMINATIONXGL_3D_CTX_SURF_BACK_LIGHT_ COMPONENT
XGL_3D_CTX_SURF_BACK_LIGHT_ TYPEXGL_3D_CTX_SURF_BACK_ SPECULARXGL_3D_CTX_SURF_BACK_ SPECULAR_COLOR
XGL_3D_CTX_SURF_BACK_ SPECULAR_POWERXGL_3D_CTX_SURF_FACE_CULLXGL_3D_CTX_SURF_FACE_ DISTINGUISH
XGL_3D_CTX_SURF_FRONT_ AMBIENTXGL_3D_CTX_SURF_FRONT_ DIFFUSEXGL_3D_CTX_SURF_FRONT_ ILLUMINATION
XGL_3D_CTX_SURF_FRONT_ LIGHT_COMPONENTXGL_3D_CTX_SURF_FRONT_ LIGHT_TYPEXGL_3D_CTX_SURF_FRONT_ SPECULAR
XGL_3D_CTX_SURF_FRONT_ SPECULAR_COLORXGL_3D_CTX_SURF_FRONT_ SPECULAR_POWERXGL_3D_CTX_SURF_GEOM_ NORMAL
XGL_3D_CTX_VIEW_CLIP_PLUS_W_ ONLYXGL_CTX_ATEXT_CHAR_HEIGHTXGL_CTX_ATEXT_CHAR_UP_ VECTOR
XGL_CTX_ATEXT_STYLEXGL_CTX_ATEXT_ALIGN_HORIZXGL_CTX_ATEXT_ALIGN_VERT
XGL_CTX_ARC_FILL_STYLEXGL_CTX_BACKGROUND_COLORXGL_CTX_CLIP_PLANES
XGL_CTX_NURBS_CURVE_APPROXXGL_CTX_NURBS_CURVE_ APPROX_VALXGL_CTX_DC_VIEWPORT
XGL_CTX_EDGE_ALT_COLORXGL_CTX_EDGE_COLORXGL_CTX_EDGE_PATTERN
XGL_CTX_EDGE_STYLEXGL_CTX_EDGE_WIDTH_SCALE_ FACTORXGL_CTX_GLOBAL_MODEL_ TRANS
XGL_CTX_LINE_ALT_COLORXGL_CTX_LINE_CAPXGL_CTX_LINE_COLOR
XGL_CTX_LINE_JOINXGL_CTX_LINE_PATTERNXGL_CTX_LINE_STYLE
XGL_CTX_LINE_WIDTH_SCALE_ FACTORXGL_CTX_LOCAL_MODEL_TRANSXGL_CTX_MARKER_COLOR
Table 12-3 (Continued)
XGL_CTX_MARKERXGL_CTX_MARKER_SCALE_ FACTORXGL_CTX_MAX_TESSELLATION
XGL_CTX_LINE_MITER_LIMITXGL_CTX_NEW_FRAME_ACTIONXGL_CTX_PICK_ID_1
XGL_CTX_PICK_ID_2XGL_CTX_PLANE_MASKXGL_CTX_RASTER_FILL_STYLE
XGL_CTX_RASTER_FPATXGL_CTX_RASTER_FPAT_POSITIONXGL_CTX_RASTER_STIPPLE_ COLOR
XGL_CTX_ROPXGL_CTX_STEXT_CHAR_ EXPANSION_FACTORXGL_CTX_STEXT_CHAR_HEIGHT
XGL_CTX_STEXT_CHAR_SLANT_ ANGLEXGL_CTX_STEXT_CHAR_SPACINGXGL_CTX_STEXT_CHAR_UP_ VECTOR
XGL_CTX_SFONT_0XGL_CTX_SFONT_1XGL_CTX_SFONT_2
XGL_CTX_SFONT_3XGL_CTX_STEXT_ALIGN_HORIZXGL_CTX_STEXT_ALIGN_VERT
XGL_CTX_STEXT_COLORXGL_CTX_STEXT_PATHXGL_CTX_STEXT_PRECISION
XGL_CTX_SURF_EDGE_FLAGXGL_CTX_SURF_FRONT_FPATXGL_CTX_SURF_FRONT_FPAT_ POSITION
XGL_CTX_SURF_FRONT_COLORXGL_CTX_SURF_FRONT_FILL_ STYLEXGL_CTX_THRESHOLD
XGL_CTX_VDC_MAP
XGL_CTX_VIEW_TRANS
XGL_CTX_VDC_WINDOWXGL_CTX_VIEW_CLIP_BOUNDS

Table 12-4
Column AColumn BColumn C
XGL_CTX_SURF_FRONT_COLORXGL_CTX_DEFERRAL_MODEXGL_CTX_DEFERRAL_MODE
XGL_CTX_DEFERRAL_MODE
(XGL_DEFER_ASAP)
(XGL_DEFER_ASTI)
XGL_CTX_DEVICEXGL_CTX_DEVICE
XGL_CTX_THRESHOLDXGL_CTX_RENDERING
XGL_CTX_PICK_BUFFER_SIZE
XGL_CTX_PICK_STYLE
XGL_CTX_PICK_ENABLE
Table 12-4
Column AColumn BColumn 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