diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:21 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:21 +0100 |
commit | 9d720593e9f4829e2bb81534ef54545a61b3df00 (patch) | |
tree | 4f3a90fc71132b671bf097388ccd8f17f0c3517e /stockton-render/src/draw/target.rs | |
parent | bbcd377cda8a3d99cee8f2f79d58575e00d0aeb8 (diff) |
refactor(render): give some functions less arguments
Diffstat (limited to 'stockton-render/src/draw/target.rs')
-rw-r--r-- | stockton-render/src/draw/target.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/stockton-render/src/draw/target.rs b/stockton-render/src/draw/target.rs index 5e0ade0..1260c49 100644 --- a/stockton-render/src/draw/target.rs +++ b/stockton-render/src/draw/target.rs @@ -20,6 +20,8 @@ use crate::types::*; use core::{iter::once, mem::ManuallyDrop}; use arrayvec::ArrayVec; +use draw::buffer::ModifiableBuffer; +use draw::draw_buffers::DrawBuffers; use hal::{ format::{ChannelType, Format, Swizzle}, image::{Extent, Usage as ImgUsage, ViewKind}, @@ -258,8 +260,7 @@ impl TargetChain { pub fn prep_next_target<'a>( &'a mut self, device: &mut Device, - vert_buffer: &Buffer, - index_buffer: &Buffer, + draw_buffers: &mut DrawBuffers, renderpass: &RenderPass, pipeline: &GraphicsPipeline, pipeline_layout: &PipelineLayout, @@ -313,10 +314,11 @@ impl TargetChain { // Get references to our buffers let (vbufs, ibuf) = { - let vbufref: &<back::Backend as hal::Backend>::Buffer = vert_buffer; + let vbufref: &<back::Backend as hal::Backend>::Buffer = + draw_buffers.vertex_buffer.get_buffer(); let vbufs: ArrayVec<[_; 1]> = [(vbufref, SubRange::WHOLE)].into(); - let ibuf = index_buffer; + let ibuf = draw_buffers.index_buffer.get_buffer(); (vbufs, ibuf) }; |