Skip to content

add macOS support - #13

Open
celerizer wants to merge 3 commits into
masterfrom
macos
Open

celerizer wants to merge 3 commits into
masterfrom
macos

Conversation

@celerizer

Copy link
Copy Markdown
Member

Cocoa only lets a GL context attach to a window's drawable from the main thread, but the core's context is made current on the timing thread and swaps there. On macOS the core now renders against a QOffscreenSurface and publishes the finished frame's texture; the GUI thread wraps it in an FBO of its own (names are per-context, textures are shared), blits it into the window and swaps. A fence orders the two, and the timing thread paces off m_FramePresented instead of its own swap.

macOS also caps the compatibility profile at 2.1, below what any of the hardware-rendering cores need, so a 4.1 core-profile context is requested for every hardware format. Vsync has no glX/wgl entry point there and is set through CGL on the presenting context instead, so fast-forward still drops it.

readbackFrame() now works off the current context rather than the core's, since on macOS it is the GUI thread that holds the back buffer.

celerizer and others added 3 commits September 7, 2026 14:31
Cocoa only lets a GL context attach to a window's drawable from the main
thread, but the core's context is made current on the timing thread and
swaps there. On macOS the core now renders against a QOffscreenSurface
and publishes the finished frame's texture; the GUI thread wraps it in an
FBO of its own (names are per-context, textures are shared), blits it
into the window and swaps. A fence orders the two, and the timing thread
paces off m_FramePresented instead of its own swap.

macOS also caps the compatibility profile at 2.1, below what any of the
hardware-rendering cores need, so a 4.1 core-profile context is requested
for every hardware format. Vsync has no glX/wgl entry point there and is
set through CGL on the presenting context instead, so fast-forward still
drops it.

readbackFrame() now works off the current context rather than the core's,
since on macOS it is the GUI thread that holds the back buffer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing was compiling the Q_OS_MACOS paths. Qt 5's macOS binaries are
x86_64 only, so Qt 5 is covered on the Intel runner and Qt 6 on the Apple
Silicon one; between them every branch gets built on both Qt majors and
both arches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
macos-13 was retired in December 2025 and macos-14 is deprecated. Qt 6
moves to macos-15, and the Qt 5 entry -- x86_64 only, so it needs an
Intel host -- to macos-15-intel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant