- procedure TForm1.CreateGLPanel;
- var
- P: TGLPanel;
- T: TOGLThread;
- begin
- Randomize;
- P := TGLPanel.Create(self);
- P.Parent := self;
- P.Left := Random(1000);
- P.Top := Random(500);
- P.Width := Random(500);
- P.Height := Random(500);
- T:=TOGLThread.Create(true);
- T.PParent := P;
- T.FreeOnTerminate := True;
- P.Thread := T;
- T.Resume;
- end;