mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
GLES Wayland: properly resize on configure (#2094)
This commit is contained in:
committed by
Dzmitry Malyshau
parent
873e83c54d
commit
f875e32455
@@ -934,15 +934,6 @@ impl crate::Surface<super::Api> for Surface {
|
||||
library.get(b"wl_egl_window_create").unwrap();
|
||||
let window = wl_egl_window_create(handle.surface, 640, 480) as *mut _
|
||||
as *mut std::ffi::c_void;
|
||||
let wl_egl_window_resize: libloading::Symbol<WlEglWindowResizeFun> =
|
||||
library.get(b"wl_egl_window_resize").unwrap();
|
||||
wl_egl_window_resize(
|
||||
window,
|
||||
config.extent.width as i32,
|
||||
config.extent.height as i32,
|
||||
0,
|
||||
0,
|
||||
);
|
||||
wl_window = Some(window);
|
||||
window
|
||||
}
|
||||
@@ -1017,6 +1008,19 @@ impl crate::Surface<super::Api> for Surface {
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(window) = wl_window {
|
||||
let library = self.wsi.library.as_ref().unwrap();
|
||||
let wl_egl_window_resize: libloading::Symbol<WlEglWindowResizeFun> =
|
||||
library.get(b"wl_egl_window_resize").unwrap();
|
||||
wl_egl_window_resize(
|
||||
window,
|
||||
config.extent.width as i32,
|
||||
config.extent.height as i32,
|
||||
0,
|
||||
0,
|
||||
);
|
||||
}
|
||||
|
||||
let format_desc = device.shared.describe_texture_format(config.format);
|
||||
let gl = &device.shared.context.lock();
|
||||
let renderbuffer = gl.create_renderbuffer().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user