void PEXOCCSetPrimitiveAntialiasing(
PEXOCC context,
unsigned int prims,
int blend_func
)
None.
Invoke PEXOCCSetPrimitiveAntialiasing to create an attribute output command which sets the primitive antialiasing entry of the renderer's pipeline state according to the value specified by prims.
Primitive antialiasing specifies modifications made to the image on a type of primitive basis to correct for aliasing (jagged) effects. Typically the algorithms smooth edges through a blending operation.
PEXlib defines the following primitive types (prims):
PEXOCCArcAreas
PEXOCCCones
PEXOCCFillArea
PEXOCCFillAreaSet
PEXOCCIndexedFillAreaSets
PEXOCCIndexedTriangles
PEXOCCNURBSurface
PEXOCCPolyTriangle
PEXOCCQuadrilateralMesh
PEXOCCSpheres
PEXOCCTriangleFan
PEXOCCTriangles
PEXOCCTriangleStrip
To determine which primitive types you can antialias, inquire PrimAntiAliasSupported with request PEXGetImpDepConstants. The implementation antialiases any primitives of the types selected by prims. It leaves aliased any primitives of the types selected by prims which it cannot antialias. If you specify an undefined value for prims, then the implementation issues a BadPEXOutputCommand error.
If the implementation is accomplishing primitive antialiasing through a blending function, then you have control over how the blending is accomplished. PEXlib defines the following values for the blending functions:
Color = α * Colorprimitive + (1 α) * Colorprevious
If the implementation does not support the value you specify in blend_func, then the blend function defaults to PEXPrimitiveAABlendOpImpDep. Inquire the supported values for the blend function by invoking the PEXGetEnumTypeInfo function.
Primitive antialiasing interacts with HLHSR, alpha blending, transparency, drawing functions (other than GXcopy), and plane masking (other than all planes enabled) in an implementation-dependent way.
This function is a member of the global attribute set.
For an overview and for a list of all output attribute functions, see Output Attribute Functions.