Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attrib::Info::check<T>(&self) -> bool #55

Open
LexiBigCheese opened this issue Jan 19, 2025 · 0 comments
Open

attrib::Info::check<T>(&self) -> bool #55

LexiBigCheese opened this issue Jan 19, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@LexiBigCheese
Copy link

impl attrib::Info {
  pub fn check<T>(&self) -> bool {
    std::mem::size_of<T>() == self.size
  }
}

use when creating buffer slices to ensure one vertex is one struct (though allow user to bypass this functionality at their own risk, for example, if they just want to send u8, but point them at bytemuck first)

@ian-h-chamberlain ian-h-chamberlain added the enhancement New feature or request label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants