mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
fix(opengl): use Lazarus OpenGLContext
Replace OpenGLContextEx with OpenGLContext in MainForm, SpectrumViewOpengl, WaterfallViewOpengl, and WidebandView. Switch the Lazarus project/program dependencies from LazOpenGLContextEx to LazOpenGLContext in ewsdr.lpi and ewsdr.lpr. PixelScale was introduced in 092a202; restore the previous viewport/texture path: glViewport(0, 0, W, H), EnsureTexture(W, H), and UploadCurrentRow(W).
This commit is contained in:
@@ -16,7 +16,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Graphics, Controls, Math, Types,
|
||||
OpenGLContextEx, GL,
|
||||
OpenGLContext, GL,
|
||||
AppTheme, SpectrumView, VfoOverlay, BandPlanOverlay,
|
||||
WaterfallView, WaterfallViewOpengl;
|
||||
|
||||
@@ -980,9 +980,7 @@ begin
|
||||
H := FGLControl.Height;
|
||||
if (W <= 0) or (H <= 0) then Exit;
|
||||
|
||||
// HiDPI: viewport в физических пикселях FBO, координаты — логические
|
||||
glViewport(0, 0, Round(W * FGLControl.PixelScale),
|
||||
Round(H * FGLControl.PixelScale));
|
||||
glViewport(0, 0, W, H);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity;
|
||||
glOrtho(0, W, H, 0, -1, 1);
|
||||
|
||||
Reference in New Issue
Block a user