Windows Dev Center

ID3D11ClassInstance::GetDesc method

Gets a description of the current HLSL class.

Syntax


void GetDesc(
  [out] D3D11_CLASS_INSTANCE_DESC *pDesc
);

Parameters

pDesc [out]

Type: D3D11_CLASS_INSTANCE_DESC*

A pointer to a D3D11_CLASS_INSTANCE_DESC structure that describes the current HLSL class.

Return value

This method does not return a value.

Remarks

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

An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated.

  • A created instance will work for any shader that contains a type of the same type name. For instance, a class instance created with the type name DefaultShader would work in any shader that contained a type DefaultShader even though several shaders could describe a different type.
  • A gotten instance maps directly to an instance name/index in a shader. A class instance aquired using GetClassInstance will work for any shader that contains a class instance of the name used to generate the runtime instance, the instance does not have to be the same type in all of the shaders it's used in.

An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name.

Windows Phone 8: This API is supported.

Requirements

Header

D3d11.h

Library

D3d11.lib

See also

ID3D11ClassInstance

 

 

Community Additions

ADD
Show:
© 2015 Microsoft