XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

D3DReflect function

Gets a pointer to a reflection interface.

Syntax

HRESULT WINAPI D3DReflect(
  in   LPCVOID pSrcData,
  in   SIZE_T SrcDataSize,
  in   REFIID pInterface,
  out  void **ppReflector
);

Parameters

pSrcData [in]

Type: LPCVOID

A pointer to source data as compiled HLSL code.

SrcDataSize [in]

Type: SIZE_T

Length of pSrcData.

pInterface [in]

Type: REFIID

The reference GUID of the COM interface to use. For example, IID_ID3D11ShaderReflection.

ppReflector [out]

Type: void**

A pointer to a reflection interface.

Return value

Type: HRESULT

Returns one of the Direct3D 11 return codes.

Remarks

Shader code contains metadata that can be inspected using the reflection APIs.

The following code illustrates retrieving a ID3D11ShaderReflection Interface from a shader.



pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),
                               pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );

ID3D11ShaderReflection* pReflector = NULL; 
D3DReflect( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), 
            IID_ID3D11ShaderReflection, (void**) &pReflector);


Windows Phone 8.1: This API is supported.

Requirements

Header

D3Dcompiler.h

Library

D3dcompiler_xx.dll

See also

Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft