[英]Capture fast ingame screen in DirectX in C++ or C#
For a project i'm trying to capture the screen of a game using c++ or c#. 对于一个项目,我试图使用c ++或c#捕获游戏的画面。 I know there are a lot of solutions on the web but none of them are working 100%
我知道网络上有很多解决方案,但没有一个能100%正常工作
I'm wondering if someone can explain how I can capture it or give me a working example.. I'm curious if it's possible in c# with sharpDX or something else... 我想知道是否有人可以解释如何捕获它或给我一个有效的示例。.我很好奇,是否有可能在Sharp#等C#语言中使用c#。
Kind regards! 亲切的问候!
You can use the SaveDDSTextureToFile
from the DirectXTK library. 您可以使用
SaveDDSTextureToFile
从DirectXTK库。 It saves the current RenderTargetView Resource to a DDS file. 它将当前的RenderTargetView资源保存到DDS文件。 Include
ScreenGrab.h
. 包括
ScreenGrab.h
。
Usage: 用法:
ID3D11Resource* test = NULL;
mRenderTargetView->GetResource(&test);
SaveDDSTextureToFile(mContext, test, L"test.dds");
test->Release();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.