pub struct Gpu {
pub adapter: Adapter,
pub device: Device,
pub queue: Queue,
pub info: AdapterInfo,
}Fields§
§adapter: Adapter§device: Device§queue: Queue§info: AdapterInfoImplementations§
Source§impl Gpu
impl Gpu
pub async fn headless() -> Result<Self, String>
pub async fn headless_with(limits: Limits) -> Result<Self, String>
pub async fn headless_checked() -> Result<Self, GpuRefusal>
pub async fn window(window: Arc<Window>) -> Result<(Self, WindowTarget), String>
pub async fn window_with( window: Arc<Window>, limits: Limits, ) -> Result<(Self, WindowTarget), String>
pub async fn window_checked( window: Arc<Window>, ) -> Result<(Self, WindowTarget), GpuRefusal>
pub async fn window_present( window: Arc<Window>, present: PresentPreference, ) -> Result<(Self, WindowTarget), String>
pub fn check_floor(&self) -> Result<(), GpuRefusal>
pub fn check(&self, floor: &Floor) -> Result<(), GpuRefusal>
pub fn profiling(&self) -> bool
pub fn offscreen( &self, width: u32, height: u32, format: TextureFormat, ) -> Result<OffscreenTarget, String>
pub fn upload_rgba8( &self, target: &OffscreenTarget, pixels: &[u8], ) -> Result<(), String>
pub fn upload_rgba16( &self, target: &OffscreenTarget, pixels: &[u16], ) -> Result<(), String>
pub fn readback_bytes( &self, target: &OffscreenTarget, ) -> Result<Vec<u8>, String>
pub fn readback_rgba8( &self, target: &OffscreenTarget, ) -> Result<Vec<u8>, String>
pub fn readback_rgba16( &self, target: &OffscreenTarget, ) -> Result<Vec<u16>, String>
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.