IDirect3DDevice9::Present函数
来源:互联网 发布:芒果tv2016旧版 mac 编辑:程序博客网 时间:2024/05/21 09:36
版权声明:本文为博主原创文章,转载请注明出处http://blog.csdn.net/blues1021。
使用:Device->Present(0, 0, 0, 0);
作用:Swapthe back and front buffers.交换后台缓存和前台缓存,并提交到渲染管道,将后台缓存内容渲染出来。
详解:
HRESULT Present(
// 参数1: NULL值是全部的后台缓存矩形表面,若D3DPRESENT_PARAMETERS的SwapEffect为D3DSWAPEFFECT_COPY,则可不为NULL。
// 如果指定的矩形表面,大于后台缓存矩形表面,那么将会被后台缓存表面裁剪为后台缓存表面大小。
[in] const RECT *pSourceRect,
// 参数2:NULL值指定整个前台缓存表面,非空条件和矩形区域超过前台缓存表面,类似上述后台缓存表面。
[in] const RECT *pDestRect,
// 参数3:指定渲染目标窗口的句柄,如果NULL,则是D3DPRESENT_PARAMETERS的指定的hDeviceWindow指定的窗口。
[in] HWND hDestWindowOverride,
// 参数4:指定需要拷贝的后台缓存表面的大小和数据,一般是NULL,如果D3DPRESENT_PARAMETERS的SwapEffect为D3DSWAPEFFECT_COPY,那么可以不为空,设计//来仅仅是用于优化用,而实际中一般都是拷贝全部后台缓存表面像素数据到前台缓存渲染出来。
[in] const RGNDATA *pDirtyRegion
);
返回值:
Possible return values include: D3D_OK or D3DERR_DEVICEREMOVED (see D3DERR).
注意:不能在BeginScene和EndScene中使用。
Present will fail, returning D3DERR_INVALIDCALL, if called betweenBeginScene and EndScene pairs unless the render target is not the currentrender target (such as the back buffer you get from creating an additional swapchain). This is a new behavior for Direct3D 9.
拓展:
D3DPRESENT_PARAMETERS指定的是后台缓存和前台缓存的图形表面的参数,也就是交换链的参数。
类似窗口的::UpdateWindow(hwnd);是真正的发送消息更新渲染屏幕; 而不是::ShowWindow(hwnd, SW_SHOW),因它只是设置目标窗口对象的状态。
参考自:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb174423(v=vs.85).aspx
- IDirect3DDevice9::Present函数
- IDirect3DDevice9::Present函数
- Hook IDirect3DDevice9::Present
- Hook IDirect3DDevice9::Present
- IDirect3DDevice9::Clear函数
- IDirect3DDevice9::Clear函数
- DirectX9函数:IDirect3DDevice9::Clear 方法
- D3D9中设备提交的实现细节 The Implementation Level Detail of IDirect3DDevice9::Present
- D3D9中设备提交的实现细节 The Implementation Level Detail of IDirect3DDevice9::Present
- IDirect3DDevice9 Members D3D9设备的全部接口函数
- IDirect3DDevice9::Present()阻塞10多毫秒ms才返回,fps只能达到60的原因及解决办法
- IDirect3DDevice9::SetTextureStageState
- IDirect3DDevice9::GetRenderTargetData
- IDirect3DDevice9::StretchRect
- IDirect3DDevice9::Clear
- IDirect3DDevice9::DrawPrimitive
- IDirect3DDevice9::SetTextureStageState
- IDirect3DDevice9::SetClipPlane
- java collection大概
- Spring 资源访问
- 【分享】WeX5的正确打开方式(6)——数据组件初探
- Android Studio下使用AIDL创建和使用远程service
- 行为型--迭代器模式
- IDirect3DDevice9::Present函数
- Java并发编程:线程间协作的两种方式:wait、notify、notifyAll和Condition
- 安装SQL2008 R2出现 chould not open key:unknown\components
- Linux GCC常用命令
- 基于historyAPI的PC图墙无刷新跳转功能
- 面向对象设计常见问题
- cmake:在Makefile中运行ant脚本
- cocos2dx源码分析:事件派发器EventDispatcher
- css3新学习样式