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.

ID3D11ClassLinkage::CreateClassInstance method

Initializes a class-instance object that represents an HLSL class instance.

Syntax


HRESULT CreateClassInstance(
  [in]  LPCSTR              pClassTypeName,
  [in]  UINT                ConstantBufferOffset,
  [in]  UINT                ConstantVectorOffset,
  [in]  UINT                TextureOffset,
  [in]  UINT                SamplerOffset,
  [out] ID3D11ClassInstance **ppInstance
);

Parameters

pClassTypeName [in]

Type: LPCSTR

The type name of a class to initialize.

ConstantBufferOffset [in]

Type: UINT

Identifies the constant buffer that contains the class data.

ConstantVectorOffset [in]

Type: UINT

The four-component vector offset from the start of the constant buffer where the class data will begin. Consequently, this is not a byte offset.

TextureOffset [in]

Type: UINT

The texture slot for the first texture; there may be multiple textures following the offset.

SamplerOffset [in]

Type: UINT

The sampler slot for the first sampler; there may be multiple samplers following the offset.

ppInstance [out]

Type: ID3D11ClassInstance**

The address of a pointer to an ID3D11ClassInstance interface to initialize.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns one of the following Direct3D 11 Return Codes.

Remarks

Instances can be created (or gotten) before or after a shader is created. Use the same shader linkage object to acquire a class instance and create the shader the instance is going to be used in.

For more information about using the ID3D11ClassLinkage interface, see Dynamic Linking.

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11ClassLinkage

 

 

Show:
© 2016 Microsoft