pub struct LineRenderPipeline {
pub pipeline: RenderPipeline,
pub camera_buffer: Buffer,
pub camera_bind_group: BindGroup,
pub camera_bind_group_layout: BindGroupLayout,
pub instance_buffer: Option<Buffer>,
pub num_instances: u32,
}Expand description
Pipeline de renderizado GPU para el dibujo acelerado de series temporales por instancias.
Fields§
§pipeline: RenderPipeline§camera_buffer: Buffer§camera_bind_group: BindGroup§camera_bind_group_layout: BindGroupLayout§instance_buffer: Option<Buffer>§num_instances: u32Implementations§
Source§impl LineRenderPipeline
impl LineRenderPipeline
Sourcepub fn new(
device: &Device,
surface_format: TextureFormat,
camera: &ViewportCamera,
) -> Self
pub fn new( device: &Device, surface_format: TextureFormat, camera: &ViewportCamera, ) -> Self
Crea el pipeline de renderizado wgpu utilizando el shader WGSL instanciado.
Sourcepub fn update_camera(&self, queue: &Queue, camera: &ViewportCamera)
pub fn update_camera(&self, queue: &Queue, camera: &ViewportCamera)
Actualiza la matriz de cámara en la GPU sin costo de re-asignación de geometría ($0\text{ ms}$ overhead).
Sourcepub fn upload_instances(
&mut self,
device: &Device,
pairs: &[MinMaxPair],
x_step: f32,
)
pub fn upload_instances( &mut self, device: &Device, pairs: &[MinMaxPair], x_step: f32, )
Carga los datos de las instancias de pares MinMax en el VBO de la GPU.
Sourcepub fn render<'a>(&'a self, render_pass: &mut RenderPass<'a>)
pub fn render<'a>(&'a self, render_pass: &mut RenderPass<'a>)
Ejecuta el pase de renderizado en GPU.
Auto Trait Implementations§
impl !Freeze for LineRenderPipeline
impl !RefUnwindSafe for LineRenderPipeline
impl !UnwindSafe for LineRenderPipeline
impl Send for LineRenderPipeline
impl Sync for LineRenderPipeline
impl Unpin for LineRenderPipeline
impl UnsafeUnpin for LineRenderPipeline
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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