使用Java的DirectX程序的屏幕截图 [英] Screen Capture of DirectX programs with Java
本文介绍了使用Java的DirectX程序的屏幕截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编写了一个Java应用程序,该应用程序使用java.awt.Robot来捕获屏幕的屏幕截图,并且想知道是否可以使用DirectX/OpenGL捕获程序吗?
I wrote a Java application that uses the java.awt.Robot to take screen captures of the screen and was wondering if capturing a program using DirectX/OpenGL would be possible?
每次尝试执行此操作时,都会出现黑屏
Each time I try to do this, I get a black screen
推荐答案
是可以的.但也许仅在有限的情况下.
Yes it is possible. But maybe only in limited circiumstances.
我已经使用机器人一些关于实施的特定信息可能与您有所不同:
Some specific information about the implementation that may be different for you:
- 对createScreenCapture的调用是在OpenGL中完成的 应用.
- 该应用程序使用了重量级的GLCanvas
- 它使用了Java 6
- The call to createScreenCapture was done from within the OpenGL application.
- The application used heavyweight GLCanvas
- It used Java 6
确保将正确的坐标传递给它.您可以从 GraphicsEnvironment 获取屏幕坐标. a>
Make sure you pass it the correct coordinates. You can get the screen coordinates to use from the GraphicsEnvironment
这篇关于使用Java的DirectX程序的屏幕截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文