pub struct Renderer<G: GaussianPod, B = BindGroup> { /* private fields */ }Expand description
A renderer for Gaussians.
Implementations§
Source§impl<G: GaussianPod, B> Renderer<G, B>
impl<G: GaussianPod, B> Renderer<G, B>
Sourcepub fn create_bind_group(
&self,
device: &Device,
camera: &CameraBuffer,
model_transform: &ModelTransformBuffer,
gaussian_transform: &GaussianTransformBuffer,
gaussians: &GaussiansBuffer<G>,
indirect_indices: &IndirectIndicesBuffer,
) -> BindGroup
pub fn create_bind_group( &self, device: &Device, camera: &CameraBuffer, model_transform: &ModelTransformBuffer, gaussian_transform: &GaussianTransformBuffer, gaussians: &GaussiansBuffer<G>, indirect_indices: &IndirectIndicesBuffer, ) -> BindGroup
Create the bind group.
Source§impl<G: GaussianPod> Renderer<G>
impl<G: GaussianPod> Renderer<G>
Sourcepub const BIND_GROUP_LAYOUT_DESCRIPTOR: BindGroupLayoutDescriptor<'static>
pub const BIND_GROUP_LAYOUT_DESCRIPTOR: BindGroupLayoutDescriptor<'static>
The bind group layout descriptor.
Sourcepub fn new(
device: &Device,
texture_format: TextureFormat,
depth_stencil: Option<DepthStencilState>,
camera: &CameraBuffer,
model_transform: &ModelTransformBuffer,
gaussian_transform: &GaussianTransformBuffer,
gaussians: &GaussiansBuffer<G>,
indirect_indices: &IndirectIndicesBuffer,
) -> Result<Self, RendererCreateError>
pub fn new( device: &Device, texture_format: TextureFormat, depth_stencil: Option<DepthStencilState>, camera: &CameraBuffer, model_transform: &ModelTransformBuffer, gaussian_transform: &GaussianTransformBuffer, gaussians: &GaussiansBuffer<G>, indirect_indices: &IndirectIndicesBuffer, ) -> Result<Self, RendererCreateError>
Create a new renderer.
Sourcepub fn render(
&self,
encoder: &mut CommandEncoder,
view: &TextureView,
indirect_args: &IndirectArgsBuffer,
)
pub fn render( &self, encoder: &mut CommandEncoder, view: &TextureView, indirect_args: &IndirectArgsBuffer, )
Render the scene.
Sourcepub fn render_with_pass(
&self,
pass: &mut RenderPass<'_>,
indirect_args: &IndirectArgsBuffer,
)
pub fn render_with_pass( &self, pass: &mut RenderPass<'_>, indirect_args: &IndirectArgsBuffer, )
Render the scene with a wgpu::RenderPass.
Source§impl<G: GaussianPod> Renderer<G, ()>
impl<G: GaussianPod> Renderer<G, ()>
Sourcepub fn new_without_bind_group(
device: &Device,
texture_format: TextureFormat,
depth_stencil: Option<DepthStencilState>,
) -> Result<Self, RendererCreateError>
pub fn new_without_bind_group( device: &Device, texture_format: TextureFormat, depth_stencil: Option<DepthStencilState>, ) -> Result<Self, RendererCreateError>
Create a new renderer without internally managed bind group.
To create a bind group with layout matched to this renderer, use the
Renderer::create_bind_group method.
Sourcepub fn render(
&self,
encoder: &mut CommandEncoder,
view: &TextureView,
bind_group: &BindGroup,
indirect_args: &IndirectArgsBuffer,
)
pub fn render( &self, encoder: &mut CommandEncoder, view: &TextureView, bind_group: &BindGroup, indirect_args: &IndirectArgsBuffer, )
Render the scene.
Sourcepub fn render_with_pass(
&self,
pass: &mut RenderPass<'_>,
bind_group: &BindGroup,
indirect_args: &IndirectArgsBuffer,
)
pub fn render_with_pass( &self, pass: &mut RenderPass<'_>, bind_group: &BindGroup, indirect_args: &IndirectArgsBuffer, )
Render the scene with a wgpu::RenderPass.
Trait Implementations§
Auto Trait Implementations§
impl<G, B> Freeze for Renderer<G, B>where
B: Freeze,
impl<G, B = BindGroup> !RefUnwindSafe for Renderer<G, B>
impl<G, B> Send for Renderer<G, B>where
B: Send,
impl<G, B> Sync for Renderer<G, B>where
B: Sync,
impl<G, B> Unpin for Renderer<G, B>
impl<G, B> UnsafeUnpin for Renderer<G, B>where
B: UnsafeUnpin,
impl<G, B = BindGroup> !UnwindSafe for Renderer<G, B>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more