summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/renderer.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index 30f9d40e..69ed8775 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -31,7 +31,9 @@ impl<B: Backend> Renderer<B> {
self.primitives.push(primitive);
}
- pub fn present(&mut self, f: impl FnOnce(&mut B, &[Primitive])) {
+ /// Runs the given closure with the [`Backend`] and the recorded primitives
+ /// of the [`Renderer`].
+ pub fn with_primitives(&mut self, f: impl FnOnce(&mut B, &[Primitive])) {
f(&mut self.backend, &self.primitives);
}
}