typed primitive buffers + macro for creation
This commit is contained in:
@@ -13,16 +13,18 @@ pub struct WindowUniform {
|
||||
#[derive(Copy, Clone, bytemuck::Pod, bytemuck::Zeroable)]
|
||||
pub struct PrimitiveInstance {
|
||||
pub region: UiRegion,
|
||||
pub ptr: u32,
|
||||
pub binding: u32,
|
||||
pub idx: u32,
|
||||
}
|
||||
|
||||
impl PrimitiveInstance {
|
||||
const ATTRIBS: [VertexAttribute; 5] = wgpu::vertex_attr_array![
|
||||
const ATTRIBS: [VertexAttribute; 6] = wgpu::vertex_attr_array![
|
||||
0 => Float32x2,
|
||||
1 => Float32x2,
|
||||
2 => Float32x2,
|
||||
3 => Float32x2,
|
||||
4 => Uint32,
|
||||
5 => Uint32,
|
||||
];
|
||||
|
||||
pub fn desc() -> wgpu::VertexBufferLayout<'static> {
|
||||
|
||||
Reference in New Issue
Block a user