如何使用的XLib和GLX创建具有透明背景的OpenGL启用窗口 [英] How to create OpenGL-enabled window with transparent background using xlib and glx

查看:576
本文介绍了如何使用的XLib和GLX创建具有透明背景的OpenGL启用窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个透明背景的窗口,然后使用OpenGL渲染的东西到它。我不希望使用的把戏,无论是背后的窗户被捕获,然后画作为背景 - 我想真正的透明度(我有合成管理器运行)。我没有使用任何GUI库(GTK,QT,...),只是原始的XLib和GLX。

I'd like to create a window with transparent background and then render something onto it using OpenGL. I don't want to use the trick where whatever is behind the window is captured and then painted as a background - I want real transparency (I have composition manager running). I'm not using any GUI library (GTK, QT, ...), just raw xlib and glx.

任何人都知道该怎么办呢?

Anyone knows how to do it?

推荐答案

看看的这些补丁,以Neverball和SDL 。他们似乎是基于 NVidia的驱动程序文档

Take a look at these patches to Neverball and SDL. They seem to be based on NVidia's driver documentation.

我还没有尝试过,但它看起来好像你只是选择了正确的GLX配置( GLX_RGBA_BIT ),适当清除窗口,有一个合成器上运行,它应该只是工作™。

I haven't tried it, but it looks as if you just select the correct GLX config (GLX_RGBA_BIT), clear your window appropriately, and have a compositor running, it should Just Work™.

这篇关于如何使用的XLib和GLX创建具有透明背景的OpenGL启用窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆