PFND3D10DDI_SETCONSTANTBUFFERS回呼函式 (d3d10umddi.h)
CsSetConstantBuffers 函式會設定計算著色器的常數緩衝區。
語法
PFND3D10DDI_SETCONSTANTBUFFERS Pfnd3d10ddiSetconstantbuffers;
void Pfnd3d10ddiSetconstantbuffers(
D3D10DDI_HDEVICE unnamedParam1,
[in] UINT StartSlot,
[in] UINT NumBuffers,
const D3D10DDI_HRESOURCE *unnamedParam4
)
{...}
參數
unnamedParam1
hDevice [in]
顯示裝置的句柄(圖形內容)。
[in] StartSlot
要設定的起始常數緩衝區。
[in] NumBuffers
要設定的緩衝區總數。
unnamedParam4
phBuffers [in]
常數緩衝區的句柄數位,開頭為 startBuffer 指定的緩衝區。
傳回值
沒有
言論
驅動程式可以使用 pfnSetErrorCb 回呼函式來設定錯誤碼。
CsSetConstantBuffers 函式所指定的緩衝區會以 D3D10_BIND_CONSTANT_BUFFER 旗標建立。
除了D3DDDIERR_DEVICEREMOVED以外,驅動程式不應該發生任何錯誤。 因此,如果驅動程式通過任何錯誤,除了 D3DDDIERR_DEVICEREMOVED 之外,在呼叫 pfnSetErrorCb 函式時,Direct3D 運行時間會判斷錯誤是否重要。 即使移除裝置,驅動程式也不需要傳回D3DDDIERR_DEVICEREMOVED;不過,如果裝置移除干擾 CsSetConstantBuffers 的作業(通常不應該發生),驅動程式可以傳回D3DDDIERR_DEVICEREMOVED。
VsSetConstantBuffers 函式會設定頂點著色器的常數緩衝區。
GsSetConstantBuffers 函式會設定幾何著色器的常數緩衝區。
HsSetConstantBuffers 函式會設定船體著色器的常數緩衝區。
PsSetConstantBuffers 函式會設定圖元著色器的常數緩衝區。
DsSetConstantBuffers 函式會設定網域著色器的常數緩衝區。
要求
要求 | 價值 |
---|---|
最低支援的用戶端 | 從 Windows 7作系統開始,支援 CsSetConstantBuffers。 |
目標平臺 | 桌面 |
標頭 | d3d10umddi.h (包括 D3d10umddi.h) |