20 lines
394 B
Rust
20 lines
394 B
Rust
|
pub mod data;
|
||
|
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>;
|
||
|
}
|