From f84ec1a3e077fa0f2e9cd310b6e32e81f1bc1129 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:24 +0100 Subject: chore(all): docs fixes --- stockton-skeleton/src/buffers/image.rs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'stockton-skeleton/src/buffers') 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::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::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; -- cgit v1.2.3