diff options
Diffstat (limited to 'graphics/src/layer.rs')
-rw-r--r-- | graphics/src/layer.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/src/layer.rs b/graphics/src/layer.rs index 0187cc59..c9a818fb 100644 --- a/graphics/src/layer.rs +++ b/graphics/src/layer.rs @@ -113,6 +113,11 @@ impl<T: Layer> Stack<T> { self.layers[..self.active_count].iter() } + /// Returns the slice of layers in the [`Stack`]. + pub fn as_slice(&self) -> &[T] { + &self.layers[..self.active_count] + } + /// Flushes and settles any primitives in the current layer of the [`Stack`]. pub fn flush(&mut self) { self.layers[self.current].flush(); |