mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
expose egl display in gles (#2670)
This commit is contained in:
parent
0c0bbdb3ad
commit
2c9c5bbbe5
@ -580,6 +580,24 @@ pub struct Instance {
|
|||||||
inner: Mutex<Inner>,
|
inner: Mutex<Inner>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Instance {
|
||||||
|
pub fn raw_display(&self) -> egl::Display {
|
||||||
|
self.inner
|
||||||
|
.try_lock()
|
||||||
|
.expect("Could not lock instance. This is most-likely a deadlock.")
|
||||||
|
.egl
|
||||||
|
.display
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the version of the EGL display.
|
||||||
|
pub fn egl_version(&self) -> (i32, i32) {
|
||||||
|
self.inner
|
||||||
|
.try_lock()
|
||||||
|
.expect("Could not lock instance. This is most-likely a deadlock.")
|
||||||
|
.version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsafe impl Send for Instance {}
|
unsafe impl Send for Instance {}
|
||||||
unsafe impl Sync for Instance {}
|
unsafe impl Sync for Instance {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user