brane
brane

Reputation: 51

Delphi - synhronize BitBlt with vsync (screen tearing)

I've some problem with my Delphi (10.4) application, and I'm stuck for a few days now. So I hope someone can help me. I'm rewriting some old code.

Basically, I've a problem with BitBlt command and screen tearing.

My code is drawing some .bmp images (five images in five columns) on application main form (form is maximized). Resolution is 1920x1080 and screen is 27".

I prepare each .bmp image (each image is 300x900 px) in the background and then just BitBlt that .bmp to the main form canvas using BitBlt. I'm using 60 FPS. That is OK. My monitor refresh rate is 60 Hz.

But I'm seeing from time to time screen tearing.

I'm looking for a few days how to synchronize my BitBlt operations with sync but no luck.

I've read something about flip scree but that should be the same as BitBlt in the way I'm using it right now?

I've found some old posts to read HW port, WaitForVerticalBlank, move to OpnGL (that is not an option for me), ....

But I'm not able to solve this.

Thanks....

Upvotes: 0

Views: 118

Answers (0)

Related Questions