OpenGL Koch Curve: Fixed and Rendering Well lazarus / 39-Graphics ---------------------------------------------------------------------- Boleeman · 2024-09-21 00:38 Tried to convert an OpenGL  Koch Curve fractal code from Delphi Got an external access violation error. I was rendering to the form canvas and not to the OpenGL control. ---------------------------------------------------------------------- Boleeman · 2024-09-21 01:47 I replaced dglOpenGL with GL in uses and got rid of dglOpenGL.pas in Project inspector and now I don't have the access violation error. It compiles OK I get a Yellow Koch Curve, but it is flashing. ---------------------------------------------------------------------- Lulu · 2024-09-21 08:18 Hi, at the end of the FormPaint method, if you replace Refresh by Invalidate there is no flashing. Tested on windows 10. There is another problem: the app don't stop if I click on the red cross at top-right of the windows. ---------------------------------------------------------------------- Boleeman · 2024-09-21 09:17 Thanks Lulu for the reply. I worked out that I was not rendering to the OpenGL control, but to the Form1 canvas. Now it is all fixed and working well. ---------------------------------------------------------------------- Lulu · 2024-09-21 17:09 Quote from: Boleeman on September 21, 2024, 11:17:08 amI worked out that I was not rendering to the OpenGL control, but to the Form1 canvas. I didn't realise it either