webxr::glwindow

Struct GlWindowDevice

Source
pub struct GlWindowDevice {
Show 13 fields device: Device, context: Context, gl: Rc<Context>, window: Rc<dyn GlWindow>, grand_manager: LayerGrandManager<SurfmanGL>, layer_manager: Option<LayerManager>, target_swap_chain: Option<SwapChain<Device>>, swap_chains: SwapChains<LayerId, Device>, read_fbo: Option<NativeFramebuffer>, events: EventBuffer, clip_planes: ClipPlanes, granted_features: Vec<String>, shader: Option<GlWindowShader>,
}

Fields§

§device: Device§context: Context§gl: Rc<Context>§window: Rc<dyn GlWindow>§grand_manager: LayerGrandManager<SurfmanGL>§layer_manager: Option<LayerManager>§target_swap_chain: Option<SwapChain<Device>>§swap_chains: SwapChains<LayerId, Device>§read_fbo: Option<NativeFramebuffer>§events: EventBuffer§clip_planes: ClipPlanes§granted_features: Vec<String>§shader: Option<GlWindowShader>

Implementations§

Source§

impl GlWindowDevice

Source

fn new( connection: Connection, adapter: Adapter, context_attributes: ContextAttributes, window: Rc<dyn GlWindow>, granted_features: Vec<String>, grand_manager: LayerGrandManager<SurfmanGL>, ) -> Result<GlWindowDevice, Error>

Source

fn blit_texture( &self, texture_id: Option<NativeTexture>, texture_target: u32, texture_size: Size2D<i32, UnknownUnit>, window_size: Size2D<i32, Viewport>, )

Source

fn layer_manager(&mut self) -> Result<&mut LayerManager, Error>

Source

fn window_size(&self) -> Size2D<i32, Viewport>

Source

fn viewport_size(&self) -> Size2D<i32, Viewport>

Source

fn views(&self, viewer: RigidTransform3D<f32, Viewer, Native>) -> Views

Source

fn view<Eye>( &self, viewer: RigidTransform3D<f32, Viewer, Native>, eye: SomeEye<Eye>, ) -> View<Eye>

Source

fn perspective<Eye>(&self) -> Transform3D<f32, Eye, Display>

Trait Implementations§

Source§

impl DeviceAPI for GlWindowDevice

Source§

fn floor_transform(&self) -> Option<RigidTransform3D<f32, Native, Floor>>

The transform from native coordinates to the floor.
Source§

fn viewports(&self) -> Viewports

Source§

fn create_layer( &mut self, context_id: ContextId, init: LayerInit, ) -> Result<LayerId, Error>

Create a new layer
Source§

fn destroy_layer(&mut self, context_id: ContextId, layer_id: LayerId)

Destroy a layer
Source§

fn begin_animation_frame( &mut self, layers: &[(ContextId, LayerId)], ) -> Option<Frame>

Begin an animation frame.
Source§

fn end_animation_frame(&mut self, layers: &[(ContextId, LayerId)])

End an animation frame, render the layer to the device, and block waiting for the next frame.
Source§

fn initial_inputs(&self) -> Vec<InputSource>

Inputs registered with the device on initialization. More may be added, which should be communicated through a yet-undecided event mechanism
Source§

fn set_event_dest(&mut self, dest: WebXrSender<Event>)

Sets the event handling channel
Source§

fn quit(&mut self)

Quit the session
Source§

fn set_quitter(&mut self, _: Quitter)

Source§

fn update_clip_planes(&mut self, near: f32, far: f32)

Source§

fn granted_features(&self) -> &[String]

Source§

fn environment_blend_mode(&self) -> EnvironmentBlendMode

Source§

fn request_hit_test(&mut self, _source: HitTestSource)

Source§

fn cancel_hit_test(&mut self, _id: HitTestId)

Source§

fn update_frame_rate(&mut self, rate: f32) -> f32

Source§

fn supported_frame_rates(&self) -> Vec<f32>

Source§

fn reference_space_bounds(&self) -> Option<Vec<Point2D<f32, Floor>>>

Source§

impl Drop for GlWindowDevice

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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