Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: framebuffer clear when using glow with multi-viewports #3713

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

emilk
Copy link
Owner

@emilk emilk commented Dec 18, 2023

I broke this in #3665

For some reason, when using multiple viewports, the first "clear" doesn't take.

I don't have time to investigate further, so I am adding a hack here which:

  • For single-viewport apps, the clear is done before App::update so user can paint there
  • For multi-viewport apps, the clear is done after App::update, so that it works

This means painting in App::update won't work with multi-viewports.

Ideally, users should use paint callbacks instead of painting directly in App::update anyways.

@emilk emilk added bug Something is broken eframe Relates to epi and eframe egui_glow Relates to running egui_glow on native labels Dec 18, 2023
@emilk emilk changed the title Fix framebuffer clear in egui_glow with multi-viewports Bug fix: framebuffer clear when using glow with multi-viewports Dec 18, 2023
@emilk emilk removed the egui_glow Relates to running egui_glow on native label Dec 18, 2023
@emilk emilk force-pushed the emilk/fix-glow-clear-multi-viewport branch from 98a7df2 to 50726a3 Compare December 18, 2023 09:39
@emilk emilk merged commit 8503a85 into master Dec 18, 2023
35 checks passed
@emilk emilk deleted the emilk/fix-glow-clear-multi-viewport branch December 18, 2023 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken eframe Relates to epi and eframe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant