refactor: 迁移 shader.wgsl 至 static/wgsl/,新增 model 模块

This commit is contained in:
lenn
2026-06-24 17:32:14 +08:00
parent 2497cb93ff
commit ec46e53c75
9 changed files with 296 additions and 136 deletions

15
src/model.rs Normal file
View File

@@ -0,0 +1,15 @@
use eframe::{
egui,
egui_wgpu::{self, wgpu},
wgpu::util::DeviceExt,
};
pub trait Vertex {
fn desc<'a>() -> wgpu::VertexBufferLayout<'a>;
}
#[repr(C)]
#[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)]
pub struct ModelVertex {
pub position: [f32; 3],
}