Multiple backends: OSMesa + native

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”?

Of course, I found the relevant documentation for v3.4 right after posting this: GLFW 3.4: runtime platform selection

I suppose then the question becomes: is there any release schedule, and/or is a dev snapshot likely stable enough to start using?

Hi @kwaegel,

Welcome to the GLFW forum.

Dev snapshots are usually stable enough to work with - I ship my own applications using GLFW latest master branch, though I do test before hand.

No, this is an open source community driven project with a fairly large surface area.