pub struct PerVertexPipeline {
device: Device,
queue: Queue,
uniform_buffer: Buffer,
bind_group_layout: BindGroupLayout,
bind_group: Option<BindGroup>,
render_pipeline: Option<RenderPipeline>,
vertex_buffer: Buffer,
index_buffer: Buffer,
num_indices: u32,
}Expand description
Per-vertex shader execution pipeline
Fields§
§device: Device§queue: Queue§uniform_buffer: BufferUniform buffer for vertex variables
bind_group_layout: BindGroupLayoutBind group layout
bind_group: Option<BindGroup>Bind group
render_pipeline: Option<RenderPipeline>Render pipeline
vertex_buffer: BufferVertex buffer
index_buffer: BufferIndex buffer
num_indices: u32Number of indices
Implementations§
Source§impl PerVertexPipeline
impl PerVertexPipeline
Sourcepub fn new(device: Device, queue: Queue, vertex_count: u32) -> Result<Self>
pub fn new(device: Device, queue: Queue, vertex_count: u32) -> Result<Self>
Create a new per-vertex pipeline
Sourcefn create_waveform_indices(count: u32) -> Vec<u16>
fn create_waveform_indices(count: u32) -> Vec<u16>
Create waveform indices (line strip)
Sourcepub fn set_shader(&mut self, shader_module: &ShaderModule) -> Result<()>
pub fn set_shader(&mut self, shader_module: &ShaderModule) -> Result<()>
Set the shader for this pipeline
Sourcepub fn update_vars(&mut self, vars: VertexVarsUniform)
pub fn update_vars(&mut self, vars: VertexVarsUniform)
Update vertex variables
Auto Trait Implementations§
impl Freeze for PerVertexPipeline
impl !RefUnwindSafe for PerVertexPipeline
impl Send for PerVertexPipeline
impl Sync for PerVertexPipeline
impl Unpin for PerVertexPipeline
impl !UnwindSafe for PerVertexPipeline
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