mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
feat(opengl): переход на LazOpenGLContextEx — GL-рендер в нативном Wayland
Пакет LazOpenGLContext заменён на LazOpenGLContextEx (форк в ../lazOpengl): Qt6-бэкенд работает поверх настоящего QOpenGLWidget (своя C++-либа libqlclglwidget) вместо GLX-контекста на winId(), поэтому --opengl теперь работает в нативной Wayland-сессии, а под ws=qt6 открывается путь на Windows/macOS. - uses OpenGLContext -> OpenGLContextEx (класс TOpenGLControl тот же) - удалена заглушка QtPlatformAllowsOpenGLControls с советом про XWayland: больше не нужна - рантайм-зависимость: libqlclglwidget.so рядом с бинарником (сборка: make -C ../lazOpengl/csrc install-app APPDIR=bin/x86_64-linux) Проверено на живом эфире (QO-100): спектр/водопад через GL под Wayland и xcb, прозрачность FBO-альфы починена в обёртке (forceOpaque). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+3
-17
@@ -25,7 +25,7 @@ uses
|
||||
Classes, SysUtils, StrUtils, FreqDisplay, DeviceForm, VfoOverlay, SampleRateOverlay, BandPlanOverlay,
|
||||
FlatButton, FlatSlider, FlatDropDown, AppTheme, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls, Buttons, Menus, Math, Types,
|
||||
OpenGLContext,
|
||||
OpenGLContextEx,
|
||||
LCLIntf, LCLType, GraphType,
|
||||
HPSDRProtocol, HPSDRNetwork,
|
||||
WDSP, WDSPEngine, AudioOutput, AudioInput,
|
||||
@@ -1005,23 +1005,9 @@ begin
|
||||
FSplitterRatio := 0.40;
|
||||
FSplitterDrag := False;
|
||||
|
||||
// OpenGLContextEx (QOpenGLWidget-бэкенд) работает и в нативном Wayland,
|
||||
// старая X11-заглушка больше не нужна
|
||||
FUseOpenGLSpectrum := HasOpenGLSpectrumSwitch;
|
||||
if FUseOpenGLSpectrum and (not QtPlatformAllowsOpenGLControls) then
|
||||
begin
|
||||
MessageDlg('OpenGL rendering disabled',
|
||||
'OpenGL rendering is not available in the current Qt Wayland mode.' + LineEnding +
|
||||
LineEnding +
|
||||
'The Lazarus/LCL Qt6 OpenGL control used by EWSDR requires an X11 display handle, ' +
|
||||
'but the native Wayland backend does not provide one. Using it here can cause an access violation during startup.' +
|
||||
LineEnding +
|
||||
LineEnding +
|
||||
'To run EWSDR with OpenGL rendering, start it through XWayland:' + LineEnding +
|
||||
'QT_QPA_PLATFORM=xcb ./ewsdr --opengl' + LineEnding +
|
||||
LineEnding +
|
||||
'OpenGL rendering will be disabled for this session.',
|
||||
mtWarning, [mbOK], 0);
|
||||
FUseOpenGLSpectrum := False;
|
||||
end;
|
||||
if FUseOpenGLSpectrum then
|
||||
FWaterfallFrameInterval := 1;
|
||||
if FUseOpenGLSpectrum then
|
||||
|
||||
Reference in New Issue
Block a user