IDirect3DDevice9::GetRenderTargetData
2011-07-07 17:25
239 查看
Copies the render-target data from device memory to system memory.
Pointer to an IDirect3DSurface9 object, representing a render target.
pDestSurface [in]Type: [b]IDirect3DSurface9*[/b]
Pointer to an IDirect3DSurface9 object, representing a destination surface.
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_DRIVERINTERNALERROR, D3DERR_DEVICELOST, D3DERR_INVALIDCALL.
The source surface must be a regular render target or a level of a render-target texture (mipmap or cube texture) created with POOL_DEFAULT.
This method will fail if:
The render target is multisampled.
The source render target is a different size than the destination surface.
The source render target and destination surface formats do not match.
GetRenderTargetData()能够把GPU上Render Target的一个纹理直接完整拷贝到系统内存
GetRenderTargetData - Backbuffer and Render Target
The source surface must be a regular render-target surface or a specific level of a render-target texture (MIP map or cube texture).
The source source must be POOL_DEFAULT and D3DMULTISAMPLE_NONE.
The destination surface must be either an off-screen plain surface or a texture (MIP map or cube) that is created with POOL_SYSTEMMEM.
The source and destination surfaces must be the same dimension and format.
The following table shows the matrix of surface combinations that this test covers and the command options that the test uses to select the type of surface.
The test first creates the source and destination surfaces. The test then cycles through various surface formats and usage specifications. If either surface cannot be created, that configuration is skipped. After the surfaces are created, the render-target surface is filled with a textured quad. Next, the source is copied to the destination with the GetRenderTargetData method and a surface comparison is performed to verify that the two surface contents are the same.
To run this test, you must have Microsoft DirectX 9.0.
The test writes the test results to a log file called GetRenderTargetData.xml and displays on-screen pass or fail compliance. The test log is written to the %USERPROFILE%\dxlogs directory.
Run Time:
Log File:
System Restart Required:
Test Category:
Supported operating systems for Logo or Signature testing:
Windows 7
Windows Server 2008 R2
The test tool requires the following software:
Software components included with the device that is being tested.
Hardware Requirements
Device to be tested
Computer that meets the minimum software requirements
Windows keyboard
Two-button pointing device
Color display monitor capable of at least 1024 by 768 resolution, 32-bits per pixel, 60 Hz
Hard drive with a minimum of 20 GB available on partition C:
Syntax
CopyHRESULT GetRenderTargetData( [in] IDirect3DSurface9 *pRenderTarget, [in] IDirect3DSurface9 *pDestSurface );
Parameters
pRenderTarget [in]Type: [b]IDirect3DSurface9*[/b]Pointer to an IDirect3DSurface9 object, representing a render target.
pDestSurface [in]Type: [b]IDirect3DSurface9*[/b]
Pointer to an IDirect3DSurface9 object, representing a destination surface.
Return Value
Type: [b]HRESULT[/b]If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_DRIVERINTERNALERROR, D3DERR_DEVICELOST, D3DERR_INVALIDCALL.
Remarks
The destination surface must be either an off-screen plain surface or a level of a texture (mipmap or cube texture) created with D3DPOOL_SYSTEMMEM.The source surface must be a regular render target or a level of a render-target texture (mipmap or cube texture) created with POOL_DEFAULT.
This method will fail if:
The render target is multisampled.
The source render target is a different size than the destination surface.
The source render target and destination surface formats do not match.
Requirements
Header | D3D9.h |
---|---|
Library | D3D9.lib |
GetRenderTargetData - Backbuffer and Render Target
Overview
The GetRenderTargetData - Backbuffer and Render Target test verifies that the IDirect3DDevice9::GetRenderTargetData method (Microsoft Direct3D 9) can be used to extract the contents of back buffers and basic render targets.Details
This test validates the functional and operational specifications for the IDirect3DDevice9::GetRenderTargetData method. The GetRenderTargetData method provides a way to copy the contents of a render-target surface to a system-memory surface. There are several restrictions on the source and destination surfaces that you must meet for this copy to succeed:The source surface must be a regular render-target surface or a specific level of a render-target texture (MIP map or cube texture).
The source source must be POOL_DEFAULT and D3DMULTISAMPLE_NONE.
The destination surface must be either an off-screen plain surface or a texture (MIP map or cube) that is created with POOL_SYSTEMMEM.
The source and destination surfaces must be the same dimension and format.
The following table shows the matrix of surface combinations that this test covers and the command options that the test uses to select the type of surface.
Surface | Offscreen plain | MIP-map texture | Cube texture |
---|---|---|---|
Back buffer | -grtdbb | -grtdbbt | -grtdbbct |
Render target | -grtdrt | -grtdrtt | -grtdrtct |
MIP-map texture | -grtdts | -grtdtt | -grtdtct |
Cube texture | -grtdcts | -grtdctt | -grtdctct |
To run this test, you must have Microsoft DirectX 9.0.
The test writes the test results to a log file called GetRenderTargetData.xml and displays on-screen pass or fail compliance. The test log is written to the %USERPROFILE%\dxlogs directory.
Run Time:
Log File:
System Restart Required:
Test Category:
Supported operating systems for Logo or Signature testing:
Windows 7
Windows Server 2008 R2
Requirements
Software RequirementsThe test tool requires the following software:
Software components included with the device that is being tested.
Hardware Requirements
Device to be tested
Computer that meets the minimum software requirements
Windows keyboard
Two-button pointing device
Color display monitor capable of at least 1024 by 768 resolution, 32-bits per pixel, 60 Hz
Hard drive with a minimum of 20 GB available on partition C:
Running GetRenderTargetData - Backbuffer and Render Target
There is no special setup or configuration that you need to complete to run this test.Command Syntax
Command option | Description |
---|---|
getrendertargetdata.exe [ option ] | Options for specific surfaces. For more information about which option to use, see the table earlier in this topic. |
相关文章推荐
- IDirect3DDevice9::GetRenderTargetData
- GetFrontBufferData vs GetBackBuffer
- bootstrap之GetName&&GetAttribute&&GetDeviceSize&&GetSize&&GetLocation&&GetDataDir
- Using PowerCLI to get a Datastore from an NAA ID
- Struts2 the Action upload file get json data
- asp.net get App_Data 目录几种方法 path
- bootstrap-data-target触发模态弹出窗元素
- RenderTargetBitmap MediaElement截图空白问题
- Getting things in Magento by getModel and getData methods
- Ember Data- Get a Model in the Console
- ASIHTTPRequest和ASIFormDataRequest 区别,GET和POST
- DataWindow(PB)的获取数据窗口选中行的操作解疑!dw_1.getSelectedRow(long r)
- Data Structure Linked List: Write a function to get the intersection point of two Linked Lists.
- Fatal error: Call to a member function getData() on a non-object in /data/php/framework/exts/zii/wid
- Get data by SAFEARRAY** from COM(VB Code) in My VC COM Project (Code Part)
- Get data style from Excel
- React小工程——map方法 花店(getInitialState,componentWillMount,render)
- D3D-GetBackBuffer &GetFrontBufferData 抓屏&D3D抓取GPU数据
- get row data value& datatable filter & new datatable from datatable
- Unity-APk 错误:Error building Player: Couldn't build player because of unsupported data on target plat