diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
commit | fb996488aa651cb2e7f46abc083c4318b47e77cd (patch) | |
tree | d1513d479b6069abca290e271f439cd1ef553383 /stockton-render/src/draw/draw_passes/mod.rs | |
parent | a82e16c92a026b2fbe3a40a21d7e690242e32ba6 (diff) |
wip refactor(render): more work on draw passes
Diffstat (limited to 'stockton-render/src/draw/draw_passes/mod.rs')
-rw-r--r-- | stockton-render/src/draw/draw_passes/mod.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/stockton-render/src/draw/draw_passes/mod.rs b/stockton-render/src/draw/draw_passes/mod.rs index 76dd8d6..566a64b 100644 --- a/stockton-render/src/draw/draw_passes/mod.rs +++ b/stockton-render/src/draw/draw_passes/mod.rs @@ -1,26 +1,23 @@ //! Traits and common draw passes. +use super::{queue_negotiator::QueueNegotiator, target::SwapchainProperties}; +use crate::types::*; +use stockton_types::Session; -mod cons; -mod level; use std::sync::{Arc, RwLock}; -pub use level::LevelDrawPass; - -use super::{queue_negotiator::QueueNegotiator, target::SwapchainProperties}; -use crate::types::*; use anyhow::Result; -/// Type can be used as input to a draw pass. This requires it being available from only the resources at draw time. -pub trait DrawPassInput {} +mod cons; +mod level; + +pub use level::LevelDrawPass; +pub use cons::{ConsDrawPass, NilDrawPass}; /// One of several 'passes' that draw on each frame. pub trait DrawPass { - /// Extra input required for this draw pass. - type Input: DrawPassInput; - /// Queue any necessary draw commands to cmd_buffer /// This should assume the command buffer isn't in the middle of a renderpass, and should leave it as such. - fn queue_draw(&self, input: &Self::Input, cmd_buffer: &mut CommandBufferT) -> Result<()>; + fn queue_draw(&self, session: &Session, cmd_buffer: &mut CommandBufferT) -> Result<()>; /// This function should ask the queue negotatior to find families for any auxilary operations this draw pass needs to perform /// For example, .find(&TexLoadQueue) |