简体   繁体   English

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

[英]How to control (and emulate) monitor/projector on Linux?

I would like to write some C/C++ program to take control over monitor/projector attached to my computer. 我想编写一些C / C ++程序来控制连接到计算机的显示器/投影仪。 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. 我想做的是在外接显示器上写“ Hello world”。 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. 我正在使用Gnome开发Ubuntu 9.10。

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. (如果需要这些东西,应该看一下xrandr。)您想要的是:在全屏模式下生成任意输出。

The simplest way to achieve that is by using OpenGL/GLUT/GLEW. 最简单的方法是使用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... 外部监视器的处理方式取决于WM,Xorg ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM