本文介绍了仅使用XCB创建OpenGL上下文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想仅使用不带GLX和Xlib的XCB创建OpenGL上下文.你能告诉我可能会发生吗.非常感谢.

I want to create OpenGL Context only with XCB without GLX and Xlib. Could you tell me that might be happened. Thanks a lot.

推荐答案

不能.时期.您需要GLX,因为X11就是这样做的. GLX是针对Xlib编写的.您能做的最好的就是使用Xcb GLX模块来实现纯间接的GLX上下文.但是将您限制为OpenGL-2.1,并且所有内容都必须通过X11服务器,而不是具有直接与GPU对话的直接上下文.

You can't. Period. You need GLX, because that's how the X11 does OpenGL. And GLX is written against Xlib. The best you could do is use the Xcb GLX module to implement a purely indirect GLX context; limits you to OpenGL-2.1 though and everything has to pass through the X11 server, instead of having a direct context that talks directly to the GPU.

这篇关于仅使用XCB创建OpenGL上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 09:41