Add OpenGL waterfall renderer

This commit is contained in:
2026-05-25 20:41:06 +03:00
parent 5090838563
commit 08c5f0ddb7
6 changed files with 578 additions and 23 deletions
+11 -1
View File
@@ -17,7 +17,7 @@ interface
uses
Classes, SysUtils, Graphics, Controls, Math, Types,
OpenGLContext, GL,
AppTheme, SpectrumView;
AppTheme, SpectrumView, WaterfallViewOpengl;
type
TGLTextureCache = record
@@ -83,6 +83,7 @@ type
constructor Create;
destructor Destroy; override;
procedure AttachControl(C: TOpenGLControl);
procedure AttachWaterfallControl(C: TOpenGLControl);
procedure SetSpectrumBitmapSize(W, H: Integer); override;
function SpectrumBitmapWidth: Integer; override;
procedure DrawSpectrum; override;
@@ -114,6 +115,9 @@ end;
constructor TSpectrumViewOpenGL.Create;
begin
inherited Create;
FWaterfall.Free;
FWaterfall := TWaterfallViewOpenGL.Create;
FWaterfall.WfFrameInterval := 1;
FGridDirty := True;
FOverlayDirty := True;
FSampleOverlayDirty := True;
@@ -144,6 +148,12 @@ begin
FGLControl := C;
end;
procedure TSpectrumViewOpenGL.AttachWaterfallControl(C: TOpenGLControl);
begin
if FWaterfall is TWaterfallViewOpenGL then
TWaterfallViewOpenGL(FWaterfall).AttachControl(C);
end;
procedure TSpectrumViewOpenGL.DeleteTexture(var T: TGLTextureCache);
begin
if T.Tex <> 0 then