limelight 0.1.3

WebGL2 wrapper with a focus on making high-performance graphics code easier to write and maintain
Documentation
use crate::webgl::types::{DataType, SizedDataType};

#[derive(Debug, PartialEq)]
pub struct AttributeBinding {
    pub variable_name: String,
    pub kind: SizedDataType,
}

impl AttributeBinding {
    pub fn new(name: &str, data_type: DataType, size: i32) -> Self {
        AttributeBinding {
            variable_name: name.to_string(),
            kind: SizedDataType::new(data_type, size),
        }
    }
}

pub trait Attribute: bytemuck::Pod + bytemuck::Zeroable {
    fn describe() -> Vec<AttributeBinding>;
}

impl Attribute for () {
    fn describe() -> Vec<AttributeBinding> {
        Vec::new()
    }
}