openframeworks / openframeworks/openFrameworks
[bug] [macOS] verticalSync problem since macOS13 (GLFW-inherited issue)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
macOS13 introduces jitter in the timing of update/draw cycle of GLFW apps https://github.com/glfw/glfw/issues/2249. it has (at least) 2 concrete negative effects in OF as demontrated in https://github.com/openframeworks/openFrameworks/issues/7752#issuecomment-1817035425
-
sometimes the jitter pushes the
draw()later than the actual frame cycle, stuttering/dropping a frame -
ofGetElapsedTimef()is not reliable to control phase-based animations requiring isochronous steps
until it is fixed within GLFW (seems hard) — or at OF-level by working around the Timer (as inspiration see the google deepmind workaround) , or by implementing a metal backend, or other — ofSetVerticalSync(false) and using ofSetFrameRate(nnn) is recommended. using macOS14 game mode in fullscreen also helps as seen in https://github.com/openframeworks/openFrameworks/issues/7752#issuecomment-1817035425.
the uneven timing issue can be worked around by using something like ofGetExpectedPaintTimef(), but that will not prevent dropped frames.
this issue will be updated as the GLFW and OF evolution affects the behaviour.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked GLFW issue 2249 and the related openFrameworks issues 7752, 7758, and 7761, then compare the listed GLFW, timer, and Metal-backend directions. No source file or test is named; done would require an agreed fix that prevents or reliably accounts for macOS 13 frame-timing jitter and dropped frames.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- desktop, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100