summaryrefslogtreecommitdiff
path: root/client/src/scene_prepare.rs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/scene_prepare.rs')
-rw-r--r--client/src/scene_prepare.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/scene_prepare.rs b/client/src/scene_prepare.rs
index 47f168d..7b81c93 100644
--- a/client/src/scene_prepare.rs
+++ b/client/src/scene_prepare.rs
@@ -1,6 +1,6 @@
use crate::download::Downloader;
use anyhow::{Context, Result};
-use log::{debug, info};
+use log::debug;
use std::{
collections::{HashMap, HashSet},
sync::Arc,
@@ -9,7 +9,6 @@ use weareshared::{
Affine3A,
packets::{ReadWrite, Resource},
resources::{Attribute, Part, Prefab},
- store::sha256,
};
use wgpu::{
Buffer, BufferUsages, Device,
@@ -74,6 +73,13 @@ impl ScenePreparer {
}
for pres in &self.index_buffers_needed {
if let Some(buf) = dls.try_get(*pres)? {
+ let buf = buf
+ .into_iter()
+ .array_chunks::<2>()
+ .map(u16::from_be_bytes)
+ .map(u16::to_le_bytes)
+ .flatten()
+ .collect::<Vec<_>>();
let buffer = self.device.create_buffer_init(&BufferInitDescriptor {
contents: &buf,
label: None,