-
September 26th, 2015, 06:58 AM
#1
DesktopDuplicatipn API windows8 does not capture fullscreen games
I was experimenting with desktopduplication api sample code and it was mentioned here that
even full screen DirectX applications can be duplicated.
Also here it is mentioned that
>The following components of the operating system can generate the desktop image:
>* The DWM by composing the desktop image
>* A full-screen DirectX or OpenGL application
>* An application by switching to a separate desktop, for example, the secure desktop that is used to display the login screen
However when I tested the sample code with multiple monitors provided here, it worked fine for other applications running on desktop but when I started a fullscreen directx application, the running applications in the background are pushed onto the secondary monitor and only the secondary monitor is captured in the duplicated window.
What might be the reason for this? I ran the exact sample code provided by MSDN. Is there something more I need to do in order to capture DirectX fullscreen games using DesktopDuplication API
-
September 28th, 2015, 07:07 AM
#2
Re: DesktopDuplicatipn API windows8 does not capture fullscreen games
What you're seeing is normal. The fullscreen DirectX canvas cannot be captured via GDI. The explanation for this is simple, there isn't a DC in this case, so there's nothing for GDI to interact with. The real story behind it is more complex, but the principle remains the same.
You can capture the DX canvas if you have a windowed application, in this case the DWM does the composition of the DX canvas onto the desktop DC. However, capturing the desktop is slow. (expect game framerates to drop a lot).
If you have WIndows 10. Note that there is built in DX capture to video provided now. And it is fairly easy to plug into this framework to do other things than just stream to video output.
Also the link you mentioned, while it's true that those 3 are the only OS components that can generate the desktop image. I is by no mean the only means by wich the desktop can be visually influenced. your videocard can provide additional features like Picture-in-picture, where a secondary input is being rendered onto part of the desktop entirely in-hardware. I've seen this used by TV cards, video decoders, CCTV solutions... You typically can not capture this, because it goes even the DWM doesn't know about this.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|