Software rendering is just a backend driver. Once you have them working you can select what ever you like. Admittedly there is little point in select something like the INTEL or AMD drivers, but software rasterisers or Zink are then possible.
My goal is to compute OpenGL with a C/C++ software that will only run in CPU and provide an image to display in an app. This works well on Ubuntu and Windows for which I get a llvmpipe
renderer. The point is to use Mesa’s software rasterizer when JOGL (a Java OpenGL binding) fail to access native/OS GL.
There is a platform define that ends in APPLEGL, IIRC
I indeed found
GLX_USE_APPLEGL
in src/glx/apple_glx.c
and several src/glx/apple/apple_glx_*.c
files. The flag is set there, which let me think that Mesa won’t call Apple GL if compilation has options with_glx == 'xlib' or with_glx == 'gallium-xlib'
(which is conform to what the doc says).
I however exactly followed these instructions and built mesa with -Dosmesa=true -Dglx=xlib -Dgallium-drivers=swrast
, so I would expect the whole Apple GL code to be bypassed, which is not
# Force my mesa build before Apple's one
export DYLD_INSERT_LIBRARIES=/Users/martin/Dev/jzy3d/external/osmesa/lib/libGL.dylib
# Force CPU rendering
export LIBGL_ALWAYS_SOFTWARE=true
# Print info on selected GL renderer
glxinfo | head -n 50
yields to the following output
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
...
OpenGL vendor string: Apple Inc.
OpenGL renderer string: Apple Software Renderer
OpenGL version string: 2.1 APPLE-18.5.9
OpenGL shading language version string: 1.20
whereas I would expect
OpenGL renderer string: llvmpipe
I found no IIRC string in the project.