|
|
|
@ -18,6 +18,7 @@ type
|
|
|
|
|
procedure FormDestroy(Sender: TObject);
|
|
|
|
|
procedure OpenGLControlClick(Sender: TObject);
|
|
|
|
|
procedure OpenGLControlPaint(Sender: TObject);
|
|
|
|
|
procedure OpenGLControlResize(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
FView: TView;
|
|
|
|
|
public
|
|
|
|
@ -70,5 +71,19 @@ begin
|
|
|
|
|
OpenGLControl.SwapBuffers;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure TMainForm.OpenGLControlResize(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
//scaling := FDrawing.Scaling;
|
|
|
|
|
FView.OpenGLInit(True);
|
|
|
|
|
// TODO: It seems that a call to Reset should not be necessary, which then should also make the scaling changes irrelevant.
|
|
|
|
|
//FView.Reset;
|
|
|
|
|
// TODO: Restore previous zoom.
|
|
|
|
|
// ScaleView(scaling);
|
|
|
|
|
|
|
|
|
|
// Redraws control, but only if form is shown.
|
|
|
|
|
if (fsShowing in FormState) then
|
|
|
|
|
OpenGLControl.Repaint;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|
|
|
|
|
|
|
|
|
|