Enum GlDebugFns
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§
§impl GlDebugFns
impl GlDebugFns
pub fn from_env() -> Option<GlDebugFns>
pub fn from_env() -> Option<GlDebugFns>
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.
pub fn with_env(self) -> GlDebugFns
pub fn with_env(self) -> GlDebugFns
Takes the given setting, modifies it based on the WGPU_GL_DEBUG_FNS environment variable, and returns the result.
See from_env for more information.
Trait Implementations§
§impl Clone for GlDebugFns
impl Clone for GlDebugFns
§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§impl Debug for GlDebugFns
impl Debug for GlDebugFns
§impl Default for GlDebugFns
impl Default for GlDebugFns
§fn default() -> GlDebugFns
fn default() -> GlDebugFns
§impl PartialEq for GlDebugFns
impl PartialEq for GlDebugFns
impl Copy for GlDebugFns
impl Eq for GlDebugFns
impl StructuralPartialEq for GlDebugFns
Auto Trait Implementations§
impl Freeze for GlDebugFns
impl RefUnwindSafe for GlDebugFns
impl Send for GlDebugFns
impl Sync for GlDebugFns
impl Unpin for GlDebugFns
impl UnwindSafe for GlDebugFns
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.