pub struct Renderer {
pub device: Device,
/* private fields */
}Fields
device: DeviceImplementations
sourceimpl Renderer
impl Renderer
pub async fn for_surface(
surface: Surface,
instance: &Instance,
sample_count: u32
) -> Result<Self, Error>
pub async fn offscreen(
adapter: &Adapter,
sample_count: u32
) -> Result<Self, Error>
pub const fn sample_count(&self) -> u32
pub fn configure<PresentMode: Into<PresentMode>>(
&mut self,
size: Size<u32, ScreenSpace>,
mode: PresentMode,
format: TextureFormat
)
pub fn current_frame(&self) -> Result<RenderFrame, SurfaceError>
pub fn texture(
&self,
size: Size<u32, ScreenSpace>,
format: TextureFormat,
usage: TextureUsages,
multisampled: bool
) -> Texture
pub fn framebuffer(
&self,
size: Size<u32, ScreenSpace>,
format: TextureFormat
) -> Framebuffer
pub fn zbuffer(&self, size: Size<u32, ScreenSpace>) -> DepthBuffer
pub fn vertex_buffer<T: Pod>(&self, verts: &[T]) -> VertexBuffer where
T: 'static + Copy,
pub fn uniform_buffer<T>(&self, buf: &[T]) -> UniformBuffer where
T: Pod + 'static + Copy,
pub fn binding_group(
&self,
layout: &BindingGroupLayout,
binds: &[&dyn Bind]
) -> BindingGroup
pub fn sampler(&self, min_filter: FilterMode, mag_filter: FilterMode) -> Sampler
pub fn pipeline<T>(&self, blending: Blending, format: TextureFormat) -> T where
T: AbstractPipeline<'static>,
pub fn read<F>(&mut self, fb: &Framebuffer, f: F) -> Result<(), BufferAsyncError> where
F: 'static + FnOnce(&[Bgra8]),
pub fn update_pipeline<'a, T>(&mut self, pip: &'a T, p: T::PrepareContext) where
T: AbstractPipeline<'a>,
pub fn frame(&mut self) -> Frame
pub fn present(&mut self, frame: Frame)
pub fn submit<T: Copy>(&mut self, commands: &[Op<'_, T>])
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more