pub struct OpenGLDevice { /* private fields */ }Expand description
OpenGL device implementation. Without a live GL context this delegates
entirely to SoftwareDevice.
Implementations§
Source§impl OpenGLDevice
impl OpenGLDevice
Trait Implementations§
Source§impl Default for OpenGLDevice
impl Default for OpenGLDevice
Source§impl GpuDevice for OpenGLDevice
impl GpuDevice for OpenGLDevice
fn create_buffer(&mut self, size: usize, usage: BufferUsage) -> BufferHandle
fn create_texture(&mut self, w: u32, h: u32, f: TextureFormat) -> TextureHandle
fn create_shader(&mut self, s: &str, st: ShaderStage) -> ShaderHandle
fn create_pipeline(&mut self, d: &RenderPipelineDesc) -> PipelineHandle
fn create_compute_pipeline( &mut self, d: &ComputePipelineDesc, ) -> ComputePipelineHandle
fn write_buffer(&mut self, b: BufferHandle, o: usize, d: &[u8])
fn read_buffer(&self, b: BufferHandle) -> Vec<u8> ⓘ
fn write_texture(&mut self, t: TextureHandle, d: &[u8])
fn begin_render_pass(&mut self, c: &[TextureHandle], d: Option<TextureHandle>)
fn end_render_pass(&mut self)
fn begin_compute_pass(&mut self)
fn end_compute_pass(&mut self)
fn set_pipeline(&mut self, p: PipelineHandle)
fn set_vertex_buffer(&mut self, s: u32, b: BufferHandle)
fn set_index_buffer(&mut self, b: BufferHandle)
fn set_bind_group(&mut self, i: u32, g: &BindGroup)
fn draw(&mut self, v: u32, i: u32)
fn draw_indexed(&mut self, i: u32, inst: u32)
fn draw_indirect(&mut self, b: BufferHandle, o: u64)
fn set_compute_pipeline(&mut self, p: ComputePipelineHandle)
fn dispatch_workgroups(&mut self, x: u32, y: u32, z: u32)
fn dispatch_indirect(&mut self, b: BufferHandle, o: u64)
fn destroy_buffer(&mut self, b: BufferHandle)
fn destroy_texture(&mut self, t: TextureHandle)
fn name(&self) -> &str
Auto Trait Implementations§
impl Freeze for OpenGLDevice
impl RefUnwindSafe for OpenGLDevice
impl Send for OpenGLDevice
impl Sync for OpenGLDevice
impl Unpin for OpenGLDevice
impl UnsafeUnpin for OpenGLDevice
impl UnwindSafe for OpenGLDevice
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.