Flickering Graphics - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Flickering Graphics

KaSchKaSch Posts: 2Member
Dear All,

I am a research and use Delphi(5) as a modelling tool. At the moment I try to display a grid of cells that keep changing their status, i.e. change colour.
I draw my grid (a group of rectangles) into a TImage. To update the whole grid before displaying the result I have in fact 2 TImage variables one of which is visible while the other one is not. The invisible one is updated to the new status, the visibility properties for the two variable are swapped over and the other one is updated. I hope this make sense.

My Problem is that the image flickers (a lot).

In a a third TImage variable I try to use FillRect() to clear the image before updating it. The result is pretty much the same.

My system is a 2.5GHz PC under Windows 2000 with Delphi 5. Any suggestion of how to get a flicker free image would be very welcome.

Cheers

KaSch

Comments

  • ManningManning Posts: 1,621Member
    : Dear All,
    :
    : I am a research and use Delphi(5) as a modelling tool. At the moment I try to display a grid of cells that keep changing their status, i.e. change colour.
    : I draw my grid (a group of rectangles) into a TImage. To update the whole grid before displaying the result I have in fact 2 TImage variables one of which is visible while the other one is not. The invisible one is updated to the new status, the visibility properties for the two variable are swapped over and the other one is updated. I hope this make sense.
    :
    : My Problem is that the image flickers (a lot).
    :
    : In a a third TImage variable I try to use FillRect() to clear the image before updating it. The result is pretty much the same.
    :
    : My system is a 2.5GHz PC under Windows 2000 with Delphi 5. Any suggestion of how to get a flicker free image would be very welcome.

    I don't know if Delphi 5 has the property, but you could try looking up DoubleBuffered in the help file. If you find it, try setting that property on the form to true. Ive never tried, but I've heard that works. If not you might have to look into using DirectX or OpenGL where you can definitely implement double buffering, just with a whole lot more work.
Sign In or Register to comment.