Recent

Author Topic: How to prevent TPanel (used for context) from repaiting while resizing?  (Read 3680 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: 14202
  • Probably until I exterminate Putin.
Tcontrol.beginupdate and Tcontrol.endupdate is designed for that.
Specialize a type, not a var.

 

TinyPortal © 2005-2018