Mega Search
23.2 Million


Sign Up

Make a donation  
Re: Graphics flicker slows down GLScene application unless m  
News Group: embarcadero.public.delphi.ide

On Tue, 20 Jan 2015 10:39:30 -0800, Bo Berglund
 wrote:

>What happens is this:
>When I use the Delphi 2007 compiled application all I see during
>processing is updates of the screen images a few seconds apart.
>But when I run the XE5 compiled version the screen flickers madly and
>the total processing time is increased from 7 seconds to 40 minutes! A
>factor of over x300!!!!
>

After a lot of stepping through code I found that inside GLScene there
is a point where it acts depending on a property called
"DoubleBuffered" (or similar) so I went on the lookout for this in
other places and found that it appears to be a property (in XE5 at
least) of a TForm and also on TToolBar.
So I set the property to true (it was false on these controls).
Now when I run the program the flicker has disappeared, but there is
another very annoying issue:

The top of the screen contains two TToolbars where some Toolbuttons
are located. These two toolbars are acting up big time now. They start
out with a black background and if I move the mouse on top of them
they change their looks by seemingly copying parts of what is slightly
above them....

Note: I tried both True and false for the Toolbars, no difference as
long as the Form.DoubleBuffered is true.

Screenshot image is uploaded to attachments (DoubleBufferProblem). It
contains three screenshot clips:
- After program start (shows black toolbars)
- After mouse have travelled over the toolbar a few times
- How it is supposed to look like (DoubleBuffering=false)

Anyone here able to explain how this can happen:
- With Form.DoubleBuffering=true the graphics in GLScene works as
expected, no flicker anymore.
- But instead the toolbars turn to black background and interact in
strange ways with the mouse pointer (repainting strangely).
- With DoubleBuffering=false the Toolbar is OK, but the screen
flickers like crazy during processing and the execution time is
extended 300 some times.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 20-Jan-2015, at 3:50 PM EST
From: Bo Berglund