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>;
}