如何使用DirectX捕获屏幕? [英] How to capture screen with DirectX?

查看:83
本文介绍了如何使用DirectX捕获屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个记录桌面屏幕变化的程序.我的程序必须每秒至少捕获10次屏幕.我目前正在使用GDI捕获屏幕,但是它占用了约50%的CPU使用率.
我认为DirectX捕获屏幕是更好的解决方案,但我不知道该怎么做.请帮助我

还有另一种记录屏幕的方法吗?

I'm trying to build a program which record desktop screen change. My program must capture screen at least 10 times per second. I'm currently using GDI to capture screen, but it take ~50% CPU usage.
I think that capture screen with DirectX is better solution, but I don't know how to do this. Please help me

Is there another way to record screen?

推荐答案

该屏幕是使用GDI绘制的,您需要使用GDI捕获屏幕.在C ++中执行此操作可能比在C#中更快.

The screen is drawn using GDI, you need to use GDI to capture the screen.  Doing this in C++ is probably faster than in C#.


这篇关于如何使用DirectX捕获屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆