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

[WIP] Update the dependencies to target the latest baseview and egui versions #4

Closed
wants to merge 10 commits into from

Conversation

robbert-vdh
Copy link
Contributor

I've also fixed the remaining clippy lints in the process. Creating uninitialized values with a Vec<u8> + set_len() would technically be fine even if clippy doesn't like it, so let me know if you prefer the old would-be-UB-if-it-weren't-u8s version this slice cast.

It's impossible to use this otherwise without also pinning this old
version.
The uninitialized vectors is fine here, but with types that don't have a
trivial drop implementation this would cause problems.
`Box::new_uninit_slice()` is sadly not yet stable.
This just got updated in baseview
Since this wouldn't work without it anyways
@robbert-vdh robbert-vdh changed the title Update the dependencies to target the latest baseview and egui versions [WIP] Update the dependencies to target the latest baseview and egui versions Feb 7, 2022
@robbert-vdh
Copy link
Contributor Author

Somehow the 'convert to draft' button is missing here, but I'm currently rewriting this to target a new version of baseview that includes the OpenGL context management. Otherwise it's impossible for baseview to know how the window should be created, since it needs to use a visual that corresponds to the framebuffer config that will be used to create the OpenGL context.

@BillyDM
Copy link
Owner

BillyDM commented Feb 7, 2022

So has the fix to baseview been finalized yet? I've been waiting for that to finalize before I update my repos.

@robbert-vdh
Copy link
Contributor Author

It is! This is the PR: RustAudio/baseview#115. That's of course not been merged yet, so this PR currently targets my fork. Could you give this a quick cargo run --example simple_demo if you have the time? It should work perfectly fine with Mesa (I tested with llvmpipe), but more testing is always better. 😄

@BillyDM
Copy link
Owner

BillyDM commented Feb 7, 2022

Oh, by "finalized" I meant when it is merged into the main repo.

Also, I ran your fork and it works just fine.

@robbert-vdh
Copy link
Contributor Author

Awesome! No, it has not been merged yet. I submitted the PR like half an hour ago, and it probably also needs to be tested on Windows and macOS first.

Which should fix RustAudio/baseview#116 for
the use case of Shift+dragging a slider.
@robbert-vdh
Copy link
Contributor Author

So, uh, this now targets yet another updated branch of baseview. Now keyboard modifiers while dragging widgets always work as expected in egui-baseview. Otherwise the modifier may be ignored when first clicking on the window, and the modifier state would get messed up when you drag outside of the window and then release the modifier.

@BillyDM
Copy link
Owner

BillyDM commented Feb 10, 2022

Awesome! Let me know when these changes get finalized in the official baseview repo and I'll merge them.

The biggest change is that textures are now handled using deltas, and
egui can manage multiple (full color) textures.
@robbert-vdh
Copy link
Contributor Author

Egui 0.17 was released, so I've updated this PR to match the new version. They completely changed how textures work (see their changelog). I've made the required changes in the painter, but I haven't tested it much further than just running the examples so I might have missed something.

@BillyDM
Copy link
Owner

BillyDM commented Sep 21, 2022

Closed because of 9abe392

@BillyDM BillyDM closed this Sep 21, 2022
@robbert-vdh
Copy link
Contributor Author

9abe392 still uses raw-gl-context and may thus crash on Linux since the window is not created correctly. Whether or not it crashes as is depends on the settings and drivers used. It crashes with NVIDIA's drivers at the default settings, and if you change the OpenGL settings a bit then it also crashes with Mesa (it just happens to work with the default settings).

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