-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Gentz' Misc Changes #1058
Gentz' Misc Changes #1058
Conversation
c3bc9cd
to
9532b8d
Compare
I assume this is a successor to #942 ? |
Not really, unlike Edit: |
d91e8f6
to
8aba064
Compare
5ca9110
to
6c68c1e
Compare
0ce3893
to
dcce7ab
Compare
r? @francesca64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just taking a brief look over the changes (only API and windows side)
really looking forward to these changes!
src/lib.rs
Outdated
/// | ||
/// Errors should be very rare and only occur in case of permission denied, | ||
/// incompatible system, out of memory, etc. | ||
pub unsafe fn new_shared( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is only temporary until sharing is implemented for all APIs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, new_shared
is am unsafe variant of new
which allows sharing a context with an existing context. It was added because most people don't need context sharing and so would prefer to stay with the safe version.
src/platform/windows/context.rs
Outdated
match *ctxt { | ||
Context::HiddenWindowWgl(_, ref c) | ||
| Context::Wgl(ref c) => c.get_hglrc(), | ||
_ => panic!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for panic here? Or rather what sort of situation are we facing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The context it's being shared with might have been made with EGL. Maybe? Honestly can't remember the reasoning which when behind it anymore.
When I think about it, I'm pretty sure I read somewhere that both shared contexts must have the same OpenGL version (at least on some platforms), which means the user should probably be required to pass us the same GlRequest
, so the other context being made with EGL might be impossible.
Anyways, I don't currently have access to the old windows PC I had tested the windows changes on, so I don't want to randomly touch things without being able to test them.
On an unrelated note, the previous and my new version of the windows backend are totally borked, as far as I can tell, as they don't give a flying shit which version the user requested, and GlThenGles doesn't fallback. Does windows even support GLES?
src/platform/windows/context.rs
Outdated
} | ||
_ => panic!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see remark below)
Raw context support for both Wayland and X11. Add sharing support to windows. Signed-off-by: Hal Gentz <[email protected]>
985a637
to
a9a17bc
Compare
I have resolved the merge conflicts. |
r? @francesca64 |
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
This reverts commit da247d3.
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
Signed-off-by: Hal Gentz <[email protected]>
So, before this sits here for a whole year... @zegentzy, would you like to maintain glutin? I'm positive you'd be much better at it than me (the iOS backend is the only one I actually know anything about, and I use Metal now anyway), and I'm extremely appreciative that you've been responding to people/etc. |
@francesca64 I'd be happy to maintain it. |
This reverts commit 391fba3. The new headless API does not actually work in situations where X11 is not available. Waiting on rust-windowing/glutin#1058 to make it work right.
Signed-off-by: Hal Gentz <[email protected]>
@zegentzy if you are about to become the maintainer (which is awesome news!), please pay more attention to the shape of the commits being merged:
|
@francesca64 uh oh, that's quite a weird policy. Merging multi-thousand-LOC PRs just like that is quite destructive (to the history). |
@kvark it's the case with winit as well. It seems to be what tomaka decided on, and is something I have no direct control over. I agree with you, but it hasn't been enough of an issue so far for me to raise the issue with him (...though for Event Loop 2.0 it will definitely be a problem). |
Did this make it into 0.20? I can't find any docs regarding the separated contexts, and there is no mention of them in the CHANGELOG either. |
These changes did make it in, but separated contexts were decided against. Rationale was here: #1105 (comment) For now, instead use the platform-specific |
@zegentzy I see, thanks! |
Adds a way to create opengl contexts from an already existing window.
This might result in suboptimal config for windows on X11, but it should still work.
I currently only plan to implement this functionality on linux and windows. Currently untested.
Implemented:
Tested:
Signed-off-by: Hal Gentz [email protected]
CHANGELOG.md
if knowledge of this change could be valuable to usersFixes #1089, closes #1091.