mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
Add OpenGL waterfall renderer
This commit is contained in:
+11
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user