• Content count

  • Joined

  • Last visited

Community Reputation

105 Neutral

About majiac

  • Rank
  1. Screen Capture with DXGI

    Hi eppo,   Thank you so much for your reply!   I'm trying to capture the entire desktop. I thought IDXGIOutput represents an adapter output and DWM is implemented using DirectX so I was hoping GetDisplaySurfaceData is able to capture the desktop like what GetFrontBufferData in DX9 does.   Thank you for pointing me to the screen dump link. I tried the BitBlt and GetFrontBufferData methods and the problem with them is the performance - BitBlt is hardware accelerated in Windows 7 but it takes lots of CPU and GetFrontBufferData is slow by design. Desktop Duplication API is only available in Windows 8. Are you aware of any other techniques that would allow me to capture a desktop screen.   GetDisplaySurfaceData() has no access to the DWM shared surface, but in a full screen mode application written in DX10/11(assuming this app is written by someone else and can be any video game for example ), would it be able to capture the output?
  2. Hi all, I would like to use DX10 and DXGI to capture a desktop image in Windows 7. However, when I call GetDisplaySurfaceData, I get an error DXGI_ERROR_INVALID_CALL. The code snippet is as following: D3D10_TEXTURE2D_DESC d3d10Texture2DDesc; D3D10_TEXTURE2D_DESC desc; ZeroMemory( &desc, sizeof(desc) ); desc.Width = 1440; desc.Height = 900; desc.MipLevels = 1; desc.ArraySize = 1; desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; desc.SampleDesc.Count = 1; desc.Usage = D3D10_USAGE_DYNAMIC; desc.BindFlags = D3D10_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE|D3D10_CPU_ACCESS_WRITE; ID3D10Texture2D *pD3d10Texture = NULL; hr = g_pd3dDevice->CreateTexture2D( &desc, NULL, &pD3d10Texture ); hr = pD3d10Texture->QueryInterface(__uuidof(IDXGISurface), (void**)&g_pDXGISurface); hr = g_pOutput->GetDisplaySurfaceData(g_pDXGISurface); In fact, my first question above all is if it's possible to use this DXGIOutput::GetDisplaySurfaceData function to capture the desktop. In DX9 we have GetFrontBufferData, but in DX10/11 there doesn't seem to be a replacement. Please help and any input would be greatly appreciated.