File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111- Renderer is now generic over the ` Allocator ` trait.
1212- Remove ` dynamic-rendering ` feature.
1313- Functions that used to take ` vk::RenderPass ` or ` DynamicRendering ` now take ` RenderMode ` instead.
14+ - ` Renderer::with_default_allocator ` is now ` Renderer::with_simple_allocator ` .
1415
1516## 0.11.0
1617
Original file line number Diff line number Diff line change 9494//! You can find a example using egui managed and user managed textures [here](./examples/textures.rs).
9595//!
9696//! ## Allocators
97- //!
97+ //!
9898//! GPU memory allocations are made using allocators. An allocator in any type that implements [`allocator::Allocator`]. You can use one of
9999//! the provided allocators or implement your own.
100- //!
100+ //!
101101//! ### Simple allocator
102- //!
103- //! Simple allocator using [vkAllocatorMemory][vk-allocate-memory] for each allocation. Created with [`Renderer::with_default_allocator `].
102+ //!
103+ //! Simple allocator using [vkAllocatorMemory][vk-allocate-memory] for each allocation. Created with [`Renderer::with_simple_allocator `].
104104//! Requires the `simple-allocator` feature.
105- //!
105+ //!
106106//! ### GPU Allocator
107- //!
107+ //!
108108//! Uses [gpu-allocator][gpu-allocator] to handle gpu memory. Created with [`Renderer::with_gpu_allocator`] which takes
109109//! a `Arc<Mutex<gpu_allocator::vulkan::Allocator>>`. Requires the `gpu-allocator` feature.
110- //!
110+ //!
111111//! ### VkMem Allocator
112- //!
112+ //!
113113//! Uses [vk-mem-rs][vk-mem-rs] to handle gpu memory. Created with [`Renderer::with_vk_mem_allocator`] which takes
114114//! a `Arc<vk_mem::Allocator>`. Requires the `vk-mem` feature.
115- //!
115+ //!
116116//! ### Custom allocator
117- //!
117+ //!
118118//! You can pass your own allocator using [`Renderer::with_custom_allocator`]. Requires the `custom-allocator` feature.
119- //!
119+ //!
120120//! Here is [an example of custom delegating allocator](./examples/common/renderer.rs).
121121//!
122122//! ## Render mode
123123//!
124124//! The renderer supports rendering with a render pass or using dynamic rendering. It is done by passing `RenderMode` when creating the renderer.
125125//!
126126//! ## Features
127- //!
127+ //!
128128//! - **simple-allocator** : Allow simple allocator usage.
129129//! - **gpu-allocator** : Allow [gpu-allocator][gpu-allocator] allocator usage.
130130//! - **vk-mem** : Allow [vk-mem-rs][vk-mem-rs] allocator usage.
135135//! You can find an example of integration with [winit][winit] in the [common module](examples/common/mod.rs) of the examples.
136136//!
137137//! ```rust
138- //! // Example with default allocator
139- //! let renderer : Renderer<SimpleAllocator> = Renderer::with_default_allocator (
138+ //! // Example with simple allocator
139+ //! let renderer : Renderer<SimpleAllocator> = Renderer::with_simple_allocator (
140140//! &vk_instance,
141141//! vk_physical_device,
142142//! vk_device.clone(),
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ pub struct Renderer<A: Allocator> {
8888
8989#[ cfg( feature = "simple-allocator" ) ]
9090impl Renderer < allocator:: SimpleAllocator > {
91- /// Create a renderer using the default allocator.
91+ /// Create a renderer using the simple allocator.
9292 ///
9393 /// At initialization all Vulkan resources are initialized. Vertex and index buffers are not created yet.
9494 ///
@@ -104,7 +104,7 @@ impl Renderer<allocator::SimpleAllocator> {
104104 ///
105105 /// * [`RendererError`] - If the number of in flight frame in incorrect.
106106 /// * [`RendererError`] - If any Vulkan or io error is encountered during initialization.
107- pub fn with_default_allocator (
107+ pub fn with_simple_allocator (
108108 instance : & ash:: Instance ,
109109 physical_device : vk:: PhysicalDevice ,
110110 device : Device ,
You can’t perform that action at this time.
0 commit comments