mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 13:54:21 +00:00
Initial wgpu abstraction
This commit is contained in:
14
Source/Render/IndexBuffer.rs
Normal file
14
Source/Render/IndexBuffer.rs
Normal file
@ -0,0 +1,14 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::borrow::Cow;
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct IndexBuffer {
|
||||
pub label: Cow<'static, str>,
|
||||
pub content: Vec<u8>,
|
||||
}
|
||||
|
||||
impl IndexBuffer {
|
||||
pub fn GetLength(&self) -> u32 {
|
||||
self.content.len() as u32
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user