Repository navigation
Add macOS support - #267
Merged
Merged
Conversation
Rendering: - Run the GL 4.6 renderer on macOS through Mesa (Zink over KosmicKrisp). SDL3_MesaEGL_Context renders into an EGL pbuffer at the engine's render size and presents each frame through SDL's Metal renderer. - Bundle libEGL, libgallium, KosmicKrisp and the Vulkan loader into Build/<config>/mesa/lib at build time. Requires `brew install mesa vulkan-loader`. - Scale mouse coordinates between window and render size so clicks land correctly when the two differ, as in fullscreen. - Implement HardwareConfig.CanDoSRGBReadFromRTs, which only the macOS shader path calls. Native libraries: - Move libsteam_api.dylib to runtimes/osx/native so arm64 finds it. - Use Homebrew's arm64 FreeImage on Apple Silicon, since the NuGet package only ships x86_64. - Implement GetSystemFontPath on macOS through CoreText. Cross-platform fixes: - Fix font fallback "NULL" entries being compared by reference, which looped forever when no fallback font could be loaded. - Use the invariant culture process-wide so data files parse correctly on locales with a comma decimal separator. - Resolve the mod directory, relative search paths and the platform directory against AppContext.BaseDirectory instead of the working directory, so launching from outside the build output works. - Find the Garry's Mod install through the macOS Steam library path. - Skip loading Chromium on macOS when the CEF framework is missing, instead of searching the working directory tree.
Member
|
Forgot to approve this but #264 will also mean we need to have the BASS OSX binaries as well (noting for myself before merging) |
marchc1
approved these changes
Nov 16, 2026
Member
|
Waiting on #264 now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DISCLAIMER: @marchc1 for this to work fully it'd need the Luajit fork sdn uses to also build for osx.
DISCLAIMER 2: CEF is not working currently, this is because it needs to be notorized and signed (thanks apple), I could get it working locally in a testing env but eventually if we want to ship to apple we'd need to have a proper developer account (byebye my 100$)...
DISCLAIMER 3: I changed some of the path resolution to
AppContext.BaseDirectoryit felt better to use, if you think thats not warranted I can remove it.DISCLAIMER 4: This needs users to install a homebrew package (FreeImage) to work, I left it like that but eventually we probably need some sort of install script for the osx platform, or to bundle it (?).
Rendering:
brew install mesa vulkan-loader.Native libraries:
Cross-platform fixes: