mirror of
https://github.com/hannobraun/Fornjot
synced 2025-09-04 00:16:39 +00:00
Make ViewerHandle
more flexible
This commit is contained in:
parent
d511b54495
commit
f43e6c420c
@ -77,7 +77,7 @@ pub struct ViewerHandle {
|
||||
|
||||
impl ViewerHandle {
|
||||
/// # Open a new window
|
||||
pub fn open_window(&mut self) -> WindowHandle {
|
||||
pub fn open_window(&self) -> WindowHandle {
|
||||
// Use a conservative ordering, just to be on the safe side. This code
|
||||
// shouldn't be performance-sensitive anyway.
|
||||
let id = self.next_window_id.fetch_add(1, Ordering::SeqCst);
|
||||
|
@ -99,7 +99,7 @@ impl Instance {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
make_viewer_and_spawn_thread(|mut viewer| {
|
||||
make_viewer_and_spawn_thread(|viewer| {
|
||||
viewer.open_window().display_mesh(tri_mesh);
|
||||
})?;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user