-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
Update android backend. #1249
Update android backend. #1249
Conversation
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.
I'm going to hold out and wait until this changes land upstream in winit, else I'll inevitably forget to change the dependencies back :P
Other than the one nit, looks good to me, although, I have no familiarity with android, so I guess me saying it "looks good" is worth jack shit.
glutin/src/api/egl/mod.rs
Outdated
@@ -621,6 +623,11 @@ impl Context { | |||
egl.GetError() | |||
) | |||
} | |||
if !self.vsync { | |||
if egl.SwapInterval(self.display, 0) == ffi::egl::FALSE { | |||
panic!("finish_impl: eglSwapInterval failed: 0x{:x}", egl.GetError()); |
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.
Nit: finish_impl
-> on_surface_created
.
@dvc94ch I tested winit with glutin from android branch with my simple gl triangle test. This builds and works good. But I still have some troubles with glutin on some devices. Particularly, it fails on eglMakeCurrent with EGL_BAD_MATCH. I tried different pixel formats, but it still failing. This looks like a bug in glutin. |
Cool! I think it's maybe due to the orientation handling code. Is it a glutin example? Or do you have the code somewhere? |
@dvc94ch This is my own experimental code. |
Closing in favor of #1274 |
This adds basic support for android to glutin. The android build failure is due a too old version of
cargo-apk
, the docker image needs to use rust-mobile/android-rs-glue#256