다음을 통해 공유


ID3D11ShaderReflectionVariable::GetInterfaceSlot 메서드(d3d11shader.h)

인터페이스 포인터를 나타내는 변수의 해당 인터페이스 슬롯을 가져옵니다.

구문

UINT GetInterfaceSlot(
  [in] UINT uArrayIndex
);

매개 변수

[in] uArrayIndex

형식: UINT

슬롯 번호를 가져올 배열 요소의 인덱스입니다. 배열이 아닌 변수의 경우 이 값은 0이 됩니다.

반환 값

형식: UINT

인터페이스 배열에서 인터페이스의 인덱스 를 반환합니다.

설명

GetInterfaceSlot은 인터페이스 instance 대한 동적 연결 배열에서 해당 슬롯을 가져옵니다. 반환된 슬롯 번호는 인터페이스 instance 특정 클래스 instance 설정하는 데 사용됩니다. 자세한 내용은 HLSL 인터페이스 및 클래스 개요를 참조하세요.

이 메서드의 인터페이스는 기본 제공 DLL D3DCompiler_xx.dll 호스트됩니다.

예제

인터페이스 슬롯 검색 및 사용


ID3D11ShaderReflectionVariable* pAmbientLightingVar = pReflector->GetVariableByName("g_abstractAmbientLighting");
g_iAmbientLightingOffset = pAmbientLightingVar->GetInterfaceSlot(0);
g_pPSClassLinkage->GetClassInstance( "g_hemiAmbientLight", 0, &g_pHemiAmbientLightClass );
g_dynamicLinkageArray[g_iAmbientLightingOffset] = g_pHemiAmbientLightClass; 
...
pd3dImmediateContext->PSSetShader( g_pPixelShader, g_dynamicLinkageArray, g_iNumPSInterfaces );
      

요구 사항

요구 사항
대상 플랫폼 Windows
헤더 d3d11shader.h
라이브러리 D3DCompiler.lib
DLL D3DCompiler_47.dll

추가 정보

ID3D11ShaderReflectionVariable 인터페이스