pub struct SettingsBuilder { /* private fields */ }appcore_linked or loaded only.Expand description
Builder for the Settings struct.
Implementations§
Source§impl SettingsBuilder
impl SettingsBuilder
Sourcepub fn developer_name(self, developer_name: &str) -> Self
pub fn developer_name(self, developer_name: &str) -> Self
The name of the developer of this app.
This is used to generate a unique path to store local application data on the user’s machine.
Sourcepub fn app_name(self, app_name: &str) -> Self
pub fn app_name(self, app_name: &str) -> Self
The name of this app.
This is used to generate a unique path to store local application data on the user’s machine.
Sourcepub fn filesystem_path(self, filesystem_path: &str) -> Self
pub fn filesystem_path(self, filesystem_path: &str) -> Self
The root file path for our file system. You should set this to the relative path where all of your app data is.
This will be used to resolve all file URLs, eg file:///page.html.
This relative path is resolved using the following logic:
- Windows: relative to the executable path
- Linux: relative to the executable path
- macOS: relative to YourApp.app/Contents/Resources/
Sourcepub fn load_shaders_from_filesystem(
self,
load_shaders_from_filesystem: bool,
) -> Self
pub fn load_shaders_from_filesystem( self, load_shaders_from_filesystem: bool, ) -> Self
Whether or not we should load and compile shaders from the file system
(eg, from the /shaders/ path, relative to filesystem_path).
If this is false (the default), we will instead load pre-compiled shaders from memory which speeds up application startup time.
Sourcepub fn force_cpu_renderer(self, force_cpu_renderer: bool) -> Self
pub fn force_cpu_renderer(self, force_cpu_renderer: bool) -> Self
We try to use the GPU renderer when a compatible GPU is detected.
Set this to true to force the engine to always use the CPU renderer.