joeycih

热爱游戏

D3D学习记录(二)——D3DPRESENT_PARAMETERS中的BackBufferFormat

让我们来看看DirectX的API文档
BackBufferFormat
The back buffer format. For more information about formats, see D3DFORMAT. This value must be one of the render-target formats as validated by IDirect3D9::CheckDeviceType. You can use IDirect3DDevice9::GetDisplayMode to obtain the current format.
关于背景缓冲格式。更多的信息请参阅D3DFORMAT。这个值必须属于可用的IDirect3D9::CheckDeviceType渲染-目标格式。你可以通过使用IDirect3DDevice9::GetDisplayMode 来获取当前格式。
 

In fact, D3DFMT_UNKNOWN can be specified for the BackBufferFormat while in windowed mode. This tells the runtime to use the current display-mode format and eliminates the need to call IDirect3DDevice9::GetDisplayMode.

         事实上,D3DFMT_UNKNOWN可以用来使用当在窗口模式下时,这会告诉计算机去使用当前的显示模式格式从而避免去调用IDirect3DDevice9::GetDisplayMode

For windowed applications, the back buffer format no longer needs to match the display-mode format because color conversion can now be done by the hardware (if the hardware supports color conversion). The set of possible back buffer formats is constrained, but the runtime will allow any valid back buffer format to be presented to any desktop format. (There is the additional requirement that the device be operable in the desktop mode; devices typically do not operate in 8 bits per pixel modes.)

Full-screen applications cannot do color conversion.

对于窗口应用程序,背景缓冲格式不再需要去符合显示模式格式因为颜色变化现在会被硬件完成(如果硬件支持颜色转换)。这样可能使背景缓冲格式受到限制,但是计算机将会允许任何有效的背景缓冲格式出现在任何的桌面格式(这里有一个附加要求device必须是可操作的在桌面模式中,device通常不会操作在8位像素模式)。

对于全屏程序是不需要颜色转换的

posted on 2009-08-18 18:34 joeycih 阅读(611) 评论(0)  编辑 收藏 引用 所属分类: Direct3D


只有注册用户登录后才能发表评论。
【推荐】超50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理