1 Commits
Author SHA1 Message Date
Uladzimir KarpenkaandClaude Opus 4.8 3ebbbf5a18 fix(cocoa): real double buffering instead of fake glFlush swap
NSOpenGLPFADoubleBuffer was commented out, so DoubleBuffered:=True on the
control was silently ignored and the context stayed single-buffered.
LOpenGLSwapBuffers then only called glFlush(), leaving the front buffer on
screen mid-draw: frames tore and views could show partially rendered content.

Request the double-buffer pixel format when DoubleBuffered is set, and present
through NSOpenGLContext.flushBuffer. Falls back to glFlush() when no context
exists yet.

Note: this is a correctness fix, not a performance one -- measured on an M1 Pro
the app's CPU usage is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 15:25:53 +03:00