You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out DirectX's desktop duplication API has a limitation where it cannot run on a discrete GPU on hybrid systems. (For example, laptops with both integrated graphics and a dedicated gpu)
This is an issue when you're making a program in WPF or a game engine.
A workaround is to run the app in integrated graphics mode.
Figuring this out was quite painful. In my case, I had the preferred device set to the discrete gpu on my nvidia 3d graphics control panel. (So it forced the discrete gpu on everything)
I then switched it to automatic, and sure enough, screenCapture.RegisterCaptureZone didn't crash. (The second example in the readme was used)
During this whole thing I've also tried the Windows.Graphics.Capture API and it appears to work without issues; But is annoying to get working on something like WPF.
It would be nice if a remark was added to the readme or somewhere else so that other people in the future don't have to go through the same rabbit hole as I did.
DX9 worked fine when I tested it, It's the DX11 provider that is affected by this.
The text was updated successfully, but these errors were encountered:
Hey, that sounds like a really weird limitation, but it seems like there is not really much to get around it :(
I wasn't aware of that. Thanks for reporting, I've added a note to the readme.
Turns out DirectX's desktop duplication API has a limitation where it cannot run on a discrete GPU on hybrid systems. (For example, laptops with both integrated graphics and a dedicated gpu)
This is an issue when you're making a program in WPF or a game engine.
A workaround is to run the app in integrated graphics mode.
Figuring this out was quite painful. In my case, I had the preferred device set to the discrete gpu on my nvidia 3d graphics control panel. (So it forced the discrete gpu on everything)
I then switched it to automatic, and sure enough,
screenCapture.RegisterCaptureZone
didn't crash. (The second example in the readme was used)During this whole thing I've also tried the
Windows.Graphics.Capture
API and it appears to work without issues; But is annoying to get working on something like WPF.It would be nice if a remark was added to the readme or somewhere else so that other people in the future don't have to go through the same rabbit hole as I did.
DX9 worked fine when I tested it, It's the DX11 provider that is affected by this.
The text was updated successfully, but these errors were encountered: