refactor: 迁移 shader.wgsl 至 static/wgsl/,新增 model 模块
This commit is contained in:
15
src/model.rs
Normal file
15
src/model.rs
Normal 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],
|
||||
}
|
||||
Reference in New Issue
Block a user