<div dir="ltr"><div dir="ltr">Thanks very much for the information!<div><br></div><div>Is it possible to link to the Mesa drivers without modifying the code?</div><div><br></div><div>For example, I'm hoping to link EDuke32 (game engine) to Mesa but I'm not familiar with the code and I thought maybe I could just change the makefile (or linker flags?) to link Mesa instead of the Apple OpenGL framework.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 22, 2023 at 8:05 AM Randall Frank <<a href="mailto:randall-frank@outlook.com">randall-frank@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="msg-3207651698140208476">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_-3207651698140208476WordSection1">
<p class="MsoNormal">For several of the apps I’ve worked on, the approach has been to isolate the application OpenGL code into a separate shared library and build it twice. Once vs the system OpenGL and once vs Mesa with name mangling enabled, isolating the
bindings into two separate shared libraries. At runtime, you can generally load both shared libraries because of the namespace isoloation and pick the renderer on the fly as you see fit, or just select to load one or the other. I’ve used Apple OpenGL for
onscreen and Mesa for batch mode in driver bug cases, printing, etc. My Mesa pipeline usually targets OSMesa contexts in this configuration.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The approach depends a lot on how your code it structured, but it is an approach I’ve used.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">FWIW. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> mesa-users <<a href="mailto:mesa-users-bounces@lists.freedesktop.org" target="_blank">mesa-users-bounces@lists.freedesktop.org</a>>
<b>On Behalf Of </b>John Klimek<br>
<b>Sent:</b> Wednesday, December 20, 2023 3:56 PM<br>
<b>To:</b> Martin Pernollet <<a href="mailto:martin.pernollet@protonmail.com" target="_blank">martin.pernollet@protonmail.com</a>><br>
<b>Cc:</b> <a href="mailto:mesa-users@lists.freedesktop.org" target="_blank">mesa-users@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: How do I use Mesa drivers on macOS?<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Yeah I saw that too. I guess the first step is having somebody confirm that Mesa (software drivers at least) work on macOS applications that aren't X11 and then proceed to figure out how to use them...<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Dec 20, 2023 at 3:31 PM Martin Pernollet <<a href="mailto:martin.pernollet@protonmail.com" target="_blank">martin.pernollet@protonmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-width:medium medium medium 1pt;border-style:none none none solid;border-color:currentcolor currentcolor currentcolor rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">This was suggested but I am not sure about this.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">When reading my discussion again I can see that adding X11 library to the path did not fixed anything.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal">Le mercredi 20 décembre 2023 à 21:24, John Klimek <<a href="mailto:jklimek@gmail.com" target="_blank">jklimek@gmail.com</a>> a écrit :<br>
<br>
<br>
<u></u><u></u></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<div>
<p class="MsoNormal">Thanks very much for the help! I was actually reading that thread as well.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Is it true that Mesa on macOS requires X11 (Xquartz)? If so it's a dead-end for me unfortunately.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Dec 20, 2023 at 3:22 PM Martin Pernollet <<a href="mailto:martin.pernollet@protonmail.com" target="_blank">martin.pernollet@protonmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-width:medium medium medium 1pt;border-style:none none none solid;border-color:currentcolor currentcolor currentcolor rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">Hi John,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">I built and use Mesa on macOS in the past. You can find my notes here<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><a href="https://github.com/jzy3d/vtk-java-wrapper/blob/master/MESA.md" target="_blank">https://github.com/jzy3d/vtk-java-wrapper/blob/master/MESA.md</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">I however had issues loading Mesa on macOS 11+ which I discussed here<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><a href="https://community.khronos.org/t/failing-to-load-mesa3d-on-macos-instead-of-macos-provided-opengl-library/108408" target="_blank">https://community.khronos.org/t/failing-to-load-mesa3d-on-macos-instead-of-macos-provided-opengl-library</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">Maybe that will help you a bit !
<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">Cheers,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Arial,sans-serif">Martin<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal">Le mercredi 20 décembre 2023 à 19:38, John Klimek <<a href="mailto:jklimek@gmail.com" target="_blank">jklimek@gmail.com</a>> a écrit :<br>
<br>
<br>
<u></u><u></u></p>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<div>
<p class="MsoNormal">Can anybody give me any information on using Mesa under macOS?<u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I see that Homebrew also contains prebuilt Mesa binaries but I'm unsure how to use them. I know with Windows you simply place the Mesa DLLs (opengl32.dll, etc) next to the application executable and it works but I'm not sure with macOS.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">My goal is to use eduke32 [game engine] with the llvmpipe driver. I can compile eduke32 under macOS but again I'm unsure how to implement Mesa.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks for any help!<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</blockquote>
</div>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</blockquote>
</div>
</div>
</div>
</div></blockquote></div></div>