pub struct Gpu;Implementations§
Source§impl Gpu
impl Gpu
pub fn request_redraw(&self) -> Result<(), String>
pub fn begin_frame(&self) -> Result<(), String>
pub fn get_surface_format(&self) -> Result<TextureFormat, String>
pub fn get_surface_size(&self) -> Result<(u32, u32), String>
pub fn get_current_surface_texture(&self) -> Result<u32, String>
pub fn present(&self) -> Result<(), String>
pub fn create_buffer( &self, size: u64, usage: BufferUsage, mapped_at_creation: bool, ) -> Result<u32, String>
pub fn write_buffer( &self, buffer: u32, offset: u64, data: Vec<u8>, ) -> Result<(), String>
pub fn write_texture(&self, desc: WriteTexture) -> Result<(), String>
pub fn destroy_buffer(&self, id: u32) -> Result<(), String>
pub fn create_texture(&self, desc: CreateTexture) -> Result<u32, String>
pub fn create_texture_view( &self, desc: CreateTextureView, ) -> Result<u32, String>
pub fn destroy_texture(&self, id: u32) -> Result<(), String>
pub fn destroy_texture_view(&self, id: u32) -> Result<(), String>
pub fn create_shader_module(&self, wgsl_source: String) -> Result<u32, String>
pub fn destroy_shader_module(&self, id: u32) -> Result<(), String>
pub fn create_bind_group_layout( &self, desc: CreateBindGroupLayout, ) -> Result<u32, String>
pub fn destroy_bind_group_layout(&self, id: u32) -> Result<(), String>
pub fn create_bind_group(&self, desc: CreateBindGroup) -> Result<u32, String>
pub fn destroy_bind_group(&self, id: u32) -> Result<(), String>
pub fn create_pipeline_layout( &self, desc: CreatePipelineLayout, ) -> Result<u32, String>
pub fn destroy_pipeline_layout(&self, id: u32) -> Result<(), String>
pub fn create_render_pipeline( &self, desc: CreateRenderPipeline, ) -> Result<u32, String>
pub fn destroy_render_pipeline(&self, id: u32) -> Result<(), String>
pub fn create_compute_pipeline( &self, desc: CreateComputePipeline, ) -> Result<u32, String>
pub fn destroy_compute_pipeline(&self, id: u32) -> Result<(), String>
pub fn create_command_encoder(&self) -> Result<u32, String>
pub fn submit(&self, encoder: u32) -> Result<(), String>
pub fn begin_render_pass(&self, desc: BeginRenderPass) -> Result<u32, String>
pub fn end_render_pass(&self, pass: u32) -> Result<(), String>
pub fn set_render_pipeline( &self, pass: u32, pipeline: u32, ) -> Result<(), String>
pub fn set_bind_group( &self, pass: u32, index: u32, bind_group: u32, ) -> Result<(), String>
pub fn set_vertex_buffer( &self, pass: u32, buffer: u32, offset: u64, slot: u32, size: Option<u64>, ) -> Result<(), String>
pub fn set_index_buffer( &self, pass: u32, buffer: u32, offset: u64, format: IndexFormat, size: Option<u64>, ) -> Result<(), String>
pub fn draw( &self, pass: u32, vertices: u32, instances: u32, ) -> Result<(), String>
pub fn draw_indexed( &self, pass: u32, indices: u32, instances: u32, ) -> Result<(), String>
pub fn begin_compute_pass(&self, encoder: u32) -> Result<(), String>
pub fn end_compute_pass(&self, pass: u32) -> Result<(), String>
pub fn set_compute_pipeline( &self, pass: u32, pipeline: u32, ) -> Result<(), String>
pub fn dispatch(&self, pass: u32, x: u32, y: u32, z: u32) -> Result<(), String>
pub fn copy_buffer_to_buffer( &self, cmd: CopyBufferToBuffer, ) -> Result<(), String>
pub fn copy_buffer_to_texture( &self, cmd: CopyBufferToTexture, ) -> Result<(), String>
pub fn copy_texture_to_buffer( &self, cmd: CopyTextureToBuffer, ) -> Result<(), String>
Auto Trait Implementations§
impl Freeze for Gpu
impl RefUnwindSafe for Gpu
impl Send for Gpu
impl Sync for Gpu
impl Unpin for Gpu
impl UnsafeUnpin for Gpu
impl UnwindSafe for Gpu
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