有关 OpenGL 设置和在窗口中的蒙版上绘图的问题

发布于 2024-10-01 05:15:10 字数 330 浏览 0 评论 0原文

我想知道 OpenGL 渲染设置,以便程序在屏幕上具有特定颜色代码(屏幕级缓冲区?)的任何窗口上渲染 OpenGL

IE VLC 媒体播放器和媒体播放器经典都具有允许您的渲染模式全屏然后最小化播放器,但通过允许特定颜色充当透明遮罩来保持观看媒体。例如,您可以将终端应用程序的背景颜色设置为 VLC 0x000010(对于 MPC)为 0x000001,然后您可以使用文本在媒体上键入(因为它是原始颜色)。当您尝试进行“打印屏幕”时,您得到的只是遮罩颜色,但是,这是可以接受的副作用。

是否可以使用具有正确设置和硬件的任何 OpenGL 应用程序来执行此操作?如果是这样,进一步研究这种效应的设置或至少术语是什么?

I would like to know the OpenGL Rendering settings for having a program render OpenGL over top of any window on screen that has a specific color code (screen-level buffer?)

I.E. VLC Media Player and Media Player Classic both have rendering modes which allow you to full-screen then minimize player, but maintain watching media via allowing a specific color to act as a transparent mask. For example, you could set the background color of a terminal application to be 0x000010 for VLC 0x000001 for MPC and you could then type over the media using text (as it is in it's original color). When you try to do a "printscreen" all you get is the mask color, However, this is an acceptable side-effect.

Is it possible to do this as well with any OpenGL application with the right settings and hardware? If so, what are the settings or at least the terminology of this effect to further research it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

幸福%小乖 2024-10-08 05:15:10

您尝试实现的内容称为“覆盖”。您可以尝试这个angelcode教程。如果我没记错的话,DirectX SDK 中也有一个教程。

如果需要使用 OpenGL,则需要执行离屏渲染(使用 FBO 或 P-buffer),使用 glReadPixels() 读取结果并使用叠加显示。

What you are trying to implement is called "overlay". You can try this angelcode tutorial. If I remember correctly, there was also a tutorial in DirectX SDK.

If you need to use OpenGL, you will need to perform offscreen rendering (using FBO or P-buffer), read the results using glReadPixels() and display using overlay.

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