2023-12-31 18:39:37 -08:00

20 lines
396 B
Rust

pub mod consts;
pub mod types;
mod vertexbuffer;
pub use vertexbuffer::VertexBuffer;
use std::mem;
use wgpu;
pub trait BufferObject
where
Self: Sized + bytemuck::Pod,
{
/// Number of bytes used to store this data.
/// Should match length in the layout() implementation.
const SIZE: u64 = mem::size_of::<Self>() as wgpu::BufferAddress;
fn layout() -> wgpu::VertexBufferLayout<'static>;
}