PFND3DDDI_COMPOSERECTS - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dumddi.h

PFND3DDDI_COMPOSERECTS Pfnd3dddiComposerects;

HRESULT Pfnd3dddiComposerects(
  HANDLE hDevice,
  const D3DDDIARG_COMPOSERECTS *unnamedParam2
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-d3dumddi-pfnd3dddi_composerects)

PFND3DDDI_COMPOSERECTS callback function

Description

The ComposeRects function composes two-dimensional areas from a source surface to a destination surface.

Parameters

hDevice

A handle to the display device (graphics context).

unnamedParam2

pData [in]

A pointer to a D3DDDIARG_COMPOSERECTS structure that specifies the parameters that are used to compose rectangular areas.

Return value

ComposeRects returns one of the following values:

Return code Description
S_OK The rectangular areas were successfully composed.
E_OUTOFMEMORY ComposeRects could not allocate the required memory for it to complete.

Remarks

The following constraints and validations apply to the ComposeRects function:

The following example code shows an operation that ComposeRects performs:

for (UINT i=0; i < COMPOSERECTS.NumDstRects; i++) {
   if (i >= Size(VertexBuffer(hDstRectDescsVB)) / sizeof(D3DCOMPOSERECTDSTDESC))
      Ignore the rectangle;
   if (VertexBuffer(hDstRectDescsVB)[i].RectDescIndex >= Size(VertexBuffer(hSrcRectDescsVB)) / sizeof(D3DCOMPOSERECTSRCDESC))
      Ignore the rectangle;
   SourceRectangle = VertexBuffer(hSrcResource)[VertexBuffer(hDstRectDescsVB)[i].RectDescIndex];
   DestinationRectangle.X = {VertexBuffer(hDstRectDescsVB)[i].X + COMPOSERECTS.Xoffset;
   DestinationRectangle.Y = {VertexBuffer(hDstRectDescsVB)[i].Y + COMPOSERECTS.Yoffset;
   DestinationRectangle.Width = SourceRectangle.Width;
   DestinationRectangle.Height = SourceRectangle.Height;
   Perform COMPOSERECTS.Operation for each pixel;
}

See also

D3DDDIARG_COMPOSERECTS

D3DDDI_DEVICEFUNCS