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

eframe::App::post_rendering #1591

Merged
merged 10 commits into from
May 29, 2022
Merged

eframe::App::post_rendering #1591

merged 10 commits into from
May 29, 2022

Conversation

elwerene
Copy link
Contributor

@elwerene elwerene commented May 6, 2022

First try in having a post rendering function as discussed at #1578 (comment)

I'm not sure if the full PaintCallbackInfo would be needed. Either way I don't know how to fill half its fields.

Frame is needed to get access to the gl handle.

Should I wrap the screen size and the gl handle into an own Struct? Or is it ok to provide a readonly reference to Frame?

@emilk
Copy link
Owner

emilk commented May 11, 2022

Looks good!

It would be great with an example app (that also serves as a test) which paints a GUI and then can take a screenshot of it using this feature!

The screenshot could either be saved to file (using the image crate) or shown inside the UI the next frame (hall-of-mirrors style!)

@elwerene elwerene changed the title Draft: Post rendering function Post rendering function May 12, 2022
eframe/src/native/epi_integration.rs Outdated Show resolved Hide resolved
examples/screenshot/src/main.rs Show resolved Hide resolved
examples/screenshot/src/main.rs Outdated Show resolved Hide resolved
@elwerene elwerene requested a review from emilk May 13, 2022 08:35
@emilk emilk changed the title Post rendering function eframe::App::post_rendering May 29, 2022
@emilk emilk merged commit 4a7a2d6 into emilk:master May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants