summaryrefslogtreecommitdiff
path: root/client/src/part.rs
diff options
context:
space:
mode:
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 {