

#Mac os opengl pro
OpenGL renderer string: AMD Radeon Pro 555X OpenGL Engine OpenGL vendor string: ATI Technologies Inc. Opengl-app$ _GLX_VENDOR_LIBRARY_NAME=mesa MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink build/glxinfo Users/dwiniecki/src/opengl-app/local_zink/lib/libGL.1.dylib (compatibility version 4.0.0, current version 4.0.0) I added those function calls near the end of glxinfo and this was the result: opengl-app$ otool -L build/glxinfo If the GL_RENDERER string says something like “… OpenGL Engine” then MESA is using the MacOS system version of OpenGL. Hmm.Ĭan you get the runtime to log the result of glGetString(GL_VERSION) and glGetString(GL_RENDERER)? That makes it look like zink should be used. usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0) usr/local/opt/libx11/lib/libX11.6.dylib (compatibility version 11.0.0, current version 11.0.0) tmp/zink/lib/libGL.1.dylib (compatibility version 4.0.0, current version 4.0.0) MacOS has this otool command… It says: $ otool -L build/glxgears If zink was being used I think the OpenGL version would probably be 3 or higher, but it that reports GL_VERSION = 2.1 ATI-4.6.20. I was expecting the output from glxgears with the -info option to include “zink” somewhere, but it doesn’t, so I think this might not actually be using zink, vulkan, or metal. That gcc is whatever macOS provides by default (or maybe it was installed along with Xcode, I’m not sure).
#Mac os opengl install
# X is probably not the only way to get a window with OpenGL inside on macOS but Homebrew's freeglut also uses it and I haven't put any effort into investigating alternatives.īrew install libx11 # This way /usr/local/include and /usr/local/lib will include x11 stuff but not GL. Meson -prefix=/tmp/zink -Dgallium-drivers=zink -Dmoltenvk-dir=/Users//VulkanSDK/1.2.198.1/MoltenVK -Dc_std=c11 build-zink venv/bin/activate # must always do this in shell before running pip3 or meson venv # need Python 3.5 or above according to mesa docs Install VulkanSDK in ~/VulkanSDK using the installer downloaded from LunarXchangeīrew install meson ninja python flex bison I did something like the following (I didn’t keep detailed notes): I made some progress on using Zink but I don’t think it’s fully working yet. “Mesa 22.0 Zink Lands macOS Build Fix For OpenGL On Vulkan Via MoltenVK On Metal”.Apparently Zink became easier to install on macOS recently, but only if you clone the git repo, I think, because the fix is on its way to Mesa 22.0 and the newest version on the Mesa website is 21.3.3:.“Introducing Zink, an OpenGL implementation on top of Vulkan”.It fails with: "meson.build:657:2: ERROR: Dependency "vulkan" not found, tried pkgconfig and system".

I cloned:Īnd then an example of the meson commands I’ve tried (none of which work) is: meson -prefix=/tmp/zink -Dgallium-drivers=zink -Dmoltenvk-dir=~/src/opengl-app/MoltenVK/Package/Release/MoltenVK -Dc_std=c11 build-zink I’ve tried to build Zink but haven’t succeeded yet.

#Mac os opengl how to
I read that I may still be able to use OpenGL on macOS by running it on top of Zink from the Mesa project, on top of MoltenVK, on top of Apple’s Metal graphics API.īut I’m having trouble figuring out how to set up Zink, Mesa3D, MoltenVK, etc. I’ve read this is expected on newer versions of macOS.

Awhile ago I tried and got something to run but it seemed to be broken so I assume OpenGL doesn’t work on this version of macOS. I want to play with OpenGL on macOS 11.6.
