pub struct Tree64GpuManager {
pub contree_bind_group: BindGroup,
pub contree_bind_group_layout: BindGroupLayout,
/* private fields */
}
Expand description
Manager for uploading and binding the tree to the GPU.
Fields§
§contree_bind_group: BindGroup
§contree_bind_group_layout: BindGroupLayout
Implementations§
Source§impl Tree64GpuManager
impl Tree64GpuManager
Sourcepub fn new(device: &Device, contree: &Sparse64Tree) -> Self
pub fn new(device: &Device, contree: &Sparse64Tree) -> Self
Creates a new GPU manager by flattening the tree and uploading it to a buffer.
Sourcepub fn collect_nodes(tree: &Sparse64Tree, device: &Device) -> Buffer
pub fn collect_nodes(tree: &Sparse64Tree, device: &Device) -> Buffer
Flattens the tree and creates a GPU buffer for it.
Sourcepub fn upload_tree(&mut self, queue: &Queue, tree: &Sparse64Tree)
pub fn upload_tree(&mut self, queue: &Queue, tree: &Sparse64Tree)
Reuploads an updated tree to the GPU.
Sourcepub fn get_buffer(&self) -> &Buffer
pub fn get_buffer(&self) -> &Buffer
Returns a reference to the underlying node buffer.
Auto Trait Implementations§
impl Freeze for Tree64GpuManager
impl !RefUnwindSafe for Tree64GpuManager
impl Send for Tree64GpuManager
impl Sync for Tree64GpuManager
impl Unpin for Tree64GpuManager
impl !UnwindSafe for Tree64GpuManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more