macroquad icon indicating copy to clipboard operation
macroquad copied to clipboard

Don't automatically call `clear_background`

Open AribYadi opened this issue 3 years ago • 4 comments

Hello there. Is there a way to disable the auto calling of clear_background? As I'm rendering only when the display is updated and the display is cleared every frame, the display is just black.

AribYadi avatar Aug 17 '22 07:08 AribYadi

Not really :(

Unfortunately, some backends do clear the background automatically and to make the same behavior across all the backends - we need to keep clearing the screen.

not-fl3 avatar Aug 17 '22 13:08 not-fl3

Is there a workaround? Maybe a bool in window_conf()?

DuckyBlender avatar Mar 12 '24 19:03 DuckyBlender

Yes, there is a workaround!

Un update, draw everything to a texture once, and than draw that texture every frame. This will allow to handle window resizes properly and do not depend on the cross-platforms details on how OS preserve window content on moving window, alt-tabs etc.

not-fl3 avatar Mar 12 '24 20:03 not-fl3

Created #705 but unfortunately I can't get this to work...

DuckyBlender avatar Mar 12 '24 22:03 DuckyBlender