ID2D1DrawInfo::SetVertexProcessing method

Applies to: desktop apps only

Sets a vertex buffer, a corresponding vertex shader, and options to control how the vertices are to be handled by the Direct2D context.

Syntax

HRESULT SetVertexProcessing(
  [in, optional]  ID2D1VertexBuffer *vertexBuffer,
  D2D1_VERTEX_OPTIONS vertexOptions,
  [in, optional]  const D2D1_BLEND_DESCRIPTION *blendDescription,
  [in, optional]  const D2D1_VERTEX_RANGE *vertexRange
);

Parameters

  • vertexBuffer [in, optional]
    Type: ID2D1VertexBuffer*

    The vertex buffer. If this is cleared, the default vertex shader and mapping to the transform rectangles are used.

  • vertexOptions
    Type: D2D1_VERTEX_OPTIONS

    Options that influence how the renderer will interact with the vertex shader.

  • blendDescription [in, optional]
    Type: const D2D1_BLEND_DESCRIPTION*

    How the vertices will be blended with the output texture.

  • vertexRange [in, optional]
    Type: const D2D1_VERTEX_RANGE*

    If specified, the set of vertices to use from the buffer.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULT Description
S_OK No error occurred.
E_INVALIDARG One or more arguments are not valid.

 

Remarks

The vertex shaders associated with the vertex buffer through the vertex shader GUID must have been loaded through the ID2D1EffectContext::LoadVertexShader method before this call is made.

If this call fails, the corresponding ID2D1Effect instance is placed into an error state and fails to draw.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

D2d1effectauthor.h

Library

D2d1.lib

See also

ID2D1DrawInfo

ID2D1EffectContext::CreateVertexBuffer

ID2D1EffectContext::LoadVertexShader

 

 

Send comments about this topic to Microsoft

Build date: 9/5/2012