Funzione D3DX10ReflectShader

Questa funzione , che crea un oggetto shader-reflection per recuperare informazioni su uno shader compilato, non esiste più. Usare invece D3DReflect o D3D11Reflect.

Sintassi

HRESULT D3DX10ReflectShader(
  _In_  const void                    *pShaderBytecode,
  _In_        SIZE_T                  BytecodeLength,
  _Out_       ID3D10ShaderReflection1 **ppReflector
);

Parametri

pShaderBytecode [in]

Tipo: const void*

Puntatore allo shader compilato. Per ottenere questo puntatore, vedere Recupero di un puntatore a uno shader compilato.

BytecodeLength [in]

Tipo: SIZE_T

Lunghezza di pShaderBytecode.

ppReflector [out]

Tipo: ID3D10ShaderReflection1**

Indirizzo di un'interfaccia di reflection shader (vedere l'interfaccia ID3D10ShaderReflection1).

Valore restituito

Tipo: HRESULT

Restituisce uno dei codici restituiti Direct3D 10 seguenti.

Commenti

Di seguito è riportato un esempio di creazione di un oggetto reflection shader. L'esempio presuppone che si inizi con uno shader compilato (mostrato come

pVSBuf

che è possibile visualizzare nell'esempio HLSLWithoutFX10).

ID3D10ShaderReflection1* pIShaderReflection1 = NULL;
D3D10_SHADER_DESC desc;
hr = D3D10ReflectShader( (void*) pVSBuf->GetBufferPointer(), pVSBuf->GetBufferSize(),
    &pIShaderReflection1 );
if( pIShaderReflection1 )
{
    pIShaderReflection1->GetDesc( &desc );
}

Requisiti

Requisito Valore
Intestazione
D3DX10Core.h

Vedi anche

Funzioni per utilizzo generico