[Interest] multiple displaying backends on OS X?

René J.V. Bertin rjvbertin at gmail.com
Sun Jan 25 23:36:05 CET 2015

On Sunday January 25 2015 20:05:43 Thiago Macieira wrote:

> > - mkspecs/common/macx.conf has no definition for QMAKE_LIBS_X11
> It shouldn't need that. We want libxcb, not libX11.

Doesn't libxcb need libX11, ultimately?

> -qt-xcb allows you to have X11 (xcb) support even without system libs.

I settled on using -qt-xcb because I am missing at least 1 header from xcb-icccm (the library is there, though). I'll have another look whether I want to avoid using the bundled xcb stuff, but I first want to know if "it works".

> Providing OpenGL support is a platform requirement, not Qt's.

Never implied it wasn't. OS X provides 2 native OpenGL versions (OpenGL.framework, and AGL.framework) both of which are linked in, and then there's GLX (X11 OpenGL) which is provided through XQuartz and/or MacPorts (or Fink or ...).
Providing OpenGL is the platform's job, but detecting the appropriate libraries to use is Qt's job ;)

> Ensure you have libxcb-glx (which -qt-xcb doesn't provide).

I have. But the missing functions are not xcb_glx_*, but glX*, and sure enough I cannot replace -lGL with -lxcb-glx and still have a successful link.

> I don't see how your premise allows you to conclude your conclusion. Yes, 
> offscreen compiles, but what does that have to do with GLX?

In a regular OS X build, offscreen includes a stub source file, unless QT_CONFIG contains x11 . In that case, an X11 source file is pulled in that apparently calls OpenGL (GLX) functions. I haven't opened the source file, I've just ensured that the stub file is always pulled in on OS X.

The xcb plugin also builds when adding -lGL to the link command. I'd know more about whether "it works" or not by now if something hadn't decided that qtwebkit needed a full rebuild :-/

> > Out of curiosity: does Qt do actual OpenGL on a remote X11 display?

> Anyway, the question is nonsensical: you want OpenGL for hardware access 
> (ostensibly for performance reasons) and you don't get that with remote X 
> anyway. Any application willing to be run on a remote X11 display needs to 
> figure out a software fallback on its own.

Well that's exactly what I thought, but it's been a while since I've done any real OpenGL coding myself. I seemed to recall that the SGI systems I worked on did have a way to do remote OpenGL, the X server that does the actual displaying evidently has access to the hardware, and I've been out of touch long enough for all kinds of technological and language developments to have been made. Enough reason to doubt my certainty, so no, the question wasn't nonsensical.


More information about the Interest mailing list