pub(crate) type GPUSamplerDescriptor = GPUSamplerDescriptor;
Aliased Type§
struct GPUSamplerDescriptor {
pub(crate) parent: GPUObjectDescriptorBase,
pub(crate) addressModeU: GPUAddressMode,
pub(crate) addressModeV: GPUAddressMode,
pub(crate) addressModeW: GPUAddressMode,
pub(crate) compare: Option<GPUCompareFunction>,
pub(crate) lodMaxClamp: Finite<f32>,
pub(crate) lodMinClamp: Finite<f32>,
pub(crate) magFilter: GPUFilterMode,
pub(crate) maxAnisotropy: u16,
pub(crate) minFilter: GPUFilterMode,
pub(crate) mipmapFilter: GPUFilterMode,
}
Fields§
§parent: GPUObjectDescriptorBase
§addressModeU: GPUAddressMode
§addressModeV: GPUAddressMode
§addressModeW: GPUAddressMode
§compare: Option<GPUCompareFunction>
§lodMaxClamp: Finite<f32>
§lodMinClamp: Finite<f32>
§magFilter: GPUFilterMode
§maxAnisotropy: u16
§minFilter: GPUFilterMode
§mipmapFilter: GPUFilterMode
Implementations
Source§impl GPUSamplerDescriptor
impl GPUSamplerDescriptor
pub(crate) fn empty() -> Self
pub(crate) fn new( cx: SafeJSContext, val: HandleValue<'_>, ) -> Result<ConversionResult<GPUSamplerDescriptor>, ()>
Source§impl GPUSamplerDescriptor
impl GPUSamplerDescriptor
pub(crate) unsafe fn to_jsobject( &self, cx: *mut JSContext, obj: MutableHandleObject<'_>, )
Trait Implementations
Source§impl Default for GPUSamplerDescriptor
impl Default for GPUSamplerDescriptor
Source§impl FromJSValConvertible for GPUSamplerDescriptor
impl FromJSValConvertible for GPUSamplerDescriptor
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: HandleValue<'_>,
_option: (),
) -> Result<ConversionResult<GPUSamplerDescriptor>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, _option: (), ) -> Result<ConversionResult<GPUSamplerDescriptor>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.