XRCustomEffectArguments (Compact 2013)


This structure defines rendering data for a custom effect; OEM developers use this structure to implement custom effects that you can use in your application.

struct XRCustomEffectArguments
    XRVertex*  pVertices;
    UINT         cVertices;
    float*       pProjection;
    UINT         uiTextureID;
    UINT         uiTextureWidth;
    UINT         uiTextureHeight;
    BOOL         fBGRA_To_RGBA;


Pointer to an array of XRVertex structures that specifies the set of three-dimensional vertices that define the effect.


Number of vertices in the array that start at pVertices.


Pointer to an array of 16 float values that represent a projection matrix. The following matrix describes the order of the values:

[x1,      y1,      z1,      0,
 X2,      y2,      z2,      0,
 X3,      y3,      z3,      0,
 OffsetX, OffsetY, OffsetZ, 1]

The identifier for the texture that will be used for triangle strips in the

IXRCustomEffect::DrawTriangleStrip method.


The width of the texture in pixels.


The height of the texture in pixels.


A flag that indicates whether the colors in the texture need to be converted from BGRA color space (Blue Green Red Alpha) to the RGBA color space (Red Green Blue Alpha).

Effects modify the appearance of UI elements, for example, by blurring an element or adding a drop shadow. Effects alter the individual pixels of a rasterized UI object by using an algorithm to alter how the pixels are displayed.

In XAML for Windows Embedded, effects are implemented by OEM developers who use graphics functionality specific to their platform. The effect code must implement the xamlruntimegraphics.h file to create a XAML-supported object that represents the effect, and apply the effect to elements at runtime. In a XAML for Windows Embedded application, use the following classes to implement the effect:

The IXRCustomEffect::DrawTriangleStrip method uses the XRCustomEffectArguments structure to represent rendering data.

For more information about custom effects, see the Remarks section in IXRCustomEffect.