summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2022-09-18 18:16:19 -0400
committerMicha White <botahamec@outlook.com>2022-09-18 18:16:19 -0400
commitcd7d74507fa54d026547b7dda9e1498a81a395b5 (patch)
tree7d5435eec9c84dead9cdc36a4ba87dcfe520f5c3 /src/config.rs
parent83295e01008bdf25e03f6b5aa18b93b735a5e326 (diff)
An actual instancing API
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs5
1 files changed, 5 insertions, 0 deletions
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,
}
}
}