C # Capturing a direct 3D screen

I have been deceiving the screen capture for a long time, and I managed to capture the entire screen, some areas on the screen, etc.

But when I go into the game and try to capture the screen, it completely ignores the game and instead captures the desktop (or something else outside the game window). Another interesting fact is that the same thing happens with the PrtScn button.

Any ideas on how to capture the game screen?

+8
c # gif screen-capture direct3d
source share
1 answer

The screen capture technology used works well for capturing things that are not accelerated by hardware. I suspect you will have the same problem trying to capture a movie frame in Windows Media Player.

The solution is to capture the screen from the hardware itself using DirectX. This article explains how to do this with some code and a managed shell around DirectX called SlimDX .

EDIT If Slim DX doesn’t work for you, you just need to find another managed shell around Direct X. I don’t think you can do screen capture without working at the hardware level, and DirectX is a way to do this on a Windows platform.

+7
source share

All Articles