diff options
| author | Micha White <botahamec@outlook.com> | 2022-09-18 21:18:23 -0400 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2022-09-18 21:18:23 -0400 |
| commit | 2d2c88a704455f5dc3e14b557bd52eefcec14d2e (patch) | |
| tree | b53f409d6e7fb7387816640bc76c88ebe7f8364c /src/config.rs | |
| parent | cd7d74507fa54d026547b7dda9e1498a81a395b5 (diff) | |
Some optimization
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs index e9f9ca4..c29a957 100644 --- a/src/config.rs +++ b/src/config.rs @@ -69,7 +69,7 @@ pub struct RenderWindowConfig<'a> { /// 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 + pub instance_capacity: usize, } impl<'a> Default for RenderWindowConfig<'a> { @@ -87,11 +87,13 @@ impl<'a> Default for RenderWindowConfig<'a> { } impl<'a> RenderWindowConfig<'a> { - /// Create a `WindowBuilder` from the configuration given + /// Create a `WindowBuilder` from the configuration given. This window is + /// initially invisible and must later be made visible. pub(crate) fn to_window(&self) -> WindowBuilder { // start building the window let mut builder = WindowBuilder::new() .with_title(self.title.as_ref()) + .with_visible(false) .with_inner_size(LogicalSize::new( self.default_width.get(), self.default_height.get(), |
