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>
Форк штатного пакета LazOpenGLContext (Lazarus components/opengl).
Qt5/Qt6-бэкенд (glqtnativecontext.pas) использует собственный контекст
настоящего QOpenGLWidget вместо ручного GLX на winId(): EGL на Wayland,
GLX на X11, WGL/CGL на Windows/macOS под ws=qt6.
QOpenGLWidget-наследник с paintGL-хуком живёт в маленькой C++-либе
csrc/qlclglwidget.cpp (QLCLOpenGLWidget из libQt6Pas — не QOpenGLWidget,
а голый QWidget под внешний GLX). Сборка: csrc/Makefile
(linux/macos/windows-кросс mingw-w64/windows-native MSYS2, install,
install-app) + build-msvc.bat для MSVC-Qt. Либа грузится в рантайме
рядом с бинарником приложения.
Бэкенды gtk2/gtk3/win32/cocoa скопированы из стока без изменений
(юниты переименованы с суффиксом Ex). Детали и нюансы — в README.md.
Проверено: EWSDR, спектр/водопад через GL в нативном Wayland (KDE, qt6),
живой эфир QO-100.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>