PFND3D10DDI_CREATEDEPTHSTENCILSTATE回调函数 (d3d10umddi.h)

CreateDepthStencilState 函数创建深度模具状态。

语法

PFND3D10DDI_CREATEDEPTHSTENCILSTATE Pfnd3d10ddiCreatedepthstencilstate;

void Pfnd3d10ddiCreatedepthstencilstate(
  D3D10DDI_HDEVICE unnamedParam1,
  const D3D10_DDI_DEPTH_STENCIL_DESC *unnamedParam2,
  D3D10DDI_HDEPTHSTENCILSTATE unnamedParam3,
  D3D10DDI_HRTDEPTHSTENCILSTATE unnamedParam4
)
{...}

参数

unnamedParam1

hDevice [in]

显示设备的句柄(图形上下文)。

unnamedParam2

pDepthStencilDesc [in]

指向 D3D10_DDI_DEPTH_STENCIL_DESC 结构的指针,该结构描述用户模式显示驱动程序用于创建深度模具状态的参数。

unnamedParam3

hDepthStencilState [in]

驱动程序专用数据的句柄,用于深度模具状态。

unnamedParam4

hRTDepthStencilState [in]

驱动程序在调用 Direct3D 运行时时应使用深度模具状态的句柄。

返回值

没有

言论

驱动程序可以使用 pfnSetErrorCb 回调函数来设置错误代码。

驱动程序可以在调用 pfnSetErrorCb 函数时传递E_OUTOFMEMORY(如果驱动程序内存不足)或D3DDDIERR_DEVICEREMOVED(如果设备已删除)。 Direct3D 运行时将确定任何其他错误都至关重要。 如果驱动程序通过任何错误(包括D3DDDIERR_DEVICEREMOVED),Direct3D 运行时将确定句柄无效;因此,运行时不会调用 DestroyDepthStencilState 函数来销毁 hDepthStencilState 参数指定的句柄。

用户模式显示驱动程序不需要一次在设备上创建超过 4,096 个深度模具状态对象的唯一实例。

要求

要求 价值
最低支持的客户端 在 Windows Vista 和更高版本的 Windows作系统中可用。
目标平台 桌面
标头 d3d10umddi.h (包括 D3d10umddi.h)

另请参阅

CalcPrivateDepthStencilStateSize

D3D10DDI_DEVICEFUNCS

D3D10_DDI_DEPTH_STENCILOP_DESC

D3D10_DDI_DEPTH_STENCIL_DESC

DestroyDepthStencilState

pfnSetErrorCb