1

I presume dwm holds bitmap data of each rendered window in the GPU. Can I access this data? I want to use it as a texture in D3D (or preferably OpenGL). Screenshotting each window to RAM and back to GPU is too slow.

Ive seen other posts like : obtaining full desktop screenshot from the GPU

so Im doubtful, but maybe something has changed in the last 3 years.

Edit

So do all applications use Direct3D to draw all components? Would, say, this chrome browser's content, or file explorer's, or anything exist as an image in the graphics card or are only borders and such rendered through Direct3D/2D? Want to make sure before pursuing. BTW: my idea is a desktop for the Rift without running an alternate shell.

Community
  • 1
  • 1
user1055947
  • 862
  • 3
  • 9
  • 22
  • Each process has a set of WDDM surfaces that can be shared, but the API necessary for this is pretty much unexposed. This is the sort of thing that Flip 3D (when you press Alt+Tab) does. The closest you can get is using the WDM thumbnail API, but that really will not do what you want. – Andon M. Coleman May 01 '14 at 01:08
  • explain your whole program, there's maybe another solution. – j-p May 01 '14 at 08:09
  • I'm thinking (if you're using gdi and winform) that you could bind to mono gdi, wich is open source, and may allow you to access gpu memory more easily. – j-p May 01 '14 at 08:12
  • googling a bit, I found [easyhook](http://easyhook.codeplex.com/) and a link to some [deep hardware hooking](http://spazzarama.com/2011/03/14/c-screen-capture-and-overlays-for-direct3d-9-10-and-11-using-api-hooks/), it could maybe help... – j-p May 01 '14 at 08:25
  • [interesting link](http://stackoverflow.com/questions/10048333/capture-visual-output-of-a-directx-application-even-in-background) – j-p May 01 '14 at 08:28
  • So do all applications use Direct3D to draw all components? Would, say, this chrome browser's content, or file explorer's, or anything exist as an image in the graphics card or are only borders and such rendered through Direct3D/2D? Want to make sure before pursuing. BTW: my idea is a desktop for the Rift without running an alternate shell. – user1055947 May 01 '14 at 15:24
  • No, D3D and OpenGL are both layered on top of DXGI in new versions of Windows. Fundamentally, D3D and OpenGL are just APIs that manage resource loading, command generation and such for the driver. Effectively, DXGI is a language that GL and D3D drivers ultimately speak. But keep in mind the DX in DXGI (DirectX Graphics Infrastructure) is DirectX, so... fundamentally all applications go through a low-level part of DirectX. – Andon M. Coleman May 02 '14 at 01:05

0 Answers0