Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1EffectContext::CreateVertexBuffer method

Creates a vertex buffer or finds a standard vertex buffer and optionally initializes it with vertices. The returned buffer can be specified in the render info to specify both a vertex shader and or to pass custom vertices to the standard vertex shader used by Direct2D.

Syntax


HRESULT CreateVertexBuffer(
  [in]           const D2D1_VERTEX_BUFFER_PROPERTIES        *vertexBufferProperties,
  [in, optional] const GUID                                 *resourceId,
  [in, optional] const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES *customVertexBufferProperties,
  [out]                ID2D1VertexBuffer                    **buffer
);

Parameters

vertexBufferProperties [in]

Type: const D2D1_VERTEX_BUFFER_PROPERTIES*

The properties used to describe the vertex buffer and vertex shader.

resourceId [in, optional]

Type: const GUID*

The unique id that identifies the vertex buffer.

customVertexBufferProperties [in, optional]

Type: const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES*

The properties used to define a custom vertex buffer. If you use a built-in vertex shader, you don't have to specify this property.

buffer [out]

Type: ID2D1VertexBuffer**

The returned vertex buffer.

Return value

Type: HRESULT

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

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid parameter was passed to the returning function.

 

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2D1EffectAuthor.h

Library

D2D1.lib

See also

ID2D1EffectContext

 

 

Show:
© 2017 Microsoft