应用程序通过使用IDirect3D9接口的方法来创建Direct3D对象,并通过这个接口配置环境。
这个接口包括设备的枚举和检索能力的方法。
1. IDirect3D9::CheckDepthStencilMatch
说明:确定是否在一个特定的显示模式下深度模板格式和渲染目标格式相兼容
HRESULT CheckDepthStencilMatch
( UINT Adapter, //D3DADAPTER_DEFAULT
D3DDEVTYPE DeviceType, //device type
D3DFORMAT AdapterFormat, // format of the display mode
D3DFORMAT RenderTargetFormat, //the format of the render-target surface
D3DFORMAT DepthStencilFormat //the format of the depth-stencil surface
);
2. IDirect3D9::CheckDeviceFormat
说明:确定在一个指定的显卡上的表面格式