Struct wgpu_hal::gles::Adapter

source ·
pub struct Adapter {
    shared: Arc<AdapterShared>,
}

Fields§

§shared: Arc<AdapterShared>

Implementations§

source§

impl Adapter

source

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

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

source§

impl Adapter

source

fn parse_version(src: &str) -> Result<(u8, u8), InstanceError>

Note that this function is intentionally lenient in regards to parsing, and will try to recover at least the first two version numbers without resulting in an Err.

§Notes

WebGL 2 version returned as OpenGL ES 3.0

source

pub(super) fn parse_full_version(src: &str) -> Result<(u8, u8), InstanceError>

According to the OpenGL specification, the version information is expected to follow the following syntax:

<major>       ::= <number>
<minor>       ::= <number>
<revision>    ::= <number>
<vendor-info> ::= <string>
<release>     ::= <major> "." <minor> ["." <release>]
<version>     ::= <release> [" " <vendor-info>]

Note that this function is intentionally lenient in regards to parsing, and will try to recover at least the first two version numbers without resulting in an Err.

source

fn make_info( vendor_orig: String, renderer_orig: String, version: String, ) -> AdapterInfo

source

pub(super) unsafe fn expose( context: AdapterContext, ) -> Option<ExposedAdapter<Api>>

source

unsafe fn compile_shader( source: &str, gl: &Context, shader_type: u32, es: bool, ) -> Option<Shader>

source

unsafe fn create_shader_clear_program( gl: &Context, es: bool, ) -> Option<ShaderClearProgram>

Trait Implementations§

source§

impl Adapter for Adapter

source§

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

source§

impl Sync for Adapter

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
source§

impl<T> Downcast<T> for T

source§

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>,

source§

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>,

source§

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.
source§

impl<T> Upcast<T> for T

source§

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

source§

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

source§

impl<T> WasmNotSendSync for T

source§

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