Recent

Author Topic: How to prevent TPanel (used for context) from repaiting while resizing?  (Read 4198 times)

Pascal

  • Hero Member
  • *****
  • Posts: 932
I have a form with a panel which is used for a GL-Context (dglOpenGL).
The context is refreshed every 40 ms by a thread.
If i now resize the form, the GL-Context is hidden by the repainted Panel/Window.
How can i prevent this behaviour, so that the context is visible while resizing.

Using TOpenGLControl is not an option here as this doesn't seem to work with rendering in threads.

laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Using TOpenGLControl is not an option here as this doesn't seem to work with rendering in threads.

Well, in fact this was the solution! I used TOpenGLControl to create my context on. The context created by TOpenGLControl will not be used.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Thaddy

  • Hero Member
  • *****
  • Posts: 18764
  • To Europe: simply sell USA bonds: dollar collapses
Tcontrol.beginupdate and Tcontrol.endupdate is designed for that.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018