ID3D10Device::GSSetSamplers 方法 (d3d10.h)

將取樣器狀態的陣列設定為 幾何著色器 管線階段。

語法

void GSSetSamplers(
  [in] UINT               StartSlot,
  [in] UINT               NumSamplers,
  [in] ID3D10SamplerState * const *ppSamplers
);

參數

[in] StartSlot

類型: UINT

在裝置的以零起始的陣列中編制索引,以開始將取樣器設定為 。

[in] NumSamplers

類型: UINT

陣列中的取樣器數目。 每個管線階段總共有16個取樣器位置可供使用。

[in] ppSamplers

類型: ID3D10SamplerState*

sampler 狀態介面陣列的指標 (請參閱 ID3D10SamplerState) 。 請參閱<備註>。

傳回值

備註

任何取樣器都可以設定為 NULL;這會叫用默認狀態,其定義為下列專案。


//Default sampler state:
D3D10_SAMPLER_DESC SamplerDesc;
SamplerDesc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;
SamplerDesc.AddressU = D3D10_TEXTURE_ADDRESS_CLAMP;
SamplerDesc.AddressV = D3D10_TEXTURE_ADDRESS_CLAMP;
SamplerDesc.AddressW = D3D10_TEXTURE_ADDRESS_CLAMP;
SamplerDesc.MipLODBias = 0;
SamplerDesc.MaxAnisotropy = 1;
SamplerDesc.ComparisonFunc = D3D10_COMPARISON_NEVER;
SamplerDesc.BorderColor[0] = 1.0f;
SamplerDesc.BorderColor[1] = 1.0f;
SamplerDesc.BorderColor[2] = 1.0f;
SamplerDesc.BorderColor[3] = 1.0f;
SamplerDesc.MinLOD = -FLT_MAX;
SamplerDesc.MaxLOD = FLT_MAX;
		

方法不會保存傳入之介面的參考。 基於這個理由,應用程式應該小心不要釋放裝置目前使用的介面。

規格需求

需求
目標平台 Windows
標頭 d3d10.h
程式庫 D3D10.lib

另請參閱

ID3D10Device 介面