openvr: re-upload line texs on show-hide to prevent disappearing lasers
This commit is contained in:
@@ -160,6 +160,12 @@ impl LinePool {
|
|||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn mark_dirty(&mut self) {
|
||||||
|
for data in self.lines.values_mut() {
|
||||||
|
data.state.dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct StaticRenderer {
|
struct StaticRenderer {
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ pub fn openvr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
|
|||||||
.iter()
|
.iter()
|
||||||
.any(|p| p.now.show_hide && !p.before.show_hide)
|
.any(|p| p.now.show_hide && !p.before.show_hide)
|
||||||
{
|
{
|
||||||
|
lines.mark_dirty(); // workaround to prevent lines from not showing
|
||||||
overlays.show_hide(&mut state);
|
overlays.show_hide(&mut state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user