remarks
the application should not assume the persistence of vertex processing capabilities across microsoft direct3d device objects. the particular capabilities that a physical device exposes may depend on parameters supplied to idirect3d9::createdevice. for example, the capabilities may yield different vertex processing capabilities before and after creating a direct3d device object with hardware vertex processing enabled. for more information see the description of d3dcaps9.
// fill d3dcaps9 structure with the capabilities of the // primary display adapter. //填充 d3dcaps9 结构用检测到的显示适配器的特性 d3dcaps9 caps; d3d9->getdevicecaps( d3dadapter_default, // denotes primary display adapter.指定主显卡 devicetype, // specifies the device type, usually d3ddevtype_hal. //指定设备内容 一般使用d3ddevtype_hal. &caps); // return filled d3dcaps9 structure that contains // the capabilities of the primary display adapter. //返回一个已初始化的d3dcaps9结构 // can we use hardware vertex processing? int vp = 0; if( caps.devcaps & d3ddevcaps_hwtransformandlight ) { //检测硬件是否支持变换和灯光的 // yes, save in ‘vp’ the fact that hardware vertex 首页
上页
下页
尾页
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
本文关键:D3D学习笔记(初始化Direct3D-2)
相关方案
|