diff options
Diffstat (limited to 'stockton-render/src/draw/target.rs')
-rw-r--r-- | stockton-render/src/draw/target.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/stockton-render/src/draw/target.rs b/stockton-render/src/draw/target.rs index de803aa..3861192 100644 --- a/stockton-render/src/draw/target.rs +++ b/stockton-render/src/draw/target.rs @@ -9,13 +9,16 @@ use std::{ use hal::{ command::CommandBufferFlags, format::{Aspects, ChannelType, Format, ImageFeature}, - image::{Access, Extent, Layout, SubresourceRange, Usage as ImgUsage}, + image::{ + Access, Extent, FramebufferAttachment, Layout, SubresourceRange, Usage as ImgUsage, + ViewCapabilities, + }, memory::{Barrier, Dependencies}, pso::{PipelineStage, Viewport}, window::{CompositeAlphaMode, Extent2D, PresentMode, SwapchainConfig}, }; -use super::{draw_passes::DrawPass}; +use super::draw_passes::DrawPass; use crate::{error::EnvironmentError, types::*}; use anyhow::{Context, Result}; use stockton_types::Session; @@ -107,6 +110,14 @@ impl SwapchainProperties { }, }) } + + pub fn framebuffer_attachment(&self) -> FramebufferAttachment { + FramebufferAttachment { + usage: ImgUsage::COLOR_ATTACHMENT, + format: self.format, + view_caps: ViewCapabilities::empty(), + } + } } pub struct TargetChain { |