pub enum GlDebugFns {
Auto,
ForceEnabled,
Disabled,
}Expand description
Controls whether OpenGL debug functions are enabled.
Debug functions include glPushDebugGroup, glPopDebugGroup, glObjectLabel, etc.
These are useful for debugging but can cause crashes on some buggy drivers.
Variants§
Auto
Automatically decide whether to enable debug functions.
Debug functions will be enabled if supported by the driver, unless
running on a device known to have buggy debug function implementations
(e.g., Mali GPUs which can crash in glPushDebugGroup).
This is the default behavior.
ForceEnabled
Force enable debug functions if supported by the driver.
This ignores any device-specific workarounds and enables debug functions on all devices that support them, including those with known bugs.
Disabled
Disable debug functions entirely.
Debug functions will not be used even if supported by the driver.
Implementations§
Source§impl GlDebugFns
impl GlDebugFns
Sourcepub fn from_env() -> Option<Self>
pub fn from_env() -> Option<Self>
Choose debug functions setting from the environment variable WGPU_GL_DEBUG_FNS.
Possible values (case insensitive):
auto- automatically decide based on deviceforceenabled,force_enabled, orenabled- force enabledisabled- disable entirely
Use with unwrap_or_default() to get the default value if the environment variable is not set.
Trait Implementations§
Source§impl Clone for GlDebugFns
impl Clone for GlDebugFns
Source§fn clone(&self) -> GlDebugFns
fn clone(&self) -> GlDebugFns
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more