如何在 Linux 上控制(和模拟)显示器/投影仪?
我想编写一些 C/C++ 程序来控制连接到我的计算机的显示器/投影仪。我想要的是在其上生成任意输出,并且我希望只有我的应用程序可以在该屏幕上绘制。我用谷歌搜索了一下,但几乎找不到任何可以引导我走向某个方向的东西。
你知道我可以在哪里了解它吗?
我想做的是在外部显示器上写下“Hello world”。如果有一些“监视器模拟器”可以充当物理连接的监视器(或编写一个程序来模拟它),那就太好了。我不确定这是否可能。我找不到这样的东西。
我正在使用 Gnome 开发 Ubuntu 9.10。
I would like to write some C/C++ program to take control over monitor/projector attached to my computer. What I want is to generate arbitrary output on it and I want that only my application can draw on that screen. I've googled around, but I couldn't find almost anything that would lead me in some direction.
Do you know where I can learn about it?
What I would like to do is to write "Hello world" on an external monitor. It would be also nice to have some "monitor emulator" that will act as the physically attached monitor (or to write a program to emulate it). I'm not sure if it is possible. I couldn't find anything like this.
I'm working on Ubuntu 9.10 with Gnome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的要求非常模糊,所以我将解释我如何解释它。
通过“控制显示器/投影仪”,您并不是指的是:关闭/打开、切换分辨率或深度。 (如果你想要这些东西,你应该看看 xrandr。)你想要什么:全屏生成任意输出。
实现这一点的最简单方法是使用 OpenGL/GLUT/GLEW。有大量可用资源,我相信您会自己找到您想要的东西。
我完全不确定您期望外部显示器甚至投影仪有什么不同。处理外部监视器的方式取决于 WM、Xorg...
Your requirements are pretty vague, so I'll explain how I interpreted it.
By "control monitor/projector" you don't mean things like: turning it off/on, switching the resolution or depth. (If you want those things, you should look at xrandr.) What you want: generate arbitrary output in fullscreen.
The simplest way to achieve that is by using OpenGL/GLUT/GLEW. There are plenty of resources available and I'm sure you'll find what you are looking for on your own.
I'm completely unsure what you expect to be different on a external monitor or even a projector. The way external monitors are handled depends on the WM, Xorg...