Hi Aaron,
The OpenGL graphics library requires a window to render, so it is not possible to render ChimeraX images without creating a window. But it is fine to have the window iconified. The Linux ChimeraX uses a replacement library for OpenGL called OSMesa (offscreen mesa) which is essentially a version of OpenGL that can work without a window. Back in 2021 I built OSMesa for Intel Mac to render images in nogui mode.
If you built libOSMesa.dylib for ARM Mac somehow then you could use that and put it with the osmesa/__init__.py at the above github link in your ChimeraX Python site-packages directory and it would probably be able to render off-screen images if you started ChimeraX with the --offscreen option. I believe OSMesa does not use graphics hardware acceleration, only the CPU so it will be much slower to render images.
Tom
On Dec 10, 2024, at 6:33 AM, aponysbc--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I'm trying to generate images in batch with chimerax from terminal on mac m2. When I run "chimerax --nogui --exit --cmd" I get the error:
raise LimitationError("Unable to save images because OpenGL rendering is not available")
chimerax.core.errors.LimitationError: Unable to save images because OpenGL rendering is not available
ChimeraX command "graphics driver" gives:
OpenGL version: 4.1 Metal -88.1
OpenGL renderer: Apple M2
OpenGL vendor: Apple
Is there any way around this? I saw another post about this from 2020 that the nogui option only works on linux with offscreen. Is there any way to save images in batch from terminal?
Thanks,
Aaron
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/