I’m trying to compile GLFW in such a way that it supports both hardware (e.g. X11) and software (OSMesa) backends at the same time. Mostly so I can run the same binary on servers with or without GPUs, using hardware acceleration when available and falling back to software rendering otherwise. Is this possible?
The current CMake file for GLFW v3.3.8 seems to make these options mutually exclusive, e.g. selecting GLFW_USE_OSMESA
sets _GLFW_OSMESA
internally, but prevents _GLFW_X11
from ever getting set.
It looks like the current development code in GitHub has a substantially different structure, so maybe the answer is “wait for GLFW 3.4 or use a dev snapshot”?