Re: How do I use Mesa drivers on macOS?
Pekka Paalanen <[email protected]> Tue, 2 Jan 2024 13:10:32 +0200
| Newsgroups | gmane.comp.video.mesa3d.user |
|---|---|
| Message-ID | <20240102131032.398c7ab3@eldfell> |
--Sig_/K=8XArWvEuyB1MAOPP1=P.K Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 20 Dec 2023 15:24:18 -0500 John Klimek <[email protected]> wrote: > Thanks very much for the help! I was actually reading that thread as wel= l. >=20 > Is it true that Mesa on macOS requires X11 (Xquartz)? If so it's a > dead-end for me unfortunately. Hi, I know nothing about macOS, but maybe I can clarify the fundamentals of using OpenGL a bit. Mesa implements many more APIs than OpenGL flavors, but it sounded like the question is specifically about some OpenGL flavor. OpenGL itself is a rendering API, which has nothing about platform things like on-screen windows. You first need to use another API to create an OpenGL context, which will provide a way for the rendering results to interact with the window system, e.g. for the image to be shown on an on-screen window. Let's call these "glue APIs" - there are several options that an application can use, and the use must be explicitly written in the application code, meaning that you cannot switch from one glue API to another without replacing app code: - GLX, traditionally shipped as part of libGL library; This requires X11. - EGL, which may support multiple different window systems (a.k.a EGL platforms), and X11 is one of them. Still, the application must be written specifically for the chosen window systems even when using EGL. There is no "platform" extension listed in https://registry.khronos.org/EGL/ that would sound like macOS. - I think Windows has WGL which is requires... win32? - No idea about macOS. Therefore, to figure out if X11 is required, you would need to study which glue API and how the game is written to use. Mesa does not require X11 per se. It is possible to write an application targeting some other EGL platform instead. Mesa EGL implements even the surfaceless platform, which connects to no window system at all, making it inherently off-screen and window system agnostic. EGL surfaceless platform combined with glvnd[1] (to allow both Mesa and other vendor implementations of EGL and OpenGL APIs to co-exist) is the modern alternative to OSMesa as far as I understand. AFAIK, glvnd was primarily created to let NVIDIA drivers and Mesa co-exist on the same Linux system. I don't know if it applies to macOS or any other OS, so I don't dare to claim that OSMesa would be unnecessary today for new applications. [1] https://gitlab.freedesktop.org/glvnd/libglvnd Thanks, pq --Sig_/K=8XArWvEuyB1MAOPP1=P.K Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAmWT7ygACgkQI1/ltBGq qqfo8A//VEvFf5cnJPJH8FHIB3nVOIFVC75L+icFrnJtZYVc0B2g9mhEjBphqS9h AfdyHCbWsEA4Y8XSGOZK/NHiVCbKbiP4cSl+apEX0xEzl+wCHPXn++bcJDUj3Ulo N7JStm33lWrLLPvOO724CcZxEyve+i9FiWwt76FHrAimzx26nhVlk6mFr0B7OvUT zuIb7/tsjrkFcULGlHyDzrb/jMWcXBEt2thxSjsmcwmjQNbrTIKY2rISHia8jZ7e oY9KBTUzBsRo2c6zvSKGW77EnaAC3uYGNYyX1Bej54C/1TfQb7XQVINFMstMV73z /5DgyydtkEC0JhCM0kIwWgvuscLTVsRVDSEEOnl31Ykz60KT5xfir/c1y0L7uSKf oJz9P6i1BP4dvKdMvH19zEZ14IrI0boMfB0/c3I/D5JWk6/DCD/3m/A9vNcndwjy w8/P/sIP1shxnC1N9rEIL/HUmDM3PGY68Zo07fFRTBVdLmbNAbeCzpg2uJAn4ZBT xl7klsfetDfLVayewxXutZP/FMJCxR2gHNoLhVpQcEFDmIzjji5Rbh3TIr8bwNdi ggnfaMEShSMvoRU+afUpzdMIhd/UoFneD1Dtz8dh8kXsGPVz8eH0ZuuPexV7EEyD AsUVcCYTRF+aZIZkZTVq/mVew3MP03E/ER0lEG2SuQi7YNDmiD4= =xCOn -----END PGP SIGNATURE----- --Sig_/K=8XArWvEuyB1MAOPP1=P.K--