Struct wgpu_hal::gles::Adapter

source ·
pub struct Adapter { /* private fields */ }
Available on gles only.

Implementations§

source§

impl Adapter

source

pub unsafe fn new_external( fun: impl FnMut(&str) -> *const c_void ) -> Option<ExposedAdapter<Api>>

Available on neither Windows nor webgl.

Creates a new external adapter using the specified loader function.

Safety
  • The underlying OpenGL ES context must be current.
  • The underlying OpenGL ES context must be current when interfacing with any objects returned by wgpu-hal from this adapter.
  • The underlying OpenGL ES context must be current when dropping this adapter and when dropping any objects returned from this adapter.
source

pub fn adapter_context(&self) -> &AdapterContext

Available on neither Windows nor webgl.

Trait Implementations§

source§

impl Adapter for Adapter

§

type A = Api

source§

unsafe fn open( &self, features: Features, _limits: &Limits, _memory_hints: &MemoryHints ) -> Result<OpenDevice<Api>, DeviceError>

source§

unsafe fn texture_format_capabilities( &self, format: TextureFormat ) -> TextureFormatCapabilities

Return the set of supported capabilities for a texture format.
source§

unsafe fn surface_capabilities( &self, surface: &Surface ) -> Option<SurfaceCapabilities>

Returns the capabilities of working with a specified surface. Read more
source§

unsafe fn get_presentation_timestamp(&self) -> PresentationTimestamp

Creates a PresentationTimestamp using the adapter’s WSI.
source§

impl DynResource for Adapter

source§

fn as_any(&self) -> &dyn Any

source§

fn as_any_mut(&mut self) -> &mut dyn Any

source§

impl Send for Adapter

Available on send_sync only.
source§

impl Sync for Adapter

Available on send_sync only.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

source§

impl<A> DynAdapter for A
where A: Adapter + DynResource,

source§

unsafe fn open( &self, features: Features, limits: &Limits, memory_hints: &MemoryHints ) -> Result<DynOpenDevice, DeviceError>

source§

unsafe fn texture_format_capabilities( &self, format: TextureFormat ) -> TextureFormatCapabilities

source§

unsafe fn surface_capabilities( &self, surface: &(dyn DynSurface + 'static) ) -> Option<SurfaceCapabilities>

source§

unsafe fn get_presentation_timestamp(&self) -> PresentationTimestamp

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,