How can I convert this application to Lazarus GUI? lazarus / 39-Graphics ---------------------------------------------------------------------- Milsa · 2014-02-13 20:25 I have added TOpenGLControl to Lazarus components. This program works as console application. I want to convert this to Lazarus GUI application with using TOpenGLControl on TForm. opengl.zip - console application (it works) openglgraph.zip - Lazarus GUI application (it does not working) I was looking example "openglcontrol" but I do not know what I am doing wrong. Please help me. Added: Actual version of GUI application is in next reply. ---------------------------------------------------------------------- Milsa · 2014-02-15 12:29 This is actual version of GUI application. Triangle did not show. Where is the problem? ---------------------------------------------------------------------- Milsa · 2014-02-15 12:42 Solution is Code: [Select]OpenGLControl1Resize(Self); in OnPaint. Why not in OnCreate? ---------------------------------------------------------------------- marcov · 2014-02-15 13:41 It depends where the final handle for the form is allocated. IIRC newer Delphi's also adapted this behaviour, there is now a new method createhandle or so that can be overriden. ---------------------------------------------------------------------- Leledumbo · 2014-02-15 15:51 QuoteWhy not in OnCreate?Because OnResize needs to be invoked everytime a resizing is done. Otherwise, the viewport will not follow and the viewed image can be wrongly calculated.