Share via


ID3D11ShaderReflection::GetConstantBufferByIndex 方法 (d3d11shader.h)

依索引取得常數緩衝區。

語法

ID3D11ShaderReflectionConstantBuffer * GetConstantBufferByIndex(
  [in] UINT Index
);

參數

[in] Index

類型: UINT

以零起始的索引。

傳回值

類型: ID3D11ShaderReflectionConstantBuffer*

常數緩衝區的指標 (請參閱 ID3D11ShaderReflectionConstantBuffer 介面) 。

備註

常數緩衝區會將純量常數或紋理常數提供給著色器。 著色器可以使用一或多個常數緩衝區。 為了達到最佳效能,請根據它們更新的頻率,將常數分隔成緩衝區。

這個方法的介面裝載於現用 DLL D3DCompiler_xx.dll。

規格需求

需求
目標平台 Windows
標頭 d3d11shader.h
程式庫 D3DCompiler.lib
Dll D3DCompiler_47.dll

另請參閱

ID3D11ShaderReflection 介面