aboutsummaryrefslogtreecommitdiff
path: root/stockton-render/src/lib.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-25 17:44:22 +0100
committertcmal <me@aria.rip>2024-08-25 17:44:22 +0100
commit5da588c6223e4c30cc5ec349f318aa5203cb0ce7 (patch)
tree4e994259407507e0fd203ad5b861bb7701ad5763 /stockton-render/src/lib.rs
parentb822c9794fb6f11bd793c2301ae9ec860de95bf5 (diff)
refactor(render): move to locks rather than unsafe ops
Diffstat (limited to 'stockton-render/src/lib.rs')
-rw-r--r--stockton-render/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/stockton-render/src/lib.rs b/stockton-render/src/lib.rs
index 5943ed4..a0d745c 100644
--- a/stockton-render/src/lib.rs
+++ b/stockton-render/src/lib.rs
@@ -64,7 +64,7 @@ impl<'a, M: 'static + MinBspFeatures<VulkanSystem>> Renderer<'a, M> {
/// Render a single frame of the given map.
fn render(&mut self, ui: &mut UiState, pos: Vector3) {
// Get visible faces
- let faces = get_visible_faces(pos, &*self.context.map);
+ let faces = get_visible_faces(pos, &*self.context.map.read().unwrap());
// Then draw them
if self.context.draw_vertices(ui, &faces).is_err() {