From cd7d74507fa54d026547b7dda9e1498a81a395b5 Mon Sep 17 00:00:00 2001 From: Micha White Date: Sun, 18 Sep 2022 18:16:19 -0400 Subject: An actual instancing API --- src/config.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index f321a9b..e9f9ca4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -66,6 +66,10 @@ pub struct RenderWindowConfig<'a> { /// If true, Fifo mode is used to present frames. If false, then Mailbox or /// Immediate will be used if available. Otherwise, Fifo will be used. pub vsync: bool, + /// The initial capacity of the instance buffer. The size will increase if + /// it's not large enough. Increasing this value may improve performance + /// towards the beginning, if a lot of instances are being created. + pub instance_capacity: usize } impl<'a> Default for RenderWindowConfig<'a> { @@ -77,6 +81,7 @@ impl<'a> Default for RenderWindowConfig<'a> { title: "Alligator Game".into(), low_power: true, vsync: true, + instance_capacity: 0, } } } -- cgit v1.2.3