pub struct DrawShader<'a> { /* private fields */ }Expand description
A vertex and a pixel program linked for drawing.
Implementations§
Source§impl<'a> DrawShader<'a>
impl<'a> DrawShader<'a>
Sourcepub fn new(
vertex: &'a ProgramShader,
pixel: &'a ProgramShader,
) -> Result<Self, Error>
pub fn new( vertex: &'a ProgramShader, pixel: &'a ProgramShader, ) -> Result<Self, Error>
Link vertex’s outputs to pixel’s inputs by semantic.
Sourcepub fn draw_indexed(
&self,
vertices: &[Vec<[u32; 4]>],
indices: &[u32],
vertex_buffers: &[(u32, &[[u32; 4]])],
pixel_buffers: &[(u32, &[[u32; 4]])],
sampler: &mut dyn Sampler,
state: &Rasterizer,
surface: &mut Surface,
) -> Result<DrawStats, Error>
pub fn draw_indexed( &self, vertices: &[Vec<[u32; 4]>], indices: &[u32], vertex_buffers: &[(u32, &[[u32; 4]])], pixel_buffers: &[(u32, &[[u32; 4]])], sampler: &mut dyn Sampler, state: &Rasterizer, surface: &mut Surface, ) -> Result<DrawStats, Error>
Draw indices (a triangle list) of vertices (each the vertex program’s input registers) into surface.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DrawShader<'a>
impl<'a> RefUnwindSafe for DrawShader<'a>
impl<'a> Send for DrawShader<'a>
impl<'a> Sync for DrawShader<'a>
impl<'a> Unpin for DrawShader<'a>
impl<'a> UnsafeUnpin for DrawShader<'a>
impl<'a> UnwindSafe for DrawShader<'a>
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