如何在 Linux 上控制(和模拟)显示器/投影仪?

发布于 2024-08-30 01:16:15 字数 274 浏览 2 评论 0原文

我想编写一些 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柠檬 2024-09-06 01:16:15

您的要求非常模糊,所以我将解释我如何解释它。

通过“控制显示器/投影仪”,您并不是指的是:关闭/打开、切换分辨率或深度。 (如果你想要这些东西,你应该看看 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...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文