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

Render a background for the open_window example #175

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

prokopyl
Copy link
Member

@prokopyl prokopyl commented Mar 25, 2024

This PR adds code to render a basic gray background to the opened window in the open_window example.

This is done mostly because X11 can get fairly inconsistent with its order of operations when nothing is rendered to it, which can cause it to just never actually show the window. Nevermind, that was a missing flush call on my end. 😅

This also helps making the example a bit more useful, since most users will want to render to their window.

And also it looks nicer. 🙂

This is done using the softbuffer crate, in the same manner of the open_parented introduced in #172.

@prokopyl prokopyl requested a review from micahrj March 25, 2024 22:58
examples/open_window.rs Show resolved Hide resolved
@micahrj micahrj merged commit 65d9704 into RustAudio:master Mar 25, 2024
3 checks passed
@prokopyl prokopyl deleted the open-window-example-softbuffer branch March 29, 2024 23:28
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