summaryrefslogtreecommitdiff
path: root/client/src/part.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-05 23:24:57 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-05 23:24:57 +0100
commit1c0c8f788c8125c90a097e5241b5e8fe2518d1d2 (patch)
treeb5542fe00a472b5d5a8bcdd17fb3a34b75ad1dd0 /client/src/part.rs
parente15b39b2a9cf028b12cbe98f56674e58c5a6bd4c (diff)
downloadweareserver-1c0c8f788c8125c90a097e5241b5e8fe2518d1d2.tar
weareserver-1c0c8f788c8125c90a097e5241b5e8fe2518d1d2.tar.bz2
weareserver-1c0c8f788c8125c90a097e5241b5e8fe2518d1d2.tar.zst
a
Diffstat (limited to 'client/src/part.rs')
-rw-r--r--client/src/part.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/client/src/part.rs b/client/src/part.rs
index 0ad714a..7d02f0c 100644
--- a/client/src/part.rs
+++ b/client/src/part.rs
@@ -12,13 +12,18 @@ use wgpu::{
util::{BufferInitDescriptor, DeviceExt},
};
-pub struct RenderPart {
+pub struct PartRenderer {
vertex: Buffer,
index: Buffer,
pipeline: RenderPipeline,
bind_group: BindGroup,
n_vertex: u32,
}
+
+pub struct PrefabData {
+
+}
+
pub struct PartData {
target: Part,
vertex: Vec<Option<VertexAttributes>>,
@@ -48,7 +53,7 @@ impl PartData {
}
}
-impl RenderPart {
+impl PartRenderer {
pub fn new(device: Device, data: PartData, format: TextureFormat) -> Self {
let mut vertex = Vec::new();
let mut index = Vec::new();
@@ -140,7 +145,7 @@ impl RenderPart {
n_vertex,
}
}
- pub fn draw(&self, commands: &mut CommandEncoder, target: TextureView) {
+ pub fn draw(&self, commands: &mut CommandEncoder, target: &TextureView) {
let mut rpass = commands.begin_render_pass(&RenderPassDescriptor {
label: None,
color_attachments: &[Some(RenderPassColorAttachment {