user2103008
user2103008

Reputation: 524

OpenGL application fails on my mac, runs on virtualbox

I have a macbook pro with AMD Radeon graphics card and mountain lion 10.8.3 installed.

I am trying to access an OpenGL application (made using kivy on python) residing on an ubuntu 12.04.1 machine by using ssh from my mac. The application quits saying that the minimum OpenGL version required for running the application is 2.0 (the version it detected was 1.4).

However, I can run the application on the ubuntu machine itself, as well as on virtual box installed on my mac using ssh with X11 enabled.

Is there some X11 config option I am missing somewhere on my mac to change the minimum OpenGL version to 2.0 instead of 1.4 while using ssh?

Upvotes: 2

Views: 3290

Answers (1)

radical7
radical7

Reputation: 9124

If you're using XQuartz as the X server on the Mac, I think you're out of luck, at least for running the app from a remote machine. It appears (by using glxinfo) that for indirect GLX-based rendering, the supported OpenGL is as you say: 1.4. If you're doing direct GLX-based rendering, then XQuartz seems to expose version 2.1.

The exposed version of OpenGL through the X server is hard-coded in the X server's GLX implementation, so you really can't just configure a new version. The likely reason it works on your Ubuntu system is that you're getting direct rendering support, which you won't get through ssh to a different machine. The virtual box one is a bit confusing, but it appears that they have the X server (in virtual box) link to the native X server allowing direct rendering, and hence the ability to run. You can check the settings by running the glxinfo command and checking what it reports for direct rendering:

% glxinfo | grep direct
directing rendering: Yes  

which indicates that X clients are talking directly to OpenGL. Comparing that with:

% glxinfo | grep direct
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)

which means all OpenGL commands are sent to the remote X server, which talks to the local OpenGL implementation on the apps behalf, but doesn't equate to direct rendering.

If you can port the app over to the Mac (perhaps using MacPorts or similar) where you can get direct rendering through the X server, you'll get OpenGL 2.1, and the app should work.

Upvotes: 5

Related Questions