D3D学习笔记(初始化Direct3D-2)[13]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 navyblue1982 的 blog

 

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

本文关键:D3D学习笔记(初始化Direct3D-2)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top