pub struct DeviceCapabilities {
base_vertex: bool,
}Expand description
The downlevel capabilities a frame is recorded against.
See the module documentation for why this is captured rather than read from the device.
Fields§
§base_vertex: boolWhether an indexed draw may offset its indices by a non-zero
base_vertex.
Implementations§
Source§impl DeviceCapabilities
impl DeviceCapabilities
Sourcepub const WEBGPU: Self
pub const WEBGPU: Self
Everything the WebGPU baseline requires.
What a device assumed rather than asked about gets: the built-in pipeline then takes its fastest path, which is the only path a full-featured device needs.
Sourcepub const WEBGL2: Self
pub const WEBGL2: Self
What a WebGL2 device has.
WebGL2 is GLES 3.0, and base_vertex needs GLES 3.2, so an indexed draw
there must keep base_vertex at zero.
Sourcepub fn from_adapter(adapter: &Adapter) -> Self
pub fn from_adapter(adapter: &Adapter) -> Self
Read the capabilities of adapter.
Sourcepub fn base_vertex(&self) -> bool
pub fn base_vertex(&self) -> bool
Whether an indexed draw may offset its indices by a non-zero
base_vertex.
Where this is missing, a mesh cannot name its vertices through the
draw’s base_vertex — the backend would have to call a GL entry point
that does not exist — so its indices are offset at upload instead. The
mesh source is what decides which of the two a mesh’s indices get; the
addressing the draw then reads is the metadata entry’s
vertex_offset.
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
impl Copy for DeviceCapabilities
Source§impl Debug for DeviceCapabilities
impl Debug for DeviceCapabilities
Source§impl Default for DeviceCapabilities
impl Default for DeviceCapabilities
impl Eq for DeviceCapabilities
Source§impl PartialEq for DeviceCapabilities
impl PartialEq for DeviceCapabilities
impl StructuralPartialEq for DeviceCapabilities
Auto Trait Implementations§
impl Forget for DeviceCapabilities
impl Freeze for DeviceCapabilities
impl RefUnwindSafe for DeviceCapabilities
impl Send for DeviceCapabilities
impl Sync for DeviceCapabilities
impl Unpin for DeviceCapabilities
impl UnsafeUnpin for DeviceCapabilities
impl UnwindSafe for DeviceCapabilities
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more