For an overview and for a list of pipeline context functions, see Pipeline Contexts.
Topics include:
A pipeline context is a PEX resource containing an instance of the set of attributes which describe a rendering pipeline state. Although many pipeline context resources may exist, at any particular time at most one is associated with a particular renderer. A pipeline context is associated with a renderer by setting the renderer's pipeline context attribute to the resource ID of the pipeline context. The attributes in the pipeline context associated with a renderer are used to initialize the renderer's pipeline state whenever one of the following functions are invoked:
If no pipeline context is associated with a renderer, the renderer uses the default values listed below to initialize the pipeline state. The PEXCopyPCToPipelineState function differs slightly in that it modifies a renderer's pipeline state according to the contents of a pipeline context that is not necessarily the one associated with the renderer.
This pipeline context section describes pipeline context attributes and the operations that you can perform on pipeline context resources.
Some of the attributes in a pipeline context are references to other resources. If you create a resource and put its identifier in a pipeline context attribute, and then free that resource, then the implementation returns the value PEXAlreadyFreed as the resource identifier of the freed resource as the result of a query of that pipeline context attribute. The freed resource continues to exist as long as it continues to be referenced, either by the pipeline context or another resource.
If you wish to modify a reference to a resource to indicate that no resource is to be referenced, use the special resource identifier None.
Since each pipeline context attribute has a corresponding Output Command that modifies the same pipeline state attribute, look for the detailed description of the OC and pipeline context attribute in Output Attribute Functions. In many cases, the data format used in the output command is very similar to the data format used in the pipeline context.
The following table contains the bitmask values you use with the PEXSetPCAttributeMask function, the member names of the corresponding values in the PEXPCAttributes5_2 structure, and the default values that the pipeline context contains when you create one. Note that functions that use the PEXPCAttributes structure have two forms, one for PEXlib 5.1 and another for PEXlib 5.2. This is required because of changes in size of several data types used in the PEXPCAttributes structure. You must use the 5.2 form of the functions along with the 5.2 form of the data structure (PEXPCAttributes5_2) unless you are working entirely with data defined in PEX 5.0 or 5.1.
Pipeline Context Member Names and Default Values (Continued) ------------------------------------------------------------------------------------------------------- Bitmask Value Member Name Default Value PEX ------------------------------------------------------------------------------------------------------- PEXPCActiveTextures active textures {} (5.2) PEXPCAll all bits for items prior to PEX imp-dep (5.2) 5.2 PEXPCAll5_2 all bits for items defined up to imp-dep (5.2) and including PEX 5.2 PEXPCAlphaBlendFunction alpha_blend_function PEXAlphaBlendNone (5.2) PEXPCATextAlignment atext_alignment {PEXVAlignNormal, (5.0) PEXHAlignNormal} PEXPCATextHeight atext_height 0.01 (5.0) PEXPCATextPath atext_path PEXPathRight (5.0) PEXPCATextStyle atext_style PEXATextNotConnected (5.0) PEXPCATextUpVector atext_up_vector <0.0, 1.0> (5.0) PEXPCASFValues asf_enables, asf_values(a) {all selected, all PEXIndividual} (5.0) PEXPCBFActiveTextures bf_active_textures {} (5.2) PEXPCBFDataMappingIndex bf_data_mapping_index 1 (5.2) PEXPCBFDataMappingMethod bf_data_mapping_method {PEXDMMNone, n/a} (5.2) PEXPCBFInteriorBundleIndex bf_interior_bundle_index 1 (5.2) PEXPCBFInteriorStyle bf_interior_style PEXInteriorStyleHollow (5.0) PEXPCBFInteriorStyleIndex bf_interior_style_index 1 (5.0) PEXPCBFReflectanceBundleIndex bf_reflectance_bundle_index 1 (5.2) PEXPCBFReflectionAttributes bf_reflection_attr {1.0, 1.0, 1.0, 0.0, 0.0, (5.0) {PEXColorTypeIndexed, 1}} PEXPCBFRelectionModel bf_reflection_model PEXRMNone (5.0) PEXPCBFSurfaceColor bf_surface_color {PEXColorTypeIndexed, 1} (5.0) PEXPCBFSurfaceInterp bf_surface_interp PEXSurfaceInterpNone (5.0) PEXPCCharExpansion char_expansion 1.0 (5.0) PEXPCCharHeight char_height 0.01 (5.0) PEXPCCharSpacing char_spacing 0.0 (5.0) PEXPCCharUpVector char_up_vector <0.0, 1.0> (5.0) PEXPCColorApproxIndex color_approx_index 0 (5.0) PEXPCConditionFlags condition_flags none set (5.2) PEXPCCullingMode culling_mode PEXNone (5.0) PEXPCCurveApprox curve_approx {1, n/a} (5.0) PEXPCDataMappingIndex data_mapping_index 1 (5.2) PEXPCDataMappingMethod data_mapping_method {PEXDMMNone, n/a} (5.2) PEXPCDepthCueIndex depth_cue_index 0 (5.0) PEXPCDistinguishFlag distinguish False (5.0) PEXPCDrawingFunction drawing_function GXcopy (5.2) PEXPCEdgeBundleIndex edge_bundle_index 1 (5.0) PEXPCGlobalTransform global_transform Identity (5.0) PEXPCGlobalTransformHints global_transform_hints PEXNone (5.2) PEXPCHighlightIndex highlight_index 1 (5.2) PEXPCHLHSRIdentifier hlhsr_id PEXHLHSRIDDisable (5.0) PEXPCInteriorBundleIndex interior_bundle_index 1 (5.0) PEXPCInteriorStyle interior_style PEXInteriorStyleHollow (5.0) PEXPCInteriorStyleIndex interior_style_index 1 (5.0) PEXPCLightState light_state {} (5.0) PEXPCLineBundleIndex line_bundle_index 1 (5.0) PEXPCLineCapStyle line_cap_style PEXLineCapButt (5.2) PEXPCLineColor line_color {PEXColorTypeIndexed, 1} (5.0) PEXPCLineJoinStyle line_join_style 0 (imp-dep) (5.2) PEXPCLineMiterLimit line_miter_limit 10.0 (5.2) PEXPCLineType line_type PEXLineTypeSolid (5.0) PEXPCLineWidth line_width 1.0 (5.0) PEXPCLocalTransform local_transform Identity (5.0) PEXPCLocalTransformHints local_transform_hints None (5.2) PEXPCMarkerBundleIndex marker_bundle_index 1 (5.0) PEXPCMarkerColor marker_color {PEXColorTypeIndexed, 1} (5.0) PEXPCMarkerScale marker_scale 1.0 (5.0) PEXPCMarkerType marker_type PEXMarkerAsterisk (5.0) PEXPCModelClip model_clip PEXNoClip (5.0) PEXPCModelClipVolume model_clip_volume {} (5.0) (and model_clip_volume 2D) PEXPCMoreASFValues more_asf_enables, {all selected, all PEXIndividual} (5.2) more_asf_values(a) PEXPCNameSet name_set name_set, None (5.0) (and name_set)(b) PEXPCParaSurfBundleIndex para_surf_bundle_index 1 (5.2) PEXPCParaSurfChar para_surf_char {PEXPSCNone, n/a} (5.0) PEXPCPatternRefPoint pattern_ref_point {0.0, 0.0, 0.0} (5.0) (and pattern_ref_point 2D) PEXPCPatternRefVec1 pattern_ref_vec1 <1.0, 0.0, 0.0> (5.0) (and pattern_ref_vec1 2D) PEXPCPatternRefVec2 pattern_ref_vec2 <0.0, 1.0, 0.0> (5.0) (and pattern_ref_vec2 2D) PEXPCPatternSize pattern_size <1.0, 1.0> (5.0) PEXPCPickID pick_id 0 (5.0) PEXPCPlaneMask plane_mask AllPlanes (5.2) PEXPCPolylineInterp polyline_interp PEXPolylineInterpNone (5.0) PEXPCPrimAntialiasing primitive_antialiasing {imp-dep, 0 (imp-dep)} (5.2) PEXPCReflectanceBundleIndex reflectance_bundle_index 1 (5.2) PEXPCReflectionAttr reflection_attr {1.0, 1.0, 1.0, 0.0, 0,0, (5.0) {PEXColorTypeIndexed, 1}} PEXPCReflectionModel reflection_model PEXRMNone (5.0) PEXPCRenderingColorModel rendering_color_model 0 (imp-dep) (5.0) PEXPCSequentialProcessing sequential_processing PEXOn (5.2) PEXPCSurfaceApprox surface_approx {1 (imp-dep), 1.0, 1.0} (5.0) PEXPCSurfaceColor surface_color {PEXColorTypeIndexed, 1} (5.0) PEXPCSurfaceEdgeColor surface_edge_color {PEXColorTypeIndexed, 1} (5.0) PEXPCSurfaceEdgeFlag surface_edges PEXOff (5.0) PEXPCSurfaceEdgeType surface_edge_type PEXSurfaceEdgeSolid (5.0) PEXPCSurfaceEdgeWidth surface_edge_width 1.0 (5.0) PEXPCSurfaceInterp surface_interp PEXSurfaceInterpNone (5.0) PEXPCTextAlignment text_alignment {PEXVAlignNormal, (5.0) PEXHAlignNormal} PEXPCTextBundleIndex text_bundle_index 1 (5.0) PEXPCTextColor text_color {PEXIndexed, 1} (5.0) PEXPCTextFont text_font 1 (5.0) PEXPCTextPath text_path PEXPathRight (5.0) PEXPCTextPrecision text_precision PEXStringPrecision (5.0) PEXPCTMPerspectiveCorrection tm_perspective_correction imp-dep (5.2) PEXPCTMResourceHints tm_resource_hints {PEXTMResourceHintNone, (5.2) {} } PEXPCTMSampleFrequency tm_sample_frequency PEXTMSampleFrequencyPixel (5.2) PEXPCVertexOrder vertex_order PEXRighthand (5.2) PEXPCViewIndex view_index 0 (5.0) PEXPCZBufferTest z_buffer_test imp-dep (5.2) -------------------------------------------------------------------------------------------------------
For an overview, see Pipeline Contexts.
With the increased number of ASF's in PEX 5.2, two full words are required to store the value flags and two full words are required to store the enable flags in the pipeline context. Therefore, the bitmasks defined for PEXlib 5.1 in PEXOCCSetIndividualASF are no longer adequate for setting ASF enable or value bits in PEXlib 5.2. There are two new ASF data members in the PC attributes data structure that you should use for PEXlib 5.2 applications:
PEXBitmask more_asf_enables[2]; PEXBitmask more_asf_values[2];
PEXlib 5.2 provides a new set of defined constants that represent the shift value for these bitmasks for each ASF. The algorithm for setting a bit for a given ASF is as follows:
pcattrs.more_asf_enables[X/32] |= 1L << X % 32;
where pcattrs is an instance of a PEXPCAttributes data structure and X is one of the constants defined below.
PEXASFPCMarkerType PEXASFPCMarkerScale PEXASFPCMarkerColor PEXASFPCTextFontIndex PEXASFPCTextPrec PEXASFPCCharExpansion PEXASFPCCharSpacing PEXASFPCTextColor PEXASFPCLineType PEXASFPCLineWidth PEXASFPCLineColor PEXASFPCCurveApprox PEXASFPCPolylineInterp PEXASFPCInteriorStyle PEXASFPCInteriorStyleIndex PEXASFPCSurfaceColor PEXASFPCSurfaceInterp PEXASFPCReflectionModel PEXASFPCReflectionAttr PEXASFPCBFInteriorStyle PEXASFPCBFInteriorStyleIndex PEXASFPCBFSurfaceColor PEXASFPCBFSurfaceInterp PEXASFPCBFReflectionModel PEXASFPCBFReflectionAttr PEXASFPCSurfaceApprox PEXASFPCSurfaceEdges PEXASFPCSurfaceEdgeType PEXASFPCSurfaceEdgeWidth PEXASFPCSurfaceEdgeColor PEXASFPCParaSurfCharacteristics PEXASFPCDataMappingMethod PEXASFPCBFDataMappingMethod PEXASFPCLineCapStyle PEXASFPCLineJoinStyle