2023-12-25 11:17:08 -08:00
|
|
|
pub mod consts;
|
2023-12-23 12:52:36 -08:00
|
|
|
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>;
|
|
|
|
}
|