diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:22 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:22 +0100 |
commit | b688a25810840c5ebf4bf2c18bbdae52c62f6b4d (patch) | |
tree | 923c81d1be62d1344694306d5fb8728841620b6f /stockton-render/src/draw/draw_buffers.rs | |
parent | bf9573764c695e65b1504419fafb76ccabb0322b (diff) |
feat(render): WIP eGUI integration
Diffstat (limited to 'stockton-render/src/draw/draw_buffers.rs')
-rw-r--r-- | stockton-render/src/draw/draw_buffers.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stockton-render/src/draw/draw_buffers.rs b/stockton-render/src/draw/draw_buffers.rs index a6e0996..837356a 100644 --- a/stockton-render/src/draw/draw_buffers.rs +++ b/stockton-render/src/draw/draw_buffers.rs @@ -31,13 +31,13 @@ pub const INITIAL_VERT_SIZE: u64 = 3 * 3000; pub const INITIAL_INDEX_SIZE: u64 = 3000; /// The buffers used for drawing, ie index and vertex buffer -pub struct DrawBuffers<'a> { - pub vertex_buffer: ManuallyDrop<StagedBuffer<'a, UVPoint>>, +pub struct DrawBuffers<'a, T: Sized> { + pub vertex_buffer: ManuallyDrop<StagedBuffer<'a, T>>, pub index_buffer: ManuallyDrop<StagedBuffer<'a, (u16, u16, u16)>>, } -impl<'a> DrawBuffers<'a> { - pub fn new(device: &mut Device, adapter: &Adapter) -> Result<DrawBuffers<'a>, CreationError> { +impl<'a, T> DrawBuffers<'a, T> { + pub fn new(device: &mut Device, adapter: &Adapter) -> Result<DrawBuffers<'a, T>, CreationError> { let vert = StagedBuffer::new(device, &adapter, Usage::VERTEX, INITIAL_VERT_SIZE)?; let index = StagedBuffer::new(device, &adapter, Usage::INDEX, INITIAL_INDEX_SIZE)?; |