Trait webxr_api::layer::LayerManagerAPI

source ·
pub trait LayerManagerAPI<GL: GLTypes> {
    // Required methods
    fn create_layer(
        &mut self,
        device: &mut GL::Device,
        contexts: &mut dyn GLContexts<GL>,
        context_id: ContextId,
        init: LayerInit,
    ) -> Result<LayerId, Error>;
    fn destroy_layer(
        &mut self,
        device: &mut GL::Device,
        contexts: &mut dyn GLContexts<GL>,
        context_id: ContextId,
        layer_id: LayerId,
    );
    fn layers(&self) -> &[(ContextId, LayerId)];
    fn begin_frame(
        &mut self,
        device: &mut GL::Device,
        contexts: &mut dyn GLContexts<GL>,
        layers: &[(ContextId, LayerId)],
    ) -> Result<Vec<SubImages>, Error>;
    fn end_frame(
        &mut self,
        device: &mut GL::Device,
        contexts: &mut dyn GLContexts<GL>,
        layers: &[(ContextId, LayerId)],
    ) -> Result<(), Error>;
}

Required Methods§

source

fn create_layer( &mut self, device: &mut GL::Device, contexts: &mut dyn GLContexts<GL>, context_id: ContextId, init: LayerInit, ) -> Result<LayerId, Error>

source

fn destroy_layer( &mut self, device: &mut GL::Device, contexts: &mut dyn GLContexts<GL>, context_id: ContextId, layer_id: LayerId, )

source

fn layers(&self) -> &[(ContextId, LayerId)]

source

fn begin_frame( &mut self, device: &mut GL::Device, contexts: &mut dyn GLContexts<GL>, layers: &[(ContextId, LayerId)], ) -> Result<Vec<SubImages>, Error>

source

fn end_frame( &mut self, device: &mut GL::Device, contexts: &mut dyn GLContexts<GL>, layers: &[(ContextId, LayerId)], ) -> Result<(), Error>

Implementors§