/// # Safety /// /// Refer to the creation of wgpu-hal Instance for every backend. pubunsafefn from_hal_instance<A: HalApi>(name: &str, hal_instance: A::Instance) -> Self {
profiling::scope!("Global::new");
/// # Safety /// /// - The raw instance handle returned must not be manually destroyed. pubunsafefn instance_as_hal<A: HalApi>(&self) -> Option<&A::Instance> { unsafe { self.instance.as_hal::<A>() }
}
/// # Safety /// /// - The raw handles obtained from the Instance must not be manually destroyed pubunsafefn from_instance(instance: Instance) -> Self {
profiling::scope!("Global::new"); Self {
instance,
surfaces: Registry::new(),
hub: Hub::new(),
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.