如何为GPGPU创建不可见的X11窗口?
是否可以创建一个不可见的 X 窗口?为了初始化 OpenGL ES 2.0 上下文,必须手动创建一个 X 窗口,但我找不到一种方法让它不可见。因为我只做 GPGPU,所以不需要输出窗口。事实上,就我而言,这很烦人。
我知道早期问题中的解决方案,其中已指出在 XCreateWindow()
中使用 InputOnly
。然而,这会导致 X 错误 GLXBadDrawable
。可能是因为EGL需要窗口响应图形请求。还有别的办法吗?也许将其最小化?但我也找不到任何相关内容。另外,将窗口尺寸设置得非常小也没有帮助,因为它总是占据我的设备(诺基亚 N9)上的整个屏幕。
Is it possible to create an invisible X window? For initialization of an OpenGL ES 2.0 context, one has to create a X window manually, but I can't find a way to make it invisible. Since I'm only doing GPGPU I don't need an output window. In fact, it is rather annoying in my case.
I'm aware of a solution from an earlier question, where it has been pointed out to use InputOnly
in XCreateWindow()
. This, however, leads to the X error GLXBadDrawable
. Probably because EGL requires the window to respond to graphics request. Is there another way? Maybe create it minimized? But I can't find anything on that either. Also setting the window's size really small doesn't help, since it always occupies the whole screen on my device (Nokia N9).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您创建 X 窗口时,它是在未映射的情况下创建的,那么创建一个 InputOutput 窗口并使其保持未映射状态又如何呢?另一种选择是将其移出屏幕(如果窗口必须保持映射状态)。
When you create an X window, it is created unmapped, so what about creating an InputOutput window and leaving it unmapped? Another option would be (if the window must stay mapped), to move it out of the screen.
_NET_WM_STATE_SKIP_TASKBAR
的窗口。_NET_WM_STATE_SKIP_TASKBAR
.