OpenGLControl flickers
Original Reporter info from Mantis: m_burkhard@gmx.ch
-
Reporter name:
Original Reporter info from Mantis: m_burkhard@gmx.ch
- Reporter name:
Description:
When I run the following code, the OpenGlControl window flickers.
If I run the example under Lazarus/components/opengl/example , a similar problem. There the cube is not even visible, except when I endlessly change the size with the mouse, the cube comes from time to time.
Tested with the trunk of Sunday 05.08.2018
When I compile with Lazarus 1.8.4, everything works fine.
Steps to reproduce:
type
TForm1 = class(TForm)
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
procedure OpenGLControl1Paint(Sender: TObject);
public
OpenGLControl: TOpenGLControl;
end;
var
Form1: TForm1;
implementation
procedure TForm1.OpenGLControl1Paint(Sender: TObject);
begin
OpenGLControl.SwapBuffers;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
OpenGLControl.Invalidate;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
OpenGLControl := TOpenGLControl.Create(Self);
OpenGLControl.Parent := Self;
OpenGLControl.Align := alClient;
OpenGLControl.OnPaint := @OpenGLControl1Paint;
end;
Mantis conversion info:
- Mantis ID: 34094
- OS: Linux
- OS Build: Mint 19.0 84Bit
- Platform: Linux 64Bit
- Version: 1.9 (SVN)