pub struct Renderer { /* private fields */ }Expand description
Service providing an interface to WGPU and WINIT
Implementations§
Source§impl Renderer
impl Renderer
Sourcepub fn load_vertex_buffer<'a>(
&self,
buffer: &mut VertexBuffer,
attributes: &'a [u8],
indices: Option<&'a [u8]>,
count: usize,
)
pub fn load_vertex_buffer<'a>( &self, buffer: &mut VertexBuffer, attributes: &'a [u8], indices: Option<&'a [u8]>, count: usize, )
Laods the vertex buffer to GPU
Sourcepub fn load_texture_buffer<'a>(
&self,
buffer: &mut TextureBuffer,
width: u32,
height: u32,
layers: &'a [&'a [u8]],
)
pub fn load_texture_buffer<'a>( &self, buffer: &mut TextureBuffer, width: u32, height: u32, layers: &'a [&'a [u8]], )
Loads the texture buffer to GPU
Sourcepub fn load_uniform_buffer<'a>(
&self,
buffer: &mut UniformBuffer,
data: &'a [u8],
)
pub fn load_uniform_buffer<'a>( &self, buffer: &mut UniformBuffer, data: &'a [u8], )
Loads the uniform buffer to GPU
Sourcepub fn load_sampler(&self, sampler: &mut Sampler)
pub fn load_sampler(&self, sampler: &mut Sampler)
Loads the sampler to GPU
Sourcepub fn load_shader_module(
&self,
shader_module: &mut ShaderModule,
name: &str,
code: &str,
)
pub fn load_shader_module( &self, shader_module: &mut ShaderModule, name: &str, code: &str, )
Loads the sahder module to GPU
Sourcepub fn bind(&mut self, pipeline: &mut Pipeline, layout: PipelineLayout<'_>)
pub fn bind(&mut self, pipeline: &mut Pipeline, layout: PipelineLayout<'_>)
Binds uniforms and other data to the pipeline
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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