Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create OpenGL Context only with XCB

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

like image 419
Miroslav Avramov Avatar asked Sep 24 '15 08:09

Miroslav Avramov


2 Answers

I want to create OpenGL Context only with XCB without GLX and Xlib.

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.

like image 152
datenwolf Avatar answered Nov 15 '22 09:11

datenwolf


You can use OpenGL via EGL with xcb. You need an EGL implementation that supports the EGL_EXT_platform_xcb extension, otherwise you need to use the 'x11' platform which requires an XLib display for the initial setup.

Mesa supports the extension starting from version 21.

like image 20
Andrzej Szombierski Avatar answered Nov 15 '22 09:11

Andrzej Szombierski