Document present_mode_from_env in iced_wgpu
This commit is contained in:
parent
8a0701a0d9
commit
5b6f3499e1
1 changed files with 12 additions and 0 deletions
|
|
@ -52,6 +52,18 @@ impl From<graphics::Settings> for Settings {
|
|||
}
|
||||
}
|
||||
|
||||
/// Obtains a [`wgpu::PresentMode`] from the current environment
|
||||
/// configuration, if set.
|
||||
///
|
||||
/// The value returned by this function can be changed by setting
|
||||
/// the `ICED_PRESENT_MODE` env variable. The possible values are:
|
||||
///
|
||||
/// - `vsync` → [`wgpu::PresentMode::AutoVsync`]
|
||||
/// - `no_vsync` → [`wgpu::PresentMode::AutoNoVsync`]
|
||||
/// - `immediate` → [`wgpu::PresentMode::Immediate`]
|
||||
/// - `fifo` → [`wgpu::PresentMode::Fifo`]
|
||||
/// - `fifo_relaxed` → [`wgpu::PresentMode::FifoRelaxed`]
|
||||
/// - `mailbox` → [`wgpu::PresentMode::Mailbox`]
|
||||
pub fn present_mode_from_env() -> Option<wgpu::PresentMode> {
|
||||
let present_mode = std::env::var("ICED_PRESENT_MODE").ok()?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue