diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:24 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:24 +0100 |
commit | f84ec1a3e077fa0f2e9cd310b6e32e81f1bc1129 (patch) | |
tree | e6d49bbbacc9e87e97093729a9387fe779083a76 /stockton-skeleton/src/buffers/image.rs | |
parent | 982c053f3946b53e1d763df71e4ffcb81362e8d3 (diff) |
chore(all): docs fixes
Diffstat (limited to 'stockton-skeleton/src/buffers/image.rs')
-rw-r--r-- | stockton-skeleton/src/buffers/image.rs | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/stockton-skeleton/src/buffers/image.rs b/stockton-skeleton/src/buffers/image.rs index 820561f..85587a8 100644 --- a/stockton-skeleton/src/buffers/image.rs +++ b/stockton-skeleton/src/buffers/image.rs @@ -2,20 +2,22 @@ //! This is useful for most types of images. //! ```rust //! # use anyhow::Result; -//! # use crate::{mem::DrawAttachments, context::RenderingContext}; -//! fn create_depth_buffer( -//! context: &mut RenderingContext, -//! ) -> Result<BoundImageView<DrawAttachments>> { -//! BoundImageView::from_context( -//! context, -//! &ImageSpec { -//! width: 10, -//! height: 10, -//! format: Format::D32Sfloat, -//! usage: Usage::DEPTH_STENCIL_ATTACHMENT, -//! }, -//! ) -//! } +//! # use stockton_skeleton::{mem::DepthBufferPool, context::RenderingContext, buffers::image::{BoundImageView, ImageSpec}}; +//! # use gfx_hal::{format::Format, image::Usage}; +//! # fn create_depth_buffer( +//! # context: &mut RenderingContext, +//! # ) -> Result<BoundImageView<DepthBufferPool>> { +//! BoundImageView::from_context( +//! context, +//! &ImageSpec { +//! width: 10, +//! height: 10, +//! format: Format::D32Sfloat, +//! usage: Usage::DEPTH_STENCIL_ATTACHMENT, +//! resources: stockton_skeleton::buffers::image::COLOR_RESOURCES +//! }, +//! ) +//! # } /// ``` use std::mem::ManuallyDrop; |