游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1051|回复: 2

一个小问题 :)

[复制链接]

19

主题

73

帖子

73

积分

注册会员

Rank: 2

积分
73
发表于 2005-9-10 12:00:00 | 显示全部楼层 |阅读模式
g_pd3dDevice-&gtresent( ***,***,****,***,**** );

我们一般都是这样写 g_pd3dDevice->Present( NULL, NULL, NULL, NULL );

大家可以为我解析一下这几参数的意思吗,谢谢

85

主题

824

帖子

878

积分

高级会员

Rank: 4

积分
878
QQ
发表于 2005-9-10 12:07:00 | 显示全部楼层

Re:一个小问题 :)

HRESULT Present(          CONST RECT *pSourceRect,
    CONST RECT *pDestRect,
    HWND hDestWindowOverride,
    CONST RGNDATA *pDirtyRegion
);


pSourceRect
[in] Pointer to a value that must be NULL unless the swap chain was created with D3DSWAPEFFECT_COPY. pSourceRect is a pointer to a RECT  structure containing the source rectangle. If NULL, the entire source surface is presented. If the rectangle exceeds the source surface, the rectangle is clipped to the source surface.

pDestRect
[in] Pointer to a value that must be NULL unless the swap chain was created with D3DSWAPEFFECT_COPY. pDestRect is a pointer to a RECT structure containing the destination rectangle, in window client coordinates. If NULL, the entire client area is filled. If the rectangle exceeds the destination client area, the rectangle is clipped to the destination client area.

hDestWindowOverride
[in] Pointer to a destination window whose client area is taken as the target for this presentation. If this value is NULL, then the hWndDeviceWindow member of D3DPRESENT_PARAMETERS is taken.

pDirtyRegion
[in] Value must be NULL unless the swap chain was created with D3DSWAPEFFECT_COPY. For more information about swap chains, see Flipping Surfaces and D3DSWAPEFFECT.

If this value is non-NULL, the contained region is expressed in back buffer coordinates. The rectangles within the region are the minimal set of pixels that need to be updated. This method takes these rectangles into account when optimizing the presentation by copying only the pixels within the region, or some suitably expanded set of rectangles. This is an aid to optimization only, and the application should not rely on the region being copied exactly. The implementation can choose to copy the whole source rectangle.

19

主题

73

帖子

73

积分

注册会员

Rank: 2

积分
73
 楼主| 发表于 2005-9-10 12:44:00 | 显示全部楼层

Re:一个小问题 :)

不要贴 MSDN 好不好,我看过了 :)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-27 18:36

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表